summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-05-18 10:44:36 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-05-18 10:44:36 +0000
commitf71aeb3fe9f385a634c46188515206f91c087b82 (patch)
treec629a78664446246792fc22a7cf8f36b9e4ffcee /Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
parent57f9b626bae9d06ab9a7818a4bf6de15213980bb (diff)
harfbuzz 2.6.6
git-svn-id: svn://tug.org/texlive/trunk@55197 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc25
1 files changed, 16 insertions, 9 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
index 96f94e4a9ec..a1dc88603a2 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-font.cc
@@ -183,22 +183,21 @@ hb_ot_get_glyph_extents (hb_font_t *font,
void *user_data HB_UNUSED)
{
const hb_ot_face_t *ot_face = (const hb_ot_face_t *) font_data;
- bool ret = false;
#if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR)
- if (!ret) ret = ot_face->sbix->get_extents (font, glyph, extents);
+ if (ot_face->sbix->get_extents (font, glyph, extents)) return true;
#endif
- if (!ret) ret = ot_face->glyf->get_extents (font, glyph, extents);
+ if (ot_face->glyf->get_extents (font, glyph, extents)) return true;
#ifndef HB_NO_OT_FONT_CFF
- if (!ret) ret = ot_face->cff1->get_extents (font, glyph, extents);
- if (!ret) ret = ot_face->cff2->get_extents (font, glyph, extents);
+ if (ot_face->cff1->get_extents (font, glyph, extents)) return true;
+ if (ot_face->cff2->get_extents (font, glyph, extents)) return true;
#endif
#if !defined(HB_NO_OT_FONT_BITMAP) && !defined(HB_NO_COLOR)
- if (!ret) ret = ot_face->CBDT->get_extents (font, glyph, extents);
+ if (ot_face->CBDT->get_extents (font, glyph, extents)) return true;
#endif
// TODO Hook up side-bearings variations.
- return ret;
+ return false;
}
#ifndef HB_NO_OT_FONT_GLYPH_NAMES
@@ -210,7 +209,11 @@ hb_ot_get_glyph_name (hb_font_t *font HB_UNUSED,
void *user_data HB_UNUSED)
{
const hb_ot_face_t *ot_face = (const hb_ot_face_t *) font_data;
- return ot_face->post->get_glyph_name (glyph, name, size);
+ if (ot_face->post->get_glyph_name (glyph, name, size)) return true;
+#ifndef HB_NO_OT_FONT_CFF
+ if (ot_face->cff1->get_glyph_name (glyph, name, size)) return true;
+#endif
+ return false;
}
static hb_bool_t
hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED,
@@ -220,7 +223,11 @@ hb_ot_get_glyph_from_name (hb_font_t *font HB_UNUSED,
void *user_data HB_UNUSED)
{
const hb_ot_face_t *ot_face = (const hb_ot_face_t *) font_data;
- return ot_face->post->get_glyph_from_name (name, len, glyph);
+ if (ot_face->post->get_glyph_from_name (name, len, glyph)) return true;
+#ifndef HB_NO_OT_FONT_CFF
+ if (ot_face->cff1->get_glyph_from_name (name, len, glyph)) return true;
+#endif
+ return false;
}
#endif