summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh')
-rw-r--r--Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh15
1 files changed, 6 insertions, 9 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
index 38302f5518e..8586331cd45 100644
--- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
+++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-ot-post-table.hh
@@ -35,8 +35,6 @@
#undef HB_STRING_ARRAY_LIST
#undef HB_STRING_ARRAY_NAME
-#define NUM_FORMAT1_NAMES 258
-
/*
* post -- PostScript
* https://docs.microsoft.com/en-us/typography/opentype/spec/post
@@ -167,8 +165,7 @@ struct post
}
hb_bytes_t st (name, len);
- const uint16_t *gid = (const uint16_t *) hb_bsearch (hb_addressof (st), gids, count,
- sizeof (gids[0]), cmp_key, (void *) this);
+ auto* gid = hb_bsearch (st, gids, count, sizeof (gids[0]), cmp_key, (void *) this);
if (gid)
{
*glyph = *gid;
@@ -185,7 +182,7 @@ struct post
unsigned int get_glyph_count () const
{
if (version == 0x00010000)
- return NUM_FORMAT1_NAMES;
+ return format1_names_length;
if (version == 0x00020000)
return glyphNameIndex->len;
@@ -213,7 +210,7 @@ struct post
{
if (version == 0x00010000)
{
- if (glyph >= NUM_FORMAT1_NAMES)
+ if (glyph >= format1_names_length)
return hb_bytes_t ();
return format1_names (glyph);
@@ -223,9 +220,9 @@ struct post
return hb_bytes_t ();
unsigned int index = glyphNameIndex->arrayZ[glyph];
- if (index < NUM_FORMAT1_NAMES)
+ if (index < format1_names_length)
return format1_names (index);
- index -= NUM_FORMAT1_NAMES;
+ index -= format1_names_length;
if (index >= index_to_offset.length)
return hb_bytes_t ();
@@ -262,7 +259,7 @@ struct post
* 0x00020000 for version 2.0
* 0x00025000 for version 2.5 (deprecated)
* 0x00030000 for version 3.0 */
- HBFixed italicAngle; /* Italic angle in counter-clockwise degrees
+ HBFixed italicAngle; /* Italic angle in counter-clockwise degrees
* from the vertical. Zero for upright text,
* negative for text that leans to the right
* (forward). */