提交 09c292e3 编写于 作者: B Behdad Esfahbod

[HB] Fix glyph properties

上级 64e33f00
...@@ -185,7 +185,7 @@ struct Lookup ...@@ -185,7 +185,7 @@ struct Lookup
{ {
const USHORT &markFilteringSet = *(const USHORT*) const USHORT &markFilteringSet = *(const USHORT*)
((const char *) &subTable + subTable.get_size ()); ((const char *) &subTable + subTable.get_size ());
flag += markFilteringSet << 16; flag += (markFilteringSet << 16);
} }
return flag; return flag;
} }
...@@ -420,8 +420,8 @@ struct Device ...@@ -420,8 +420,8 @@ struct Device
unsigned int s = ppem_size - startSize; unsigned int s = ppem_size - startSize;
unsigned int byte = deltaValue[s >> (4 - f)]; unsigned int byte = deltaValue[s >> (4 - f)];
unsigned int bits = byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f)); unsigned int bits = (byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f)));
unsigned int mask = 0xFFFF >> (16 - (1 << f)); unsigned int mask = (0xFFFF >> (16 - (1 << f)));
int delta = bits & mask; int delta = bits & mask;
......
...@@ -301,7 +301,7 @@ ASSERT_SIZE (CheckSum, 4); ...@@ -301,7 +301,7 @@ ASSERT_SIZE (CheckSum, 4);
struct FixedVersion struct FixedVersion
{ {
inline operator uint32_t (void) const { return major << 16 + minor; } inline operator uint32_t (void) const { return (major << 16) + minor; }
USHORT major; USHORT major;
USHORT minor; USHORT minor;
......
...@@ -153,7 +153,7 @@ _hb_ot_layout_get_glyph_property (hb_ot_layout_t *layout, ...@@ -153,7 +153,7 @@ _hb_ot_layout_get_glyph_property (hb_ot_layout_t *layout,
/* TODO old harfbuzz doesn't always parse mark attachments as it says it was /* TODO old harfbuzz doesn't always parse mark attachments as it says it was
* introduced without a version bump, so it may not be safe */ * introduced without a version bump, so it may not be safe */
klass = layout->gdef->get_mark_attachment_type (glyph); klass = layout->gdef->get_mark_attachment_type (glyph);
return HB_OT_LAYOUT_GLYPH_CLASS_MARK + klass << 8; return HB_OT_LAYOUT_GLYPH_CLASS_MARK + (klass << 8);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册