* src/bdf/descrip.mms, src/type42/descrip.mms: New files.

* descrip.mms (all): Updated.

* src/bdf/bdflib.c (_bdf_parse_glyphs): Fix typo which prevented
compilation.
* src/pshglob.c (psh_blues_scale_zones): Fix compiler warning.
This commit is contained in:
Werner Lemberg 2002-05-30 19:22:14 +00:00
parent d490e3734d
commit 5bbb494008
10 changed files with 206 additions and 84 deletions

View File

@ -1,3 +1,12 @@
2002-05-29 Werner Lemberg <wl@gnu.org>
* src/bdf/descrip.mms, src/type42/descrip.mms: New files.
* descrip.mms (all): Updated.
* src/bdf/bdflib.c (_bdf_parse_glyphs): Fix typo which prevented
compilation.
* src/pshglob.c (psh_blues_scale_zones): Fix compiler warning.
2002-05-28 Detlef Würkner <TetiSoft@apg.lahn.de> 2002-05-28 Detlef Würkner <TetiSoft@apg.lahn.de>
* builds/amiga/makefile, builds/amiga/smakefile, * builds/amiga/makefile, builds/amiga/smakefile,
@ -8,16 +17,16 @@
2005-05-28 David Turner <david@freetype.org> 2005-05-28 David Turner <david@freetype.org>
* docs/CHANGES: updating file for upcoming release (2.1.1) * docs/CHANGES: Updating file for next release (2.1.1).
* src/bdf/bdflib.c: removing compiler warnings * src/bdf/bdflib.c: Removing compiler warnings.
* include/freetype/ftxf86.h, src/base/ftxf86.c: New files. * include/freetype/ftxf86.h, src/base/ftxf86.c: New files.
They provad a new API (FT_Get_X11_Font_Format) an X11-compatible They provide a new API (FT_Get_X11_Font_Format) to retrieve an
string describing the font format of a given face. This was put in X11-compatible string describing the font format of a given face.
a new optional base source file, corresponding to a new public This was put in a new optional base source file, corresponding to a
header (named FT_XFREE86_H since this function should only be used new public header (named FT_XFREE86_H since this function should
within the XFree86 font server IMO). only be used within the XFree86 font server IMO).
* include/freetype/config/ftheader.h (FT_XFREE86_H): New macro (not * include/freetype/config/ftheader.h (FT_XFREE86_H): New macro (not
documented yet). documented yet).

View File

@ -36,6 +36,8 @@ all :
$(MMS)$(MMSQUALIFIERS) $(MMS)$(MMSQUALIFIERS)
set default [-.base] set default [-.base]
$(MMS)$(MMSQUALIFIERS) $(MMS)$(MMSQUALIFIERS)
set default [-.bdf]
$(MMS)$(MMSQUALIFIERS)
set default [-.cache] set default [-.cache]
$(MMS)$(MMSQUALIFIERS) $(MMS)$(MMSQUALIFIERS)
set default [-.cff] set default [-.cff]
@ -62,6 +64,8 @@ all :
$(MMS)$(MMSQUALIFIERS) $(MMS)$(MMSQUALIFIERS)
set default [-.type1] set default [-.type1]
$(MMS)$(MMSQUALIFIERS) $(MMS)$(MMSQUALIFIERS)
set default [-.type42]
$(MMS)$(MMSQUALIFIERS)
set default [-.winfonts] set default [-.winfonts]
$(MMS)$(MMSQUALIFIERS) $(MMS)$(MMSQUALIFIERS)
set default [--] set default [--]

View File

@ -2,52 +2,51 @@ LATEST CHANGES BETWEEN 2.1.1 and 2.1.0
I. IMPORTANT BUG FIXES I. IMPORTANT BUG FIXES
- the 'version_info' returned by "freetype-config" in 2.1.0 returned an - The `version_info' returned by `freetype-config' in 2.1.0 returned an
invalid value. It now returns 9:1:3 (2.0.9 returned 9:0:3) invalid value. It now returns 9:1:3 (2.0.9 returned 9:0:3).
- 2.1.0 couldn't be linked against applications on Win32 and Amiga - Version 2.1.0 couldn't be linked against applications on Win32 and
systems, due to a new debug function that wasn't properly propagated Amiga systems due to a new debug function that wasn't properly
to the system-specific directory in 'builds'. propagated to the system-specific directory in `builds'.
- various MacOS and Mac OS X specific fixes - Various MacOS and Mac OS X specific fixes.
- fixed a bug in the TrueType charmap validation routines that made - Fixed a bug in the TrueType charmap validation routines that made
2.1.0 over-restrictive over the fonts it could accept. version 2.1.0 too restrictive -- many popular fonts have been
rejected.
- surprisingly, there was still a very small difference between the - There was still a very small difference between the monochrome glyph
monochrome glyph bitmaps produced by FT 1.x and FT 2.x with the bitmaps produced by FreeType 1.x and FreeType 2.x with the bytecode
bytecode interpreter enabled. This was caused by an invalid flag interpreter enabled. This was caused by an invalid flag setting in
setting in the TrueType glyph loader that caused the rasterizer to the TrueType glyph loader, making the rasterizer change its drop-out
change its drop-out control mode. This is now fixed, and results control mode. Now theresults should _really_ be completely identical.
should _really_ be 100% identical
- the TrueType name table loader has been improved to support many - The TrueType name table loader has been improved to support many
popular though buggy Asian fonts. It now ignores empty name entries, popular though buggy Asian fonts. It now ignores empty name entries,
invalid pointer offsets and a few other sad things. Moreover, name invalid pointer offsets and a few other incorrect subtleties.
strings are now loaded on demand, which reduces the memory load of Moreover, name strings are now loaded on demand, which reduces the
many faces (e.g. the ARIAL.TTF font file contains a 10Kb name table memory load of many faces (e.g. the ARIAL.TTF font file contains a
containing 70 names) 10kByte name table with 70 names).
- fixed a bug in the Postscript hinter that prevented family blues - Fixed a bug in the Postscript hinter that prevented family blues
substitution to happen correctly. substitution to happen correctly.
II. NEW FEATURES II. NEW FEATURES
- Three new font drivers in this release !! - Three new font drivers in this release:
* a BDF font driver, contributed by Franco Narda Zapelli, and * A BDF font driver, contributed by Franco Narda Zapelli, heavily
heavily modified by Werner Lemberg, it also supports anti-aliased modified by Werner Lemberg. It also supports anti-aliased bitmaps
bitmaps (using a slightly extended BDF format).
* a Type42 font driver, contributed by ..... This one is still * A Type42 font driver, contributed by Roberto Alameda. It is
experimental but seems to work relatively well but lacks some still experimental but seems to work relatively well. Currently,
charmap support for now charmap support is not fully implemented.
* a PFR font driver, contributed by David Turner himself. It doesn't
support PFR hinting Beware that BitStream has at least two patents
on this format !!
* A PFR font driver, contributed by David Turner himself. It doesn't
support PFR hinting -- note that BitStream has at least two patents
on this format!
======================================================================== ========================================================================

View File

@ -1,5 +1,23 @@
#ifndef __FT_XFREE86_H__ /***************************************************************************/
#define __FT_XFREE86_H__ /* */
/* ftxf86.h */
/* */
/* Support functions for X11. */
/* */
/* Copyright 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef __FTXF86_H__
#define __FTXF86_H__
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
@ -15,21 +33,21 @@ FT_BEGIN_HEADER
/* FT_Get_X11_Font_Format */ /* FT_Get_X11_Font_Format */
/* */ /* */
/* <Description> */ /* <Description> */
/* Returns a string describing the format of a given face as a X11 */ /* Return a string describing the format of a given face as an X11 */
/* FONT_PROPERTY. It should only be used by FreeType 2 font backend */ /* FONT_PROPERTY. It should only be used by the FreeType 2 font */
/* of the XFree86 font server. */ /* backend of the XFree86 font server. */
/* */ /* */
/* <Input> */ /* <Input> */
/* face :: input face handle. */ /* face :: Input face handle. */
/* */ /* */
/* <Return> */ /* <Return> */
/* font format string. NULL in case of error. */ /* Font format string. NULL in case of error. */
/* */ /* */
FT_EXPORT_DEF( const char* ) FT_EXPORT_DEF( const char* )
FT_Get_X11_Font_Format( FT_Face face ); FT_Get_X11_Font_Format( FT_Face face );
/* */ /* */
FT_END_HEADER FT_END_HEADER
#endif /* __FT_XFREE86_H__ */ #endif /* __FTXF86_H__ */

View File

@ -1,34 +1,53 @@
/***************************************************************************/
/* */
/* fttype1.c */
/* */
/* FreeType utility file for PS names support (body). */
/* */
/* Copyright 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#include <ft2build.h> #include <ft2build.h>
#include FT_INTERNAL_TYPE1_TYPES_H #include FT_INTERNAL_TYPE1_TYPES_H
#include FT_INTERNAL_OBJECTS_H #include FT_INTERNAL_OBJECTS_H
/* case a FT_Face to a T1_Face when relevant */
/* this implementation sucks, but a lot of things should change in the */ /* Cast a FT_Face to a T1_Face if necessary. */
/* future anyway.. */ /* This implementation sucks, but a lot of things should change in the */
/* */ /* future anyway... */
/* */
static T1_Face static T1_Face
t1_face_check_cast( FT_Face face ) t1_face_check_cast( FT_Face face )
{ {
FT_Module driver; FT_Module driver;
T1_Face result = NULL; T1_Face result = NULL;
if ( face && face->driver != NULL ) if ( face && face->driver != NULL )
{ {
driver = (FT_Module) face->driver; driver = (FT_Module)face->driver;
if ( driver->clazz && driver->clazz->module_name && if ( driver->clazz && driver->clazz->module_name &&
ft_strcmp( driver->clazz->module_name, "type1" ) == 0 ) ft_strcmp( driver->clazz->module_name, "type1" ) == 0 )
{ {
/* correct typecast ! */ /* correct typecast! */
result = (T1_Face) face; result = (T1_Face)face;
} }
} }
return result; return result;
} }
/* documentation is in t1tables.h */
/* documentation is in t1tables.h */
FT_EXPORT_DEF( FT_Error ) FT_EXPORT_DEF( FT_Error )
FT_Get_PS_Font_Info( FT_Face face, FT_Get_PS_Font_Info( FT_Face face,
@ -37,38 +56,45 @@
FT_Error error = FT_Err_Invalid_Argument; FT_Error error = FT_Err_Invalid_Argument;
T1_Face t1_face = t1_face_check_cast( face ); T1_Face t1_face = t1_face_check_cast( face );
if ( t1_face != NULL ) if ( t1_face != NULL )
{ {
*afont_info = t1_face->type1.font_info; *afont_info = t1_face->type1.font_info;
error = FT_Err_Ok; error = FT_Err_Ok;
} }
return error; return error;
} }
/* XXX: bad hack, but I didn't want to change several drivers here */ /* XXX: Bad hack, but I didn't want to change several drivers here. */
/* documentation is in t1tables.h */ /* documentation is in t1tables.h */
FT_EXPORT_DEF( FT_Int ) FT_EXPORT_DEF( FT_Int )
FT_Has_PS_Glyph_Names( FT_Face face ) FT_Has_PS_Glyph_Names( FT_Face face )
{ {
FT_Int result = 0; FT_Int result = 0;
const char* driver_name; const char* driver_name;
if ( face && face->driver && face->driver->root.clazz ) if ( face && face->driver && face->driver->root.clazz )
{ {
/* for now, only the type1 and cff drivers provide reliable */ /* Currently, only the type1 and cff drivers provide reliable */
/* glyph names... */ /* glyph names... */
/* we could probably hack the TrueType driver to recognize */ /* We could probably hack the TrueType driver to recognize */
/* certain cases where the glyph names are most certainly */ /* certain cases where the glyph names are most certainly */
/* correct (e.g. using a 20 or 22 format 'post' table), but */ /* correct (e.g. using a 20 or 22 format `post' table), but */
/* this will probably happen later... :-) */ /* this will probably happen later... */
driver_name = face->driver->root.clazz->module_name; driver_name = face->driver->root.clazz->module_name;
result = ( ft_strcmp( driver_name, "type1" ) || result = ( ft_strcmp( driver_name, "type1" ) ||
ft_strcmp( driver_name, "cff" ) ); ft_strcmp( driver_name, "cff" ) );
} }
return result; return result;
} }
/* END */

View File

@ -1,12 +1,30 @@
/***************************************************************************/
/* */
/* ftxf86.c */
/* */
/* FreeType utility file for X11 support (body). */
/* */
/* Copyright 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#include <ft2build.h> #include <ft2build.h>
#include FT_XFREE86_H #include FT_XFREE86_H
#include FT_INTERNAL_OBJECTS_H #include FT_INTERNAL_OBJECTS_H
/* XXX: this really is a sad hack, but I didn't want to change every */ /* XXX: This really is a sad hack, but I didn't want to change every */
/* driver just to support this at the moment, since other important */ /* driver just to support this at the moment, since other important */
/* changes are coming anyway !! */ /* changes are coming anyway. */
typedef struct typedef struct FT_FontFormatRec_
{ {
const char* driver_name; const char* driver_name;
const char* format_name; const char* format_name;
@ -15,7 +33,7 @@
FT_EXPORT_DEF( const char* ) FT_EXPORT_DEF( const char* )
FT_Get_X11_Font_Format( FT_Face face ) FT_Get_X11_Font_Format( FT_Face face )
{ {
static const FT_FontFormatRec font_formats[] = static const FT_FontFormatRec font_formats[] =
{ {
@ -35,11 +53,14 @@
if ( face && face->driver ) if ( face && face->driver )
{ {
FT_Module driver = (FT_Module) face->driver; FT_Module driver = (FT_Module)face->driver;
if ( driver->clazz && driver->clazz->module_name ) if ( driver->clazz && driver->clazz->module_name )
{ {
FT_Int n, count = sizeof(font_formats)/sizeof(font_formats[0]); FT_Int n;
FT_Int count = sizeof( font_formats ) / sizeof ( font_formats[0] );
result = driver->clazz->module_name; result = driver->clazz->module_name;
@ -54,3 +75,6 @@
return result; return result;
} }
/* END */

View File

@ -1740,10 +1740,6 @@
/* the scalable width from the device width. */ /* the scalable width from the device width. */
FT_TRACE2(( "_bdf_parse_glyphs: " ACMSG9, lineno )); FT_TRACE2(( "_bdf_parse_glyphs: " ACMSG9, lineno ));
ps = (double)font->point_size;
rx = (double)font->resolution_x;
dw = (double)glyph->dwidth;
glyph->swidth = (unsigned short)FT_MulDiv( glyph->swidth = (unsigned short)FT_MulDiv(
glyph->dwidth, 72000L, glyph->dwidth, 72000L,
(FT_Long)( font->point_size * (FT_Long)( font->point_size *

23
src/bdf/descrip.mms Normal file
View File

@ -0,0 +1,23 @@
#
# FreeType 2 BDF driver compilation rules for VMS
#
# Copyright 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bdf])
OBJS=bdf.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
# EOF

View File

@ -488,14 +488,14 @@
for ( ; count2 > 0; count2--, zone2++ ) for ( ; count2 > 0; count2--, zone2++ )
{ {
FT_Pos delta; FT_Pos Delta;
delta = zone1->org_ref - zone2->org_ref; Delta = zone1->org_ref - zone2->org_ref;
if ( delta < 0 ) if ( Delta < 0 )
delta = -delta; Delta = -Delta;
if ( FT_MulFix( delta, scale ) < 64 ) if ( FT_MulFix( Delta, scale ) < 64 )
{ {
zone1->cur_top = zone2->cur_top; zone1->cur_top = zone2->cur_top;
zone1->cur_bottom = zone2->cur_bottom; zone1->cur_bottom = zone2->cur_bottom;

23
src/type42/descrip.mms Normal file
View File

@ -0,0 +1,23 @@
#
# FreeType 2 Type 42 driver compilation rules for VMS
#
# Copyright 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type42])
OBJS=t42drivr.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
# EOF