* src/sfnt/ttcmap.c (code_to_index2): Handle code values with hi-byte == 0 correctly. * builds/link-std.mk ($(PROJECT_LIBRARY)): Fix typo.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
diff --git a/ChangeLog b/ChangeLog
index 6df13e4..14203e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-10 Yao Zhang <yzhang@sharemedia.com>
+
+ * src/sfnt/ttcmap.c (code_to_index2): Handle code values with
+ hi-byte == 0 correctly.
+
+2001-09-10 Werner Lemberg <wl@gnu.org>
+
+ * builds/link-std.mk ($(PROJECT_LIBRARY)): Fix typo.
+
2001-08-30 Martin Muskens <mmuskens@aurelon.com>
* src/type1/t1load.c (parse_font_matrix): A new way to compute the
diff --git a/builds/link_dos.mk b/builds/link_dos.mk
index b35115b..044a86b 100644
--- a/builds/link_dos.mk
+++ b/builds/link_dos.mk
@@ -34,7 +34,7 @@ ifdef BUILD_PROJECT
ifdef CLEAN_LIBRARY
-$(CLEAN_LIBRARY) $(NO_OUTPUT)
endif
- $(LINK_LIBRARY)
+ $(LINK_LIBRARY)
endif
diff --git a/builds/link_std.mk b/builds/link_std.mk
index 9cd6dba..193c342 100644
--- a/builds/link_std.mk
+++ b/builds/link_std.mk
@@ -32,9 +32,9 @@ ifdef BUILD_PROJECT
#
$(PROJECT_LIBRARY): $(OBJECTS_LIST)
ifdef CLEAN_LIBRARY
- -$(CLEAN_LIBRARY) xx $(NO_OUTPUT)
+ -$(CLEAN_LIBRARY) $(NO_OUTPUT)
endif
- $(LINK_LIBRARY)
+ $(LINK_LIBRARY)
endif
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 64dd3bb..b37faf4 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -503,28 +503,29 @@
{
/* an 8-bit character code -- we use the subHeader 0 in this case */
/* to test whether the character code is in the charmap */
- if ( cmap2->subHeaderKeys[char_lo] == 0 )
- result = cmap2->glyphIdArray[char_lo];
+ index1 = cmap2->subHeaderKeys[char_lo];
+ if ( index1 != 0 )
+ return 0;
}
else
{
/* a 16-bit character code */
index1 = cmap2->subHeaderKeys[char_hi & 0xFF];
- if ( index1 )
+ if ( index1 == 0 )
+ return 0;
+ }
+
+ sh2 = cmap2->subHeaders + index1;
+ char_lo -= sh2->firstCode;
+
+ if ( char_lo < (FT_UInt)sh2->entryCount )
+ {
+ offset = sh2->idRangeOffset / 2 + char_lo;
+ if ( offset < (FT_UInt)cmap2->numGlyphId )
{
- sh2 = cmap2->subHeaders + index1;
- char_lo -= sh2->firstCode;
-
- if ( char_lo < (FT_UInt)sh2->entryCount )
- {
- offset = sh2->idRangeOffset / 2 + char_lo;
- if ( offset < (FT_UInt)cmap2->numGlyphId )
- {
- result = cmap2->glyphIdArray[offset];
- if ( result )
- result = ( result + sh2->idDelta ) & 0xFFFF;
- }
- }
+ result = cmap2->glyphIdArray[offset];
+ if ( result )
+ result = ( result + sh2->idDelta ) & 0xFFFF;
}
}