* 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'.
This commit is contained in:
Werner Lemberg 2001-01-01 17:25:21 +00:00
parent a9f3ccb523
commit 389acc625e
6 changed files with 95 additions and 18 deletions

View File

@ -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.

View File

@ -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.
#

View File

@ -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)

View File

@ -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

View File

@ -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 */

View File

@ -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;