[pango/harfbuzz-ng: 11/57] [HB] Fix for dfont's with multiple faces
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pango/harfbuzz-ng: 11/57] [HB] Fix for dfont's with multiple faces
- Date: Tue, 4 Aug 2009 20:02:16 +0000 (UTC)
commit 7257d6625638eaeffa13acd614c0eb53875e8172
Author: Behdad Esfahbod <behdad behdad org>
Date: Sat Aug 1 19:10:41 2009 -0400
[HB] Fix for dfont's with multiple faces
pango/opentype/hb-ot-layout-open-private.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pango/opentype/hb-ot-layout-open-private.h b/pango/opentype/hb-ot-layout-open-private.h
index 6a75eb1..76a5ade 100644
--- a/pango/opentype/hb-ot-layout-open-private.h
+++ b/pango/opentype/hb-ot-layout-open-private.h
@@ -470,9 +470,11 @@ struct OpenTypeFontFile
}
const OpenTypeFontFace& get_face (unsigned int i) const
{
- if (HB_UNLIKELY (i >= get_face_count ())) return Null(OpenTypeFontFace);
switch (tag) {
- default: /* Never happens because of the if above */
+ default: return Null(OpenTypeFontFace);
+ /* Note: for non-collection SFNT data we ignore index. This is because
+ * Apple dfont container is a container of SFNT's. So each SFNT is a
+ * non-TTC, but the index is more than zero. */
case TrueTypeTag: case CFFTag: return *(const OffsetTable*)this;
case TTCTag: return this+TTCHeader::get_for_data ((const char *) this).table[i];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]