1
0
Fork 0

Merge pull request #86552 from sepTN/fix-get_system_font_path

Fix `OS.get_system_font_path` and `OS.get_system_font_path_for_text` to return correct slashes
This commit is contained in:
Rémi Verschelde 2024-01-02 18:05:37 +01:00
commit 3e67dc1f52
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

View File

@ -1183,7 +1183,7 @@ Vector<String> OS_Windows::get_system_font_path_for_text(const String &p_font_na
if (FAILED(hr)) {
continue;
}
String fpath = String::utf16((const char16_t *)&file_path[0]);
String fpath = String::utf16((const char16_t *)&file_path[0]).replace("\\", "/");
WIN32_FIND_DATAW d;
HANDLE fnd = FindFirstFileW((LPCWSTR)&file_path[0], &d);
@ -1262,7 +1262,7 @@ String OS_Windows::get_system_font_path(const String &p_font_name, int p_weight,
if (FAILED(hr)) {
continue;
}
String fpath = String::utf16((const char16_t *)&file_path[0]);
String fpath = String::utf16((const char16_t *)&file_path[0]).replace("\\", "/");
WIN32_FIND_DATAW d;
HANDLE fnd = FindFirstFileW((LPCWSTR)&file_path[0], &d);