mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 14:57:32 +09:00
Issue #326 - Part 1a: Update character property table generator script for Unicode 9, and adjust APIs to fit the new identifier-type property model
Backported from Mozilla bug 1281448.
This commit is contained in:
parent
e40697c0c6
commit
275ea2bcf5
5 changed files with 144 additions and 68 deletions
|
|
@ -725,10 +725,9 @@ gfxShapedText::SetGlyphs(uint32_t aIndex, CompressedGlyph aGlyph,
|
|||
#define ZWNJ 0x200C
|
||||
#define ZWJ 0x200D
|
||||
static inline bool
|
||||
IsDefaultIgnorable(uint32_t aChar)
|
||||
IsIgnorable(uint32_t aChar)
|
||||
{
|
||||
return GetIdentifierModification(aChar) == XIDMOD_DEFAULT_IGNORABLE ||
|
||||
aChar == ZWNJ || aChar == ZWJ;
|
||||
return (IsDefaultIgnorable(aChar)) || aChar == ZWNJ || aChar == ZWJ;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -744,7 +743,7 @@ gfxShapedText::SetMissingGlyph(uint32_t aIndex, uint32_t aChar, gfxFont *aFont)
|
|||
DetailedGlyph *details = AllocateDetailedGlyphs(aIndex, 1);
|
||||
|
||||
details->mGlyphID = aChar;
|
||||
if (IsDefaultIgnorable(aChar)) {
|
||||
if (IsIgnorable(aChar)) {
|
||||
// Setting advance width to zero will prevent drawing the hexbox
|
||||
details->mAdvance = 0;
|
||||
} else {
|
||||
|
|
@ -762,7 +761,7 @@ gfxShapedText::SetMissingGlyph(uint32_t aIndex, uint32_t aChar, gfxFont *aFont)
|
|||
bool
|
||||
gfxShapedText::FilterIfIgnorable(uint32_t aIndex, uint32_t aCh)
|
||||
{
|
||||
if (IsDefaultIgnorable(aCh)) {
|
||||
if (IsIgnorable(aCh)) {
|
||||
// There are a few default-ignorables of Letter category (currently,
|
||||
// just the Hangul filler characters) that we'd better not discard
|
||||
// if they're followed by additional characters in the same cluster.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue