summaryrefslogtreecommitdiffstats
path: root/gfx/thebes/gfxHarfBuzzShaper.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-02 17:51:09 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-02 17:51:09 +0200
commit4c9914227ed9e675d65ad16e0bb899e8107a0ee5 (patch)
treed4c542f51b5155eb3f3627c628686cfc0d648a2f /gfx/thebes/gfxHarfBuzzShaper.cpp
parentde01f1e7fce43d5919e6adcd73dfa617a9087520 (diff)
parentaa6329b694a981dccd5b0fd124936c4b54fb94a4 (diff)
downloadUXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.gz
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.lz
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.tar.xz
UXP-4c9914227ed9e675d65ad16e0bb899e8107a0ee5.zip
Merge branch 'ported-upstream'
Diffstat (limited to 'gfx/thebes/gfxHarfBuzzShaper.cpp')
-rw-r--r--gfx/thebes/gfxHarfBuzzShaper.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/gfx/thebes/gfxHarfBuzzShaper.cpp b/gfx/thebes/gfxHarfBuzzShaper.cpp
index 4b9dbbc14..f2264bc1f 100644
--- a/gfx/thebes/gfxHarfBuzzShaper.cpp
+++ b/gfx/thebes/gfxHarfBuzzShaper.cpp
@@ -111,13 +111,15 @@ gfxHarfBuzzShaper::GetNominalGlyph(hb_codepoint_t unicode) const
NS_ASSERTION(mCmapTable && (mCmapFormat > 0) && (mSubtableOffset > 0),
"cmap data not correctly set up, expect disaster");
+ uint32_t length;
const uint8_t* data =
- (const uint8_t*)hb_blob_get_data(mCmapTable, nullptr);
+ (const uint8_t*)hb_blob_get_data(mCmapTable, &length);
switch (mCmapFormat) {
case 4:
gid = unicode < UNICODE_BMP_LIMIT ?
gfxFontUtils::MapCharToGlyphFormat4(data + mSubtableOffset,
+ length - mSubtableOffset,
unicode) : 0;
break;
case 10:
@@ -157,8 +159,9 @@ gfxHarfBuzzShaper::GetVariationGlyph(hb_codepoint_t unicode,
NS_ASSERTION(mCmapTable && (mCmapFormat > 0) && (mSubtableOffset > 0),
"cmap data not correctly set up, expect disaster");
+ uint32_t length;
const uint8_t* data =
- (const uint8_t*)hb_blob_get_data(mCmapTable, nullptr);
+ (const uint8_t*)hb_blob_get_data(mCmapTable, &length);
if (mUVSTableOffset) {
hb_codepoint_t gid =
@@ -176,6 +179,7 @@ gfxHarfBuzzShaper::GetVariationGlyph(hb_codepoint_t unicode,
case 4:
if (compat < UNICODE_BMP_LIMIT) {
return gfxFontUtils::MapCharToGlyphFormat4(data + mSubtableOffset,
+ length - mSubtableOffset,
compat);
}
break;