[pango/harfbuzz-ng] [HB] Fix glyph properties
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Subject: [pango/harfbuzz-ng] [HB] Fix glyph properties
- Date: Tue, 26 May 2009 22:22:53 -0400 (EDT)
commit 6f9bd9a0e876bc49d25fb8e892b17adfa5b12b8c
Author: Behdad Esfahbod <behdad behdad org>
Date: Tue May 26 19:48:16 2009 -0400
[HB] Fix glyph properties
---
pango/opentype/hb-ot-layout-common-private.h | 6 +++---
pango/opentype/hb-ot-layout-open-private.h | 2 +-
pango/opentype/hb-ot-layout.cc | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pango/opentype/hb-ot-layout-common-private.h b/pango/opentype/hb-ot-layout-common-private.h
index 38933c8..c95fc00 100644
--- a/pango/opentype/hb-ot-layout-common-private.h
+++ b/pango/opentype/hb-ot-layout-common-private.h
@@ -185,7 +185,7 @@ struct Lookup
{
const USHORT &markFilteringSet = *(const USHORT*)
((const char *) &subTable + subTable.get_size ());
- flag += markFilteringSet << 16;
+ flag += (markFilteringSet << 16);
}
return flag;
}
@@ -420,8 +420,8 @@ struct Device
unsigned int s = ppem_size - startSize;
unsigned int byte = deltaValue[s >> (4 - f)];
- unsigned int bits = byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f));
- unsigned int mask = 0xFFFF >> (16 - (1 << f));
+ unsigned int bits = (byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f)));
+ unsigned int mask = (0xFFFF >> (16 - (1 << f)));
int delta = bits & mask;
diff --git a/pango/opentype/hb-ot-layout-open-private.h b/pango/opentype/hb-ot-layout-open-private.h
index 0da23ef..6a75eb1 100644
--- a/pango/opentype/hb-ot-layout-open-private.h
+++ b/pango/opentype/hb-ot-layout-open-private.h
@@ -301,7 +301,7 @@ ASSERT_SIZE (CheckSum, 4);
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 minor;
diff --git a/pango/opentype/hb-ot-layout.cc b/pango/opentype/hb-ot-layout.cc
index 25d1dce..8cff03e 100644
--- a/pango/opentype/hb-ot-layout.cc
+++ b/pango/opentype/hb-ot-layout.cc
@@ -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
* introduced without a version bump, so it may not be safe */
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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]