Bug 1624827 - Synthesize a space for U+3000 in preference to relying on font fallback. r=heycam
authorJonathan Kew <jkew@mozilla.com>
Thu, 26 Mar 2020 00:08:40 +0000
changeset 520580 395b889fe0285019ce3e943862351e7ebf90f39c
parent 520579 8480828de5a68ae667b96ea59a9179808d03e979
child 520581 c66ff7f7dc6da4e0a540040a98a66771f50a63fa
push id37253
push usernerli@mozilla.com
push dateThu, 26 Mar 2020 21:36:52 +0000
treeherdermozilla-central@c644dd16e2cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1624827
milestone76.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 1624827 - Synthesize a space for U+3000 in preference to relying on font fallback. r=heycam Differential Revision: https://phabricator.services.mozilla.com/D68181
gfx/thebes/gfxFont.cpp
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -3890,16 +3890,18 @@ gfxFloat gfxFont::SynthesizeSpaceWidth(u
       return GetMetrics(nsFontMetrics::eHorizontal)
           .spaceWidth;  // punctuation space
     case 0x2009:
       return GetAdjustedSize() / 5;  // thin space
     case 0x200a:
       return GetAdjustedSize() / 10;  // hair space
     case 0x202f:
       return GetAdjustedSize() / 5;  // narrow no-break space
+    case 0x3000:
+      return GetAdjustedSize();  // ideographic space
     default:
       return -1.0;
   }
 }
 
 void gfxFont::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
                                      FontCacheSizes* aSizes) const {
   for (uint32_t i = 0; i < mGlyphExtentsArray.Length(); ++i) {