/*1* Copyright 2025 Zhiyi Zhang for CodeWeavers2*3* This library is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* This library is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with this library; if not, write to the Free Software15* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA16*/1718#include <stdarg.h>19#include <windef.h>20#include <winbase.h>21#include <winnls.h>22#include "wine/debug.h"2324WINE_DEFAULT_DEBUG_CHANNEL(bcp47langs);2526HRESULT WINAPI GetFontFallbackLanguageList(const WCHAR *lang, size_t buffer_length, WCHAR *buffer,27size_t *required_buffer_length)28{29WCHAR locale[LOCALE_NAME_MAX_LENGTH];30size_t lang_length;3132FIXME("lang %s, buffer_length %Iu, buffer %p, required_buffer_length %p stub!\n",33wine_dbgstr_w(lang), buffer_length, buffer, required_buffer_length);3435if (!buffer_length || !buffer)36return E_INVALIDARG;3738if (!lang)39{40if (!GetUserDefaultLocaleName(locale, LOCALE_NAME_MAX_LENGTH))41return E_FAIL;4243lang = locale;44}4546/* Return the original language as the fallback language list */47lang_length = wcslen(lang) + 1;48*required_buffer_length = lang_length;49if (buffer_length < lang_length)50return E_NOT_SUFFICIENT_BUFFER;5152memcpy(buffer, lang, lang_length * sizeof(WCHAR));53return S_OK;54}555657