Install freetype2.m4. * builds/unix/install.mk (install, uninstall): Handle it. Fix glyph indices for PFR driver. * src/pfr/pfrcmap.c (pfr_cmap_char_index, pfr_cmap_char_next): Increase return value by 1. * src/pfr/pfrobjs.c (pfr_slot_load): Decrease index by 1.
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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
diff --git a/ChangeLog b/ChangeLog
index 81fb718..cb1ef2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,18 @@
-2002-06-14 Detlef Würkner <TetiSoft@apg.lahn.de>
+2002-06-16 Anthony Fok <fok@debian.org>
+
+ Install freetype2.m4.
+
+ * builds/unix/install.mk (install, uninstall): Handle it.
+
+2002-06-16 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Same fix for PFR driver.
+
+ * src/pfr/pfrcmap.c (pfr_cmap_char_index, pfr_cmap_char_next):
+ Increase return value by 1.
+ * src/pfr/pfrobjs.c (pfr_slot_load): Decrease index by 1.
+
+2002-06-15 Detlef Würkner <TetiSoft@apg.lahn.de>
Fix glyph indices to make index zero always the undefined glyph.
diff --git a/builds/unix/install.mk b/builds/unix/install.mk
index add09b3..95b78e9 100644
--- a/builds/unix/install.mk
+++ b/builds/unix/install.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -21,7 +21,8 @@ install: $(PROJECT_LIBRARY)
$(includedir)/freetype2/freetype/config \
$(includedir)/freetype2/freetype/internal \
$(includedir)/freetype2/freetype/cache \
- $(bindir)
+ $(bindir) \
+ $(prefix)/share/aclocal
$(LIBTOOL) --mode=install $(INSTALL) $(PROJECT_LIBRARY) $(libdir)
-for P in $(PUBLIC_H) ; do \
$(INSTALL_DATA) $$P $(includedir)/freetype2/freetype ; \
@@ -38,6 +39,8 @@ install: $(PROJECT_LIBRARY)
$(INSTALL_DATA) $(BUILD)/ft2unix.h $(includedir)/ft2build.h
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
$(bindir)/freetype-config
+ $(INSTALL_SCRIPT) -m 644 $(BUILD)/freetype2.m4 \
+ $(prefix)/share/aclocal/freetype2.m4
uninstall:
@@ -53,6 +56,7 @@ uninstall:
-$(DELDIR) $(includedir)/freetype2
-$(DELETE) $(includedir)/ft2build.h
-$(DELETE) $(bindir)/freetype-config
+ -$(DELETE) $(prefix)/share/aclocal/freetype2.m4
check:
diff --git a/src/pfr/pfrcmap.c b/src/pfr/pfrcmap.c
index 9a8b98b..de6c5a0 100644
--- a/src/pfr/pfrcmap.c
+++ b/src/pfr/pfrcmap.c
@@ -71,7 +71,7 @@
gchar = cmap->chars + mid;
if ( gchar->char_code == char_code )
- return mid;
+ return mid + 1;
if ( gchar->char_code < char_code )
min = mid + 1;
@@ -107,7 +107,10 @@
{
result = mid;
if ( result != 0 )
+ {
+ result++;
goto Exit;
+ }
char_code++;
goto Restart;
@@ -127,7 +130,10 @@
gchar = cmap->chars + min;
result = min;
if ( result != 0 )
+ {
+ result++;
char_code = gchar->char_code;
+ }
}
}
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 8b1bf5e..f5af629 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -217,14 +217,17 @@
{
FT_Error error;
PFR_Face face = (PFR_Face)slot->root.face;
- PFR_Char gchar = face->phy_font.chars + gindex;
+ PFR_Char gchar;
FT_Outline* outline = &slot->root.outline;
FT_ULong gps_offset;
+ if (gindex > 0)
+ gindex--;
/* check that the glyph index is correct */
FT_ASSERT( gindex < face->phy_font.num_chars );
+ gchar = face->phy_font.chars + gindex;
slot->root.format = ft_glyph_format_outline;
outline->n_points = 0;
outline->n_contours = 0;