WebKit Bugzilla
Attachment 361789 Details for
Bug 194498
: [FreeType] Unable to render some Hebrew characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wk-ft-norm.diff (text/plain), 2.33 KB, created by
Carlos Garcia Campos
on 2019-02-12 04:48:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2019-02-12 04:48:01 PST
Size:
2.33 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3078ce9844b..acc66629efd 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,17 @@ >+2019-02-12 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [FreeType] Unable to render some Hebrew characters >+ https://bugs.webkit.org/show_bug.cgi?id=194498 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We are failing to find a font for some of the combining character sequences because normalization is failing due >+ to overflow error. In case of overflow, normalize returns the required length for the normalized characters, so >+ we should handle that case to resize the output buffer and try again. >+ >+ * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: >+ (WebCore::FontCascade::fontForCombiningCharacterSequence const): >+ > 2019-02-12 Rob Buis <rbuis@igalia.com> > > Implement serializing in MIME type parser >diff --git a/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp b/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >index 107dc71317b..783c018ef56 100644 >--- a/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >+++ b/Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >@@ -104,11 +104,20 @@ const Font* FontCascade::fontForCombiningCharacterSequence(const UChar* characte > { > UErrorCode error = U_ZERO_ERROR; > Vector<UChar, 4> normalizedCharacters(length); >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- int32_t normalizedLength = unorm_normalize(characters, length, UNORM_NFC, UNORM_UNICODE_3_2, normalizedCharacters.data(), length, &error); >- ALLOW_DEPRECATED_DECLARATIONS_END >+ const auto* normalizer = unorm2_getNFCInstance(&error); > if (U_FAILURE(error)) > return nullptr; >+ int32_t normalizedLength = unorm2_normalize(normalizer, characters, length, normalizedCharacters.data(), length, &error); >+ if (U_FAILURE(error)) { >+ if (error != U_BUFFER_OVERFLOW_ERROR) >+ return nullptr; >+ >+ error = U_ZERO_ERROR; >+ normalizedCharacters.resize(normalizedLength); >+ normalizedLength = unorm2_normalize(normalizer, characters, length, normalizedCharacters.data(), normalizedLength, &error); >+ if (U_FAILURE(error)) >+ return nullptr; >+ } > > UChar32 character; > unsigned clusterLength = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mcatanzaro
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194498
:
361673
|
361674
| 361789