1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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

@@ -41,7 +41,7 @@ struct ParenStackEntry
struct UScriptRun
{
int32_t textLength;
const UChar *textArray;
const char16_t *textArray;
int32_t scriptStart;
int32_t scriptLimit;
@@ -189,19 +189,19 @@ sameScript(UScriptCode scriptOne, UScriptCode scriptTwo)
}
U_CAPI UScriptRun * U_EXPORT2
uscript_openRun(const UChar *src, int32_t length, UErrorCode *pErrorCode)
uscript_openRun(const char16_t *src, int32_t length, UErrorCode *pErrorCode)
{
UScriptRun *result = NULL;
UScriptRun *result = nullptr;
if (pErrorCode == NULL || U_FAILURE(*pErrorCode)) {
return NULL;
if (pErrorCode == nullptr || U_FAILURE(*pErrorCode)) {
return nullptr;
}
result = (UScriptRun *)uprv_malloc(sizeof (UScriptRun));
if (result == NULL) {
if (result == nullptr) {
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
return NULL;
return nullptr;
}
uscript_setRunText(result, src, length, pErrorCode);
@@ -209,7 +209,7 @@ uscript_openRun(const UChar *src, int32_t length, UErrorCode *pErrorCode)
/* Release the UScriptRun if uscript_setRunText() returns an error */
if (U_FAILURE(*pErrorCode)) {
uprv_free(result);
result = NULL;
result = nullptr;
}
return result;
@@ -218,7 +218,7 @@ uscript_openRun(const UChar *src, int32_t length, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2
uscript_closeRun(UScriptRun *scriptRun)
{
if (scriptRun != NULL) {
if (scriptRun != nullptr) {
uprv_free(scriptRun);
}
}
@@ -226,7 +226,7 @@ uscript_closeRun(UScriptRun *scriptRun)
U_CAPI void U_EXPORT2
uscript_resetRun(UScriptRun *scriptRun)
{
if (scriptRun != NULL) {
if (scriptRun != nullptr) {
scriptRun->scriptStart = 0;
scriptRun->scriptLimit = 0;
scriptRun->scriptCode = USCRIPT_INVALID_CODE;
@@ -237,13 +237,13 @@ uscript_resetRun(UScriptRun *scriptRun)
}
U_CAPI void U_EXPORT2
uscript_setRunText(UScriptRun *scriptRun, const UChar *src, int32_t length, UErrorCode *pErrorCode)
uscript_setRunText(UScriptRun *scriptRun, const char16_t *src, int32_t length, UErrorCode *pErrorCode)
{
if (pErrorCode == NULL || U_FAILURE(*pErrorCode)) {
if (pErrorCode == nullptr || U_FAILURE(*pErrorCode)) {
return;
}
if (scriptRun == NULL || length < 0 || ((src == NULL) != (length == 0))) {
if (scriptRun == nullptr || length < 0 || ((src == nullptr) != (length == 0))) {
*pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
return;
}
@@ -260,7 +260,7 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
UErrorCode error = U_ZERO_ERROR;
/* if we've fallen off the end of the text, we're done */
if (scriptRun == NULL || scriptRun->scriptLimit >= scriptRun->textLength) {
if (scriptRun == nullptr || scriptRun->scriptLimit >= scriptRun->textLength) {
return false;
}
@@ -268,8 +268,8 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
scriptRun->scriptCode = USCRIPT_COMMON;
for (scriptRun->scriptStart = scriptRun->scriptLimit; scriptRun->scriptLimit < scriptRun->textLength; scriptRun->scriptLimit += 1) {
UChar high = scriptRun->textArray[scriptRun->scriptLimit];
UChar32 ch = high;
char16_t high = scriptRun->textArray[scriptRun->scriptLimit];
UChar32 ch = high;
UScriptCode sc;
int32_t pairIndex;
@@ -278,7 +278,7 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
* in the text, see if it's followed by a low surrogate
*/
if (high >= 0xD800 && high <= 0xDBFF && scriptRun->scriptLimit < scriptRun->textLength - 1) {
UChar low = scriptRun->textArray[scriptRun->scriptLimit + 1];
char16_t low = scriptRun->textArray[scriptRun->scriptLimit + 1];
/*
* if it is followed by a low surrogate,
@@ -345,15 +345,15 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U
}
if (pRunStart != NULL) {
if (pRunStart != nullptr) {
*pRunStart = scriptRun->scriptStart;
}
if (pRunLimit != NULL) {
if (pRunLimit != nullptr) {
*pRunLimit = scriptRun->scriptLimit;
}
if (pRunScript != NULL) {
if (pRunScript != nullptr) {
*pRunScript = scriptRun->scriptCode;
}