1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-30 16:26:50 +00:00

Update HarfBuzz, ICU and FreeType

HarfBuzz: Update to version 7.3.0
ICU4C: Update to version 73.1
FreeType: Update to version 2.13.0
This commit is contained in:
bruvzg
2023-05-23 03:05:01 +03:00
parent d5c1b9f883
commit b64df2bf74
810 changed files with 32198 additions and 11081 deletions

View File

@@ -107,14 +107,27 @@ uscript_getCode(const char* nameOrAbbrOrLocale,
if(U_FAILURE(*err)) {
return 0;
}
if(nameOrAbbrOrLocale==NULL ||
(fillIn == NULL ? capacity != 0 : capacity < 0)) {
if(nameOrAbbrOrLocale==nullptr ||
(fillIn == nullptr ? capacity != 0 : capacity < 0)) {
*err = U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
triedCode = false;
if(uprv_strchr(nameOrAbbrOrLocale, '-')==NULL && uprv_strchr(nameOrAbbrOrLocale, '_')==NULL ){
const char* lastSepPtr = uprv_strrchr(nameOrAbbrOrLocale, '-');
if (lastSepPtr==nullptr) {
lastSepPtr = uprv_strrchr(nameOrAbbrOrLocale, '_');
}
// Favor interpretation of nameOrAbbrOrLocale as a script alias if either
// 1. nameOrAbbrOrLocale does not contain -/_. Handles Han, Mro, Nko, etc.
// 2. The last instance of -/_ is at offset 3, and the portion after that is
// longer than 4 characters (i.e. not a script or region code). This handles
// Old_Hungarian, Old_Italic, etc. ("old" is a valid language code)
// 3. The last instance of -/_ is at offset 7, and the portion after that is
// 3 characters. This handles New_Tai_Lue ("new" is a valid language code).
if (lastSepPtr==nullptr
|| (lastSepPtr-nameOrAbbrOrLocale == 3 && uprv_strlen(nameOrAbbrOrLocale) > 8)
|| (lastSepPtr-nameOrAbbrOrLocale == 7 && uprv_strlen(nameOrAbbrOrLocale) == 11) ) {
/* try long and abbreviated script names first */
UScriptCode code = (UScriptCode) u_getPropertyValueEnum(UCHAR_SCRIPT, nameOrAbbrOrLocale);
if(code!=USCRIPT_INVALID_CODE) {