On 05/31/2011 03:08 PM, Grigori Goronzy wrote:
>> Opened font file /home/greg/.fonts/meiryo.ttc: 9533888 bytes long
>> TrueType Collection of OpenType fonts
>> 0 font(s) found in file
>
I looked around a bit in the parser for TTC headers and there was a
stupid bug in it. ;) Fix attached.
Meiryo and Mincho work just fine now!
Best regards,
Grigori
>From 58d0ddbac47b8dbc6c483608cb1dd3c17565b96c Mon Sep 17 00:00:00 2001
From: Grigori Goronzy <greg@blackbox>
Date: Tue, 31 May 2011 15:22:33 +0200
Subject: [PATCH] Fix TTC parsing
---
src/hb-open-file-private.hh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
index b65e83f..32b5a53 100644
--- a/src/hb-open-file-private.hh
+++ b/src/hb-open-file-private.hh
@@ -152,7 +152,7 @@ struct TTCHeader
inline unsigned int get_face_count (void) const
{
- switch (u.header.version) {
+ switch (u.header.version >> 16) {
case 2: /* version 2 is compatible with version 1 */
case 1: return u.version1.get_face_count ();
default:return 0;
@@ -160,7 +160,7 @@ struct TTCHeader
}
inline const OpenTypeFontFace& get_face (unsigned int i) const
{
- switch (u.header.version) {
+ switch (u.header.version >> 16) {
case 2: /* version 2 is compatible with version 1 */
case 1: return u.version1.get_face (i);
default:return Null(OpenTypeFontFace);
--
1.7.2.3
_______________________________________________
HarfBuzz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/harfbuzz