Bug 1408366 - Unicode combining grapheme joiner (U+034F) should not break the font run. r=jrmuizel
authorJonathan Kew <jkew@mozilla.com>
Fri, 13 Oct 2017 16:19:47 +0100
changeset 423877 b6f55f929971562390d4267eea332aae7cbfb08b
parent 423876 c0c297947982b5766e3e3c762f625717bfd2412b
child 423878 3a984f1984783282623cca5c7fa90ec7f339b53c
push idunknown
push userunknown
push dateunknown
reviewersjrmuizel
bugs1408366
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1408366 - Unicode combining grapheme joiner (U+034F) should not break the font run. r=jrmuizel
gfx/thebes/gfxFontUtils.h
--- a/gfx/thebes/gfxFontUtils.h
+++ b/gfx/thebes/gfxFontUtils.h
@@ -898,18 +898,22 @@ public:
     DecodeFontName(const char *aBuf, int32_t aLength, 
                    uint32_t aPlatformCode, uint32_t aScriptCode,
                    uint32_t aLangCode, nsAString& dest);
 
     static inline bool IsJoinCauser(uint32_t ch) {
         return (ch == 0x200D);
     }
 
+    // We treat Combining Grapheme Joiner (U+034F) together with the join
+    // controls (ZWJ, ZWNJ) here, because (like them) it is an invisible
+    // char that will be handled by the shaper even if not explicitly
+    // supported by the font. (See bug 1408366.)
     static inline bool IsJoinControl(uint32_t ch) {
-        return (ch == 0x200C || ch == 0x200D);
+        return (ch == 0x200C || ch == 0x200D || ch == 0x034f);
     }
 
     enum {
         kUnicodeVS1 = 0xFE00,
         kUnicodeVS16 = 0xFE0F,
         kUnicodeVS17 = 0xE0100,
         kUnicodeVS256 = 0xE01EF
     };