* src/pcf/*: New driver module for PCF font format (used in X Windows). * include/freetype/internal/ftdebug.h (FT_Trace): Added values for PCF driver. * include/freetype/internal/pcftypes.h: New file. * include/freetype/config/ftmodule.h: Added PCF driver module. * src/winfonts/winfnt.c (FNT_Get_Char_Index): Fix parameter type. * builds/modules.mk (clean_module_list): Fixed deletion of module file in case `make make_module_list' is called before `make setup'.
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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
diff --git a/ChangeLog b/ChangeLog
index 9cbcc3f..1f7d0a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2001-01-01 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr>
+
+ * src/pcf/*: New driver module for PCF font format (used in
+ X Windows).
+ * include/freetype/internal/ftdebug.h (FT_Trace): Added values for
+ PCF driver.
+ * include/freetype/internal/pcftypes.h: New file.
+ * include/freetype/config/ftmodule.h: Added PCF driver module.
+
+2001-01-01 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Get_Char_Index): Fix parameter type.
+
+2000-12-31 Werner Lemberg <wl@gnu.org>
+
+ * builds/modules.mk (clean_module_list): Fixed deletion of module
+ file in case `make make_module_list' is called before `make setup'.
+
2000-12-30 Werner Lemberg <wl@gnu.org>
* src/cff/cffload.c (CFF_Load_Charset): Improved error messages.
diff --git a/builds/modules.mk b/builds/modules.mk
index 59f1223..3f911de 100644
--- a/builds/modules.mk
+++ b/builds/modules.mk
@@ -32,32 +32,32 @@ endif
# To build the modules list, we invoke the `make_module_list' target.
#
# This rule is commented out by default since FreeType comes already with
-# a ftmodule.h file.
+# an ftmodule.h file.
#
#$(MODULE_LIST): make_module_list
+
+ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
+ OPEN_MODULE := @echo$(space)
+ CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
+ REMOVE_MODULE := @-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
+else
+ OPEN_MODULE := @echo "
+ CLOSE_MODULE := " >> $(MODULE_LIST)
+ REMOVE_MODULE := @-$(DELETE) $(MODULE_LIST)
+endif
+
+
# Before the modules list file can be generated, we must remove the file in
# order to `clean' the list.
#
clean_module_list:
- @-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
+ $(REMOVE_MODULE)
@-echo Regenerating the modules list in $(MODULE_LIST)...
make_module_list: clean_module_list
@echo done.
-
-# Trailing spaces are protected with a `#' sign to avoid accidental
-# removing.
-#
-ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
- OPEN_MODULE := @echo$(space)
- CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
-else
- OPEN_MODULE := @echo "
- CLOSE_MODULE := " >> $(MODULE_LIST)
-endif
-
# $(OPEN_DRIVER) & $(CLOSE_DRIVER) are used to specify a given font driver
# in the `module.mk' rules file.
#
diff --git a/include/freetype/config/ftmodule.h b/include/freetype/config/ftmodule.h
index 8a9ea0a..eb35a32 100644
--- a/include/freetype/config/ftmodule.h
+++ b/include/freetype/config/ftmodule.h
@@ -1,6 +1,7 @@
FT_USE_MODULE(autohint_module_class)
FT_USE_MODULE(cff_driver_class)
FT_USE_MODULE(t1cid_driver_class)
+FT_USE_MODULE(pcf_driver_class)
FT_USE_MODULE(psaux_module_class)
FT_USE_MODULE(psnames_module_class)
FT_USE_MODULE(ft_raster1_renderer_class)
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index 0ab4c33..d42e7f0 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -99,6 +99,10 @@ FT_BEGIN_HEADER
/* Windows fonts component */
trace_winfnt,
+ /* PCF fonts component */
+ trace_pcfdriver,
+ trace_pcfread,
+
/* the last level must always be `trace_max' */
trace_max
diff --git a/include/freetype/internal/pcftypes.h b/include/freetype/internal/pcftypes.h
new file mode 100644
index 0000000..8febb26
--- /dev/null
+++ b/include/freetype/internal/pcftypes.h
@@ -0,0 +1,54 @@
+/* pcftypes.h
+
+ FreeType font driver for pcf fonts
+
+ Copyright (C) 2000 by
+ Francesco Zappa Nardelli
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#ifndef __PCFTYPES_H__
+#define __PCFTYPES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+ typedef struct PCF_Public_FaceRec_
+ {
+ FT_FaceRec root;
+
+ char* charset_encoding;
+ char* charset_registry;
+
+ } PCF_Public_FaceRec, *PCF_Public_Face;
+
+
+FT_END_HEADER
+
+#endif /* __PCFTYPES_H__ */
+
+
+/* END */
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 210c15a..d1d5326 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -469,16 +469,16 @@
static
FT_UInt FNT_Get_Char_Index( FT_CharMap charmap,
- FT_ULong char_code )
+ FT_Long char_code )
{
- FT_UInt result = char_code;
+ FT_Long result = char_code;
if ( charmap )
{
FNT_Font* font = ((FNT_Face)charmap->face)->fonts;
- FT_UInt first = font->header.first_char;
- FT_UInt count = font->header.last_char - first + 1;
+ FT_Long first = font->header.first_char;
+ FT_Long count = font->header.last_char - first + 1;
char_code -= first;