* src/cid/cidobjs.c (CID_Size_Init): Renamed to...

(cid_size_init): This.
* src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to...
(t1_builder_add_point1): This.

Updated all affected code.

* src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings.
* src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto.

Formatting, minor doc fixes.
This commit is contained in:
Werner Lemberg 2002-09-05 15:10:54 +00:00
parent 08840150b7
commit 6b5c669b7b
33 changed files with 1029 additions and 846 deletions

238
ChangeLog
View File

@ -1,56 +1,198 @@
2002-09-05 Werner Lemberg <wl@gnu.org>
* src/cid/cidobjs.c (CID_Size_Init): Renamed to...
(cid_size_init): This.
* src/psaux/psobjs.c (T1_Builder_Add_Point1): Renamed to...
(t1_builder_add_point1): This.
Updated all affected code.
* src/pshinter/pshalgo3.c (psh3_hint_align): Fix compiler warnings.
* src/type1/t1gload.c (T1_Compute_Max_Advance): Ditto.
2002-09-04 David Turner <david@freetype.org> 2002-09-04 David Turner <david@freetype.org>
* include/freetype/freetype.h: corrected the definition of * include/freetype/freetype.h: Corrected the definition of
ft_encoding_symbol to be FT_ENCODING_MS_SYMBOL (instead of ft_encoding_symbol to be FT_ENCODING_MS_SYMBOL (instead of
the erroneous FT_ENCODING_SYMBOL) the erroneous FT_ENCODING_SYMBOL).
* builds/unix/unix-def.in: added "datadir" definition
(thanks to Anthony Fok)
* builds/unix/unix-def.in (datadir): Initialize it (thanks to
Anthony Fok).
2002-08-29 David Turner <david@freetype.org> 2002-08-29 David Turner <david@freetype.org>
* src/pshinter/pshalgo.c: slight modification to the Postscript hinter Slight modification to the Postscript hinter to slightly increase
to slightly increase the contrast of smooth hinting. This is very similar the contrast of smooth hinting. This is very similar to what the
to what the auto-hinter does when it comes to stem width computations. auto-hinter does when it comes to stem width computations. However,
However, it produces better results with well-hinted fonts.. it produces better results with well-hinted fonts.
* README, docs/CHANGES: updating for the 2.1.3 release * include/freetype/internal/psaux.h (T1_Decoder_FuncsRec): Add hint
mode to `init' member function.
(T1_DecoderRec): Add hint mode.
* include/freetype/internal/pshints (T1_Hints_ApplyFunc,
T2_Hints_ApplyFunc): Pass `hint_mode', not `hint_flags'.
* src/psaux/t1decode.c (t1_decoder_init): Add hint mode argument.
* src/pshinter/pshalgo1.c (ps1_hints_apply): Pass hint mode, not
hint flags.
* src/pshinter/pshalgo2.c (ps2_hints_apply): Ditto.
* src/pshinter/pshalgo3.c (ps3_hints_apply): Ditto.
(STRONGER): New macro.
(psh3_hint_align, psh3_hint_table_align_hints): Pass `glyph' instead
of `hint_flags'.
Implement announced changes.
* src/pshinter/pshalgo3.h (PSH3_GlyphRec): Add flags to control
vertical and horizontal hints and snapping.
* README, docs/CHANGES: Updating for the 2.1.3 release.
2002-08-27 David Turner <david@freetype.org> 2002-08-27 David Turner <david@freetype.org>
* massive re-formatting changes to many, many source files. I don't * Massive re-formatting changes to many, many source files. I don't
want to list them all here. The operations performed were all logical want to list them all here. The operations performed were all
transformations of the sources: logical transformations of the sources:
- trying to convert all enums and constants to CAPITALIZED_STYLE, with - trying to convert all enums and constants to CAPITALIZED_STYLE,
#define definitions like #with define definitions like
#define my_old_constants MY_NEW_CONSTANT #define my_old_constants MY_NEW_CONSTANT
- big, big update of the documentation comments - big, big update of the documentation comments
* include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c, * include/freetype/freetype.h, src/base/ftobjs.c,
include/freetype/ftimage.h: adding support for LCD-optimized rendering src/smooth/ftsmooth.c, include/freetype/ftimage.h: Adding support
though the new constants/enums: for LCD-optimized rendering though the new constants/enums:
FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V FT_PIXEL_MODE_LCD, FT_PIXEL_MODE_LCD_V
this is still work in progress, don't expect everything to work correctly This is still work in progress, don't expect everything to work
though most of the features have been implemented. correctly though most of the features have been implemented.
* adding new FT_LOAD_XXX flags, used to specify both hinting and rendering * Adding new FT_LOAD_XXX flags, used to specify both hinting and
targets: rendering targets:
FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
FT_LOAD_TARGET_MONO :: monochrome bitmaps FT_LOAD_TARGET_MONO :: monochrome bitmaps
FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated hinting & rendering FT_LOAD_TARGET_LCD :: horizontal RGB/BGR decimated
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated hinting & rendering hinting & rendering
FT_LOAD_TARGET_LCD_V :: vertical RGB/BGR decimated
hinting & rendering
note that FT_LOAD_TARGET_NORMAL is 0, which means that the default Note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
behaviour of the font engine is _unchanged_. behaviour of the font engine is _unchanged_.
* include/freetype/ftimage.h
(FT_Outline_{Move,Line,Conic,Cubic}To_Func): Renamed to...
(FT_Outline_{Move,Line,Conic,Cubic}ToFunc): This.
(FT_Raster_Span_Func): Renamed to ...
(FT_SpanFunc): This.
(FT_Raster_{New,Done,Reset,Set_Mode,Render}_Func): Renamed to ...
(FT_Raster_{New,Done,Reset,SetMode,Render}Func}: This.
Updated all affected code.
* include/freetype/ftrender.h
(FT_Glyph_{Init,Done,Transform,BBox,Copy,Prepare}_Func): Renamed
to ...
(FT_Glyph_{Init,Done,Transform,GetBBox,Copy,Prepare}Func): This.
(FTRenderer_{render,transform,getCBox,setMode}): Renamed to ...
(FT_Renderer_{RenderFunc,TransformFunc,GetCBoxFunc,SeteModeFunc}):
This.
Updated all affected code.
* src/autohint/ahtypes.h (AH_Point, AH_Segment, AH_Edge, AH_Globals,
AH_Face_Globals, AH_Outline, AH_Hinter): These typedefs are now
pointers to the corresponding `*Rec' structures. All source files
have been updated accordingly.
* src/cff/cffgload.c (cff_decoder_init): Add hint mode as parameter.
* src/cff/cffgload.h (CFF_Decoder): Add `hint_mode' element.
* src/cid/cidgload.c (CID_Compute_Max_Advance): Renamed to...
(cid_face_compute_max_advance): This.
(CID_Load_Glyph): Renamed to...
(cid_slot_load_glyph): This.
* src/cid/cidload.c (CID_Open_Face): Renamed to...
(cid_face_open): This.
* src/cid/cidobjs.c (CID_GlyphSlot_{Done,Init}): Renamed to...
(cid_slot_{done,init}): This.
(CID_Size_{Get_Globals_Funcs,Done,Reset): Renamed to...
(cid_size_{get_globals_funcs,done,reset): This.
(CID_Face_{Done,Init}): Renamed to...
(cid_face_{done,init}): This.
(CID_Driver_{Done,Init}: Renamed to...
(cid_driver_{done,init}: This.
* src/cid/cidparse.c (CID_{New,Done}_Parser): Renamed to...
(cid_parser_{new,done}): This.
* src/cid/cidparse.h (CID_Skip_{Spaces,Alpha}): Renamed to...
(cid_parser_skip_{spaces,alpha}): This.
(CID_To{Int,Fixed,CoordArray,FixedArray,Token,TokenArray}): Renamed
to...
(cid_parser_to_{int,fixed,coord_array,fixed_array,token,token_array}):
This.
(CID_Load_{Field,Field_Table): Renamed to...
(cid_parser_load_{field,field_table}): This.
* src/cid/cidriver.c (CID_Get_Interface): Renamed to...
(cid_get_interface): This.
Updated all affected code.
* src/psaux/psobjs.c (PS_Table_*): Renamed to...
(ps_table_*): This.
(T1_Builder_*): Renamed to...
(t1_builder_*): This.
* src/psaux/t1decode.c (T1_Decoder_*): Renamed to...
(t1_decoder_*): This.
* src/psnames/psmodule.c (PS_*): Renamed to...
(ps_*): This.
Updated all affected code.
* src/sfnt/sfdriver (SFNT_Get_Interface): Renamed to...
(sfnt_get_interface): This.
* src/sfnt/sfobjs.c (SFNT_*): Renamed to...
(sfnt_*): This.
* src/sfnt/ttcmap.c (TT_CharMap_{Load,Free}): Renamed to...
(tt_face_{load,free}_charmap): This.
* src/sfnt/ttcmap0.c (TT_Build_CMaps): Renamed to...
(tt_face_build_cmaps): This.
* src/sfnt/ttload.c (TT_*): Renamed to...
(tt_face_*): This.
* src/sfnt/ttpost.c (TT_Post_Default_Names): Renamed to...
(tt_post_default_names): This.
(Load_*): Renamed to...
(load_*): This.
(TT_*): Renamed to...
(tt_face_*): This.
* src/sfnt/ttsbit.c (TT_*): Renamed to...
(tt_face_*): This.
({Find,Load,Crop}_*): Renamed to...
({find,load,crop}_*): This.
Updated all affected code.
* src/smooth/ftsmooth.c (ft_smooth_render): Renamed to...
(ft_smooth_render_generic): This.
Make function more generic by adding vertical and horizontal scaling
factors.
(ft_smooth_render, ft_smooth_render_lcd, ft_smooth_render_lcd_v):
New functions.
(ft_smooth_locd_renderer_class, ft_smooth_lcdv_renderer_class): New
classes.
* src/truetype/ttobjs.c (TT_{Done,New}_GlyphZone): Renamed to...
(tt_glyphzone_{done,new}): This.
(TT_{Face,Size,Driver}_*): Renamed to...
(tt_{face,size,driver}_*): This.
* src/truetype/ttpload.c (TT_Load_Locations): Renamed to...
(tt_face_load_loca): This.
(TT_Load_Programs): Renamed to...
(tt_face_load_fpgm): This.
(TT_*): Renamed to...
(tt_face_*): This.
2002-08-27 Werner Lemberg <wl@gnu.org> 2002-08-27 Werner Lemberg <wl@gnu.org>
@ -58,28 +200,26 @@
2002-08-23 Graham Asher <graham.asher@btinternet.com> 2002-08-23 Graham Asher <graham.asher@btinternet.com>
* /src/cff/cffgload.c (cff_operator_seac) * src/cff/cffgload.c (cff_operator_seac)
[FT_CONFIG_OPTION_INCREMENTAL] incremental fonts (actually [FT_CONFIG_OPTION_INCREMENTAL]: Incremental fonts (actually not
not incremental in the case of CFF but just using callbacks incremental in the case of CFF but just using callbacks to get glyph
to get glyph recipes) pass the character code, not the glyph recipes) pass the character code, not the glyph index, to the
index, to the get_glyph_data function; they have no get_glyph_data function; they have no valid charset table.
valid charset table.
* /src/cff/cffload.c (cff_font_load) removed special cases * src/cff/cffload.c (cff_font_load): Removed special cases for
for FT_CONFIG_OPTION_INCREMENTAL, which are no longer FT_CONFIG_OPTION_INCREMENTAL, which are no longer necessary; CFF
necessary; CFF fonts provided via the incremental interface fonts provided via the incremental interface now have to conform
now have to conform more closely to the CFF font format. more closely to the CFF font format.
* /src/cff/cffload.h (cff_font_load declaration) * src/cff/cffload.h (cff_font_load): Removed argument now unneeded.
removed argument now unneeded.
* /src/cff/cffobjs.c (cff_face_init) changed call to * src/cff/cffobjs.c (cff_face_init): Changed call to cff_font_load
cff_font_load to conform with new signature. to conform with new signature.
2002-08-22 David Turner <david@freetype.org> 2002-08-22 David Turner <david@freetype.org>
* src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c, * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c,
src/bdf/bdfdrivr.c: removed compiler warnings src/bdf/bdfdrivr.c: Removed compiler warnings.
2002-08-21 Werner Lemberg <wl@gnu.org> 2002-08-21 Werner Lemberg <wl@gnu.org>

View File

@ -6,72 +6,69 @@ LATEST CHANGES BETWEEN 2.1.3 and 2.1.2
in incorrect transformations being applied (for example, rotations in incorrect transformations being applied (for example, rotations
were processed in opposite angles). were processed in opposite angles).
- the format 8 and 12 TrueType charmap enumeration routines have been - The format 8 and 12 TrueType charmap enumeration routines have been
fixed (FT_Get_Next_Char returned invalid values) fixed (FT_Get_Next_Char returned invalid values).
- the PFR font driver returned incorrect advance widths when the - The PFR font driver returned incorrect advance widths if the outline
outline and metrics resolution defined in the font file were and metrics resolution defined in the font file were different.
different
- FT_Glyph_To_Bitmap now returnes succesfully when called with - FT_Glyph_To_Bitmap now returns successfully when called with an
a FT_BitmapGlyph argument (it previously returned an error) FT_BitmapGlyph argument (it previously returned an error).
- A bug in the Type 1 loader that prevented valid font bounding - A bug in the Type 1 loader that prevented valid font bounding boxes to
boxes to be loaded from multiple master fonts. be loaded from multiple master fonts.
- the SFNT validation code was rewritten. FreeType can now load - The SFNT validation code has been rewritten. FreeType can now load
"broken" fonts that were usable on Windows, but not with previous "broken" fonts that were usable on Windows, but not with previous
versions of the library versions of the library.
- the computation of bearings in the BDF driver has been fixed - The computation of bearings in the BDF driver has been fixed.
II. MISCELLANEOUS II. MISCELLANEOUS
- the automatic and postscript hinters have both been updated. This - The automatic and postscript hinters have both been updated. This
results in a relatively important increase of rendering quality results in a relatively important increase of rendering quality since
since many nasty defaults have been supressed. many nasty defaults have been supressed.
- a new, experimental, support for incremental font loading (i.e. - A new, experimental, support for incremental font loading (i.e.,
loading of fonts where the glyphs are not in the font file itself, loading of fonts where the glyphs are not in the font file itself, but
but provided by an external component, like a Postscript interpreter) provided by an external component, like a Postscript interpreter) has
has been added by Graham Asher. This is still work in progress been added by Graham Asher. This is still work in progress, however.
however.
- a new, experimental, path stroker has been added. It doesn't suffer - A new, experimental, path stroker has been added. It doesn't suffer
from sever rounding errors, and treat bezier arcs directly. Still from severe rounding errors, and treat bezier arcs directly. Still
work in progress work in progress.
- the massive re-formatting of sources and internal re-design is still - The massive re-formatting of sources and internal re-design is still
under-way. Many internal functions, constants, and types have been under-way. Many internal functions, constants, and types have been
renamed. renamed.
- the "load_flags" parameter of FT_Load_Glyph is now a FT_Int32 - The "load_flags" parameter of FT_Load_Glyph is now an FT_Int32
(instead of just being an FT_Int). This breaks source and binary (instead of just being an FT_Int). This breaks source and binary
compatibility for 16bit systems only, while retaining both of them compatibility for 16bit systems only, while retaining both of them for
for 32 and 64 bit ones. 32 and 64 bit ones.
some new flags have been added consequently: Some new flags have been added consequently:
FT_LOAD_NO_AUTOHINT :: disable the use of the auto-hinter FT_LOAD_NO_AUTOHINT :: Disable the use of the auto-hinter
(but not native format hinters) (but not native format hinters).
FT_LOAD_TARGET_NORMAL :: hint and render for normal anti-aliased FT_LOAD_TARGET_NORMAL :: Hint and render for normal anti-aliased
displays displays.
FT_LOAD_TARGET_MONO :: hint and render for 1-bit displays FT_LOAD_TARGET_MONO :: Hint and render for 1-bit displays.
FT_LOAD_TARGET_LCD :: hint and render for horizontal RGB or BGR FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or BGR
sub-pixel displays (like LCD screens). sub-pixel displays (like LCD screens).
THIS IS STILL EXPERIMENTAL THIS IS STILL EXPERIMENTAL!
FT_LOAD_TARGET_LCD_V :: same a FT_LOAD_TARGET_LCD, for vertical FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for vertical
sub-pixel displays (like rotated LCD screens) sub-pixel displays (like rotated LCD
THIS IS STILL EXPERIMENTAL screens). THIS IS STILL EXPERIMENTAL!
FT_LOAD_MONOCHROME is still supported, but only affects
rendering, not the hinting.
FT_LOAD_MONOCHROME is still supported, but only affects rendering, not
the hinting.
======================================================================== ========================================================================

View File

@ -403,17 +403,17 @@ FT_BEGIN_HEADER
/* should redefine this macro in case of problems to something like */ /* should redefine this macro in case of problems to something like */
/* this: */ /* this: */
/* */ /* */
/* #define FT_ENC_TAG( value, _x1, _x2, _x3, _x4 ) (value) */ /* #define FT_ENC_TAG( value, a, b, c, d ) (value) */
/* */ /* */
/* to get a simple enumeration without assigning special numbers. */ /* to get a simple enumeration without assigning special numbers. */
/* */ /* */
#ifndef FT_ENC_TAG #ifndef FT_ENC_TAG
#define FT_ENC_TAG(value,a,b,c,d) \ #define FT_ENC_TAG( value, a, b, c, d ) \
value = ( ( (FT_UInt32)(a) << 24 ) | \ value = ( ( (FT_UInt32)(a) << 24 ) | \
( (FT_UInt32)(b) << 16 ) | \ ( (FT_UInt32)(b) << 16 ) | \
( (FT_UInt32)(c) << 8 ) | \ ( (FT_UInt32)(c) << 8 ) | \
(FT_UInt32)(d) ) (FT_UInt32)(d) )
#endif /* FT_ENC_TAG */ #endif /* FT_ENC_TAG */
@ -433,88 +433,85 @@ FT_BEGIN_HEADER
/* */ /* */
/* The values of this type correspond to specific character */ /* The values of this type correspond to specific character */
/* repertories (i.e. charsets), and not to text encoding methods */ /* repertories (i.e. charsets), and not to text encoding methods */
/* (like UTF-8, UTF-16, GB2312_EUC, etc...) */ /* (like UTF-8, UTF-16, GB2312_EUC, etc.). */
/* */ /* */
/* Other encodings might be defined in the future. */ /* Other encodings might be defined in the future. */
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_ENCODING_NONE :: */ /* FT_ENCODING_NONE :: */
/* the encoding value 0 is reserved. */ /* The encoding value 0 is reserved. */
/* */ /* */
/* FT_ENCODING_UNICODE :: */ /* FT_ENCODING_UNICODE :: */
/* corresponds to the Unicode character set. This value covers */ /* Corresponds to the Unicode character set. This value covers */
/* all versions of the Unicode repertoire, including ASCII and */ /* all versions of the Unicode repertoire, including ASCII and */
/* Latin-1. Most fonts include a Unicode charmap, but not all */ /* Latin-1. Most fonts include a Unicode charmap, but not all */
/* of them. */ /* of them. */
/* */ /* */
/* FT_ENCODING_MS_SYMBOL :: */ /* FT_ENCODING_MS_SYMBOL :: */
/* corresponds to the Microsoft Symbol encoding, used to encode */ /* Corresponds to the Microsoft Symbol encoding, used to encode */
/* mathematical symbols in the 32..255 character code range. For */ /* mathematical symbols in the 32..255 character code range. For */
/* more information, see http://www.ceviz.net/symbol.htm */ /* more information, see `http://www.ceviz.net/symbol.htm'. */
/* */ /* */
/* FT_ENCODING_MS_SJIS :: */ /* FT_ENCODING_MS_SJIS :: */
/* corresponds to Microsoft's Japanese SJIS encoding. More info */ /* Corresponds to Microsoft's Japanese SJIS encoding. More info */
/* at http://langsupport.japanreference.com/encoding.shtml. */ /* at `http://langsupport.japanreference.com/encoding.shtml'. */
/* see note on multi-byte encodings below. */ /* See note on multi-byte encodings below. */
/* */ /* */
/* FT_ENCODING_MS_GB2312 :: */ /* FT_ENCODING_MS_GB2312 :: */
/* corresponds to the encoding system for Simplified Chinese, as */ /* Corresponds to the encoding system for Simplified Chinese, as */
/* used in China. Only found in some TrueType fonts */ /* used in China. Only found in some TrueType fonts. */
/* */ /* */
/* */ /* */
/* FT_ENCODING_MS_BIG5 :: */ /* FT_ENCODING_MS_BIG5 :: */
/* corresponds to the encoding system for Simplified Chinese, as */ /* Corresponds to the encoding system for Traditional Chinese, as */
/* used in Taiwan and Hong Kong. Only found in some TrueType fonts */ /* used in Taiwan and Hong Kong. Only found in some TrueType fonts. */
/* */ /* */
/* FT_ENCODING_MS_WANSUNG :: */ /* FT_ENCODING_MS_WANSUNG :: */
/* corresponds to the Korean encoding system known as Wansung. */ /* Corresponds to the Korean encoding system known as Wansung. */
/* This is a Microsoft encoding that is only found in some TrueType */ /* This is a Microsoft encoding that is only found in some TrueType */
/* fonts. For more information, see */ /* fonts. For more information, see */
/* http://www.microsoft.com/typography/unicode/949.txt */ /* `http://www.microsoft.com/typography/unicode/949.txt'. */
/* */ /* */
/* FT_ENCODING_MS_JOHAB :: */ /* FT_ENCODING_MS_JOHAB :: */
/* The Korean standard character set (KS C-5601-1992), which */ /* The Korean standard character set (KS C-5601-1992), which */
/* corresponds to Windows code page 1361. This character set */ /* corresponds to Windows code page 1361. This character set */
/* includes all possible Hangeul character combinations. */ /* includes all possible Hangeul character combinations. */
/* only found on some rare TrueType fonts. */ /* Only found on some rare TrueType fonts. */
/* */ /* */
/* FT_ENCODING_ADOBE_LATIN_1 :: */ /* FT_ENCODING_ADOBE_LATIN_1 :: */
/* corresponds to a Latin-1 encoding as defined in a Type 1 */ /* Corresponds to a Latin-1 encoding as defined in a Type 1 */
/* Postscript font. It is limited to no more than 256 character */ /* Postscript font. It is limited to 256 character codes. */
/* codes. */
/* */ /* */
/* FT_ENCODING_ADOBE_STANDARD :: */ /* FT_ENCODING_ADOBE_STANDARD :: */
/* corresponds to the Adobe Standard encoding, as found in Type 1, */ /* Corresponds to the Adobe Standard encoding, as found in Type 1, */
/* CFF and OpenType/CFF fonts. It is limited to no more than 256 */ /* CFF, and OpenType/CFF fonts. It is limited to 256character */
/* character codes. */ /* codes. */
/* */ /* */
/* FT_ENCODING_ADOBE_EXPERT :: */ /* FT_ENCODING_ADOBE_EXPERT :: */
/* corresponds to the Adobe Expert encoding, as found in Type 1, */ /* Corresponds to the Adobe Expert encoding, as found in Type 1, */
/* CFF and OpenType/CFF fonts. It is limited to no more than 256 */ /* CFF, and OpenType/CFF fonts. It is limited to 256 character */
/* character codes */ /* codes. */
/* */ /* */
/* FT_ENCODING_ADOBE_CUSTOM :: */ /* FT_ENCODING_ADOBE_CUSTOM :: */
/* corresponds to a custom encoding, as found in Type 1, CFF and */ /* Corresponds to a custom encoding, as found in Type 1, CFF, and */
/* OpenType/CFF fonts. It is limited to no more than 256 character */ /* OpenType/CFF fonts. It is limited to 256 character codes. */
/* codes */
/* */ /* */
/* FT_ENCODING_APPLE_ROMAN :: */ /* FT_ENCODING_APPLE_ROMAN :: */
/* corresponds to the 8-bit Apple roman encoding. Many TrueType and */ /* Corresponds to the 8-bit Apple roman encoding. Many TrueType and */
/* OpenType fonts contain a charmap for this encoding, since it */ /* OpenType fonts contain a charmap for this encoding, since older */
/* older versions of Mac OS are able to use it. */ /* versions of Mac OS are able to use it. */
/* */ /* */
/* FT_ENCODING_OLD_LATIN_2 :: */ /* FT_ENCODING_OLD_LATIN_2 :: */
/* this value is deprecated and was never used nor reported by */ /* This value is deprecated and was never used nor reported by */
/* FreeType. Don't use or test for it. */ /* FreeType. Don't use or test for it. */
/* */ /* */
/* <Note> */ /* <Note> */
/* By default, FreeType automatically synthetizes a Unicode charmap */ /* By default, FreeType automatically synthetizes a Unicode charmap */
/* for Postscript fonts, using their glyph names dictionaries. */ /* for Postscript fonts, using their glyph names dictionaries. */
/* However, it will also report the encodings defined explicitely */ /* However, it will also report the encodings defined explicitly in */
/* in the font file, for the cases when they're needed, with the */ /* the font file, for the cases when they are needed, with the Adobe */
/* Adobe values as well */ /* values as well. */
/* */ /* */
typedef enum FT_Encoding_ typedef enum FT_Encoding_
{ {
FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ), FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
@ -539,13 +536,14 @@ FT_BEGIN_HEADER
} FT_Encoding; } FT_Encoding;
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Enum> */ /* <Enum> */
/* ft_encoding_xxx */ /* ft_encoding_xxx */
/* */ /* */
/* <Description> */ /* <Description> */
/* These constants are deprecated, use the corresponding @FT_Encoding */ /* These constants are deprecated; use the corresponding @FT_Encoding */
/* values instead. */ /* values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
@ -582,6 +580,7 @@ FT_BEGIN_HEADER
#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM #define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN #define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
@ -668,7 +667,8 @@ FT_BEGIN_HEADER
/* */ /* */
/* style_flags :: A set of bit flags indicating the style of */ /* style_flags :: A set of bit flags indicating the style of */
/* the face (i.e., italic, bold, underline, */ /* the face (i.e., italic, bold, underline, */
/* etc). See the @FT_STYLE_FLAG_XXX constants */ /* etc). See the @FT_STYLE_FLAG_XXX */
/* constants. */
/* */ /* */
/* num_glyphs :: The total number of glyphs in the face. */ /* num_glyphs :: The total number of glyphs in the face. */
/* */ /* */
@ -858,73 +858,72 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* A list of bit flags used in the 'face_flags' field of the */ /* A list of bit flags used in the 'face_flags' field of the */
/* @FT_FaceRec structure. They inform client applications of */ /* @FT_FaceRec structure. They inform client applications of */
/* properties of the corresponding face. */ /* properties of the corresponding face. */
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_FACE_FLAG_SCALABLE :: */ /* FT_FACE_FLAG_SCALABLE :: */
/* indicates that the face provides vectorial outlines. This doesn't */ /* Indicates that the face provides vectorial outlines. This */
/* prevent embedded bitmaps. I.e. a face can have both this bit and */ /* doesn't prevent embedded bitmaps, i.e., a face can have both */
/* @FT_FACE_FLAG_FIXED_SIZES set */ /* this bit and @FT_FACE_FLAG_FIXED_SIZES set */
/* */ /* */
/* FT_FACE_FLAG_FIXED_SIZES :: */ /* FT_FACE_FLAG_FIXED_SIZES :: */
/* indicates that the face contains 'fixed sizes', i.e. bitmap */ /* Indicates that the face contains `fixed sizes', i.e., bitmap */
/* strikes for some given pixel sizes. See the 'num_fixed_sizes' */ /* strikes for some given pixel sizes. See the `num_fixed_sizes' */
/* and 'available_sizes' fields of @FT_FaceRec */ /* and `available_sizes' fields of @FT_FaceRec. */
/* */ /* */
/* FT_FACE_FLAG_FIXED_WIDTH :: */ /* FT_FACE_FLAG_FIXED_WIDTH :: */
/* indicates that the face contains fixed-width characters (like */ /* Indicates that the face contains fixed-width characters (like */
/* Courier, Lucido, MonoType, etc..) */ /* Courier, Lucido, MonoType, etc.). */
/* */ /* */
/* FT_FACE_FLAG_SFNT :: */ /* FT_FACE_FLAG_SFNT :: */
/* indicates that the face uses the 'sfnt' storage scheme. For */ /* Indicates that the face uses the `sfnt' storage scheme. For */
/* now, this means TrueType and OpenType */ /* now, this means TrueType and OpenType. */
/* */ /* */
/* FT_FACE_FLAG_HORIZONTAL :: */ /* FT_FACE_FLAG_HORIZONTAL :: */
/* indicates that the face contains horizontal glyph metrics. */ /* Indicates that the face contains horizontal glyph metrics. This */
/* This should be set for all common formats */ /* should be set for all common formats. */
/* */ /* */
/* FT_FACE_FLAG_VERTICAL :: */ /* FT_FACE_FLAG_VERTICAL :: */
/* indicates that the face contains vertical glyph metrics. This */ /* Indicates that the face contains vertical glyph metrics. This */
/* is only available in some formats, not all of them */ /* is only available in some formats, not all of them. */
/* */ /* */
/* FT_FACE_FLAG_KERNING :: */ /* FT_FACE_FLAG_KERNING :: */
/* indicates that the face contains kerning information. When set, */ /* Indicates that the face contains kerning information. If set, */
/* the kerning idstance can be retrieved through the function */ /* the kerning distance can be retrieved through the function */
/* FT_Get_Kerning. Note that if unset, this function will always */ /* @FT_Get_Kerning. Note that if unset, this function will always */
/* return the vector (0,0) */ /* return the vector (0,0). */
/* */ /* */
/* FT_FACE_FLAG_FAST_GLYPHS :: */ /* FT_FACE_FLAG_FAST_GLYPHS :: */
/* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT */ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */
/* */ /* */
/* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */
/* indicates that the font contains multiple masters and is capable */ /* Indicates that the font contains multiple masters and is capable */
/* of interpolating between them. See the multiple-masters specific */ /* of interpolating between them. See the multiple-masters */
/* API for details */ /* specific API for details. */
/* */ /* */
/* FT_FACE_FLAG_GLYPH_NAMES :: */ /* FT_FACE_FLAG_GLYPH_NAMES :: */
/* indicates that the font contains glyph names that can be */ /* Indicates that the font contains glyph names that can be */
/* retrieved through @FT_Get_Glyph_Names. Note that some TrueType */ /* retrieved through @FT_Get_Glyph_Names. Note that some TrueType */
/* fonts contain broken glyph name tables. Use the function */ /* fonts contain broken glyph name tables. Use the function */
/* use @FT_Has_PS_Glyph_Name when needed. */ /* @FT_Has_PS_Glyph_Name when needed. */
/* */ /* */
/* FT_FACE_FLAG_EXTERNAL_STREAM :: */ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */
/* used internally by FreeType to indicate that a face's stream */ /* Used internally by FreeType to indicate that a face's stream was */
/* was provided by the client application and should not be */ /* provided by the client application and should not be destroyed */
/* destroyed when @FT_Done_Face is called. Don't read or test */ /* when @FT_Done_Face is called. Don't read or test this flag. */
/* this flag. */
/* */ /* */
#define FT_FACE_FLAG_SCALABLE (1L << 0) #define FT_FACE_FLAG_SCALABLE ( 1L << 0 )
#define FT_FACE_FLAG_FIXED_SIZES (1L << 1) #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 )
#define FT_FACE_FLAG_FIXED_WIDTH (1L << 2) #define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 )
#define FT_FACE_FLAG_SFNT (1L << 3) #define FT_FACE_FLAG_SFNT ( 1L << 3 )
#define FT_FACE_FLAG_HORIZONTAL (1L << 4) #define FT_FACE_FLAG_HORIZONTAL ( 1L << 4 )
#define FT_FACE_FLAG_VERTICAL (1L << 5) #define FT_FACE_FLAG_VERTICAL ( 1L << 5 )
#define FT_FACE_FLAG_KERNING (1L << 6) #define FT_FACE_FLAG_KERNING ( 1L << 6 )
#define FT_FACE_FLAG_FAST_GLYPHS (1L << 7) #define FT_FACE_FLAG_FAST_GLYPHS ( 1L << 7 )
#define FT_FACE_FLAG_MULTIPLE_MASTERS (1L << 8) #define FT_FACE_FLAG_MULTIPLE_MASTERS ( 1L << 8 )
#define FT_FACE_FLAG_GLYPH_NAMES (1L << 9) #define FT_FACE_FLAG_GLYPH_NAMES ( 1L << 9 )
#define FT_FACE_FLAG_EXTERNAL_STREAM (1L << 10) #define FT_FACE_FLAG_EXTERNAL_STREAM ( 1L << 10 )
/* */ /* */
@ -1075,8 +1074,6 @@ FT_BEGIN_HEADER
( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS ) ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Constant> */ /* <Constant> */
@ -1084,17 +1081,17 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* A list of bit-flags used to indicate the style of a given face. */ /* A list of bit-flags used to indicate the style of a given face. */
/* These are used in the 'style_flags' field of @FT_FaceRec */ /* These are used in the `style_flags' field of @FT_FaceRec. */
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_STYLE_FLAG_ITALIC :: */ /* FT_STYLE_FLAG_ITALIC :: */
/* indicates that a given face is italicized */ /* Indicates that a given face is italicized. */
/* */ /* */
/* FT_STYLE_FLAG_BOLD :: */ /* FT_STYLE_FLAG_BOLD :: */
/* indicates that a given face is bold */ /* Indicates that a given face is bold. */
/* */ /* */
#define FT_STYLE_FLAG_ITALIC (1 << 0) #define FT_STYLE_FLAG_ITALIC ( 1 << 0 )
#define FT_STYLE_FLAG_BOLD (1 << 1) #define FT_STYLE_FLAG_BOLD ( 1 << 1 )
/*************************************************************************/ /*************************************************************************/
@ -1524,6 +1521,7 @@ FT_BEGIN_HEADER
#define FT_OPEN_DRIVER FT_OPEN_DRIVER #define FT_OPEN_DRIVER FT_OPEN_DRIVER
#define FT_OPEN_PARAMS FT_OPEN_PARAMS #define FT_OPEN_PARAMS FT_OPEN_PARAMS
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
@ -2235,13 +2233,15 @@ FT_BEGIN_HEADER
#define FT_LOAD_NO_AUTOHINT 0x8000U #define FT_LOAD_NO_AUTOHINT 0x8000U
/* */ /* */
#define FT_LOAD_TARGET_(x) ( (FT_Int32)((x) & 7) << 16 )
#define FT_LOAD_TARGET_MODE(x) ((FT_Render_Mode)( ((x) >> 16) & 7 ))
#define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_(FT_RENDER_MODE_NORMAL) #define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 7 ) << 16 )
#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_(FT_RENDER_MODE_MONO) #define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 7 ) )
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_(FT_RENDER_MODE_LCD)
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_(FT_RENDER_MODE_LCD_V) #define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
#define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -2295,34 +2295,34 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* An enumeration type that lists the render modes supported by */ /* An enumeration type that lists the render modes supported by */
/* FreeType 2. Each mode corresponds to a specific type of scanline */ /* FreeType 2. Each mode corresponds to a specific type of scanline */
/* conversion performed on the outline, as well as specific */ /* conversion performed on the outline, as well as specific */
/* hinting optimizations. */ /* hinting optimizations. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* FT_RENDER_MODE_NORMAL :: */ /* FT_RENDER_MODE_NORMAL :: */
/* this is the default render mode; it corresponds to 8-bit */ /* This is the default render mode; it corresponds to 8-bit */
/* anti-aliased bitmaps, using 256 levels of opacity */ /* anti-aliased bitmaps, using 256 levels of opacity. */
/* */ /* */
/* FT_RENDER_MODE_MONO :: */ /* FT_RENDER_MODE_MONO :: */
/* this mode corresponds to 1-bit bitmaps */ /* This mode corresponds to 1-bit bitmaps. */
/* */ /* */
/* FT_RENDER_MODE_LCD :: */ /* FT_RENDER_MODE_LCD :: */
/* this mode corresponds to horizontal RGB/BGR sub-pixel displays, */ /* This mode corresponds to horizontal RGB/BGR sub-pixel displays, */
/* like LCD-screens. It produces 8-bit bitmaps that are 3 times the */ /* like LCD-screens. It produces 8-bit bitmaps that are 3 times */
/* width of the original glyph outline in pixels, and which use the */ /* the width of the original glyph outline in pixels, and which use */
/* @FT_PIXEL_MODE_LCD mode */ /* the @FT_PIXEL_MODE_LCD mode. */
/* */ /* */
/* FT_RENDER_MODE_LCD_V :: */ /* FT_RENDER_MODE_LCD_V :: */
/* this mode corresponds to vertical RGB/BGR sub-pixel displays */ /* This mode corresponds to vertical RGB/BGR sub-pixel displays */
/* (like PDA screens, rotated LCD displays, etc..). It produces */ /* (like PDA screens, rotated LCD displays, etc.). It produces */
/* 8-bit bitmaps that are 3 times the height of the original */ /* 8-bit bitmaps that are 3 times the height of the original */
/* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode */ /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */
/* */ /* */
/* <Note> */ /* <Note> */
/* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are */ /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are */
/* _not_ _filtered_ to reduce color-fringes. It's up to the caller to */ /* _not filtered_ to reduce color-fringes. It is up to the caller to */
/* perform this pass */ /* perform this pass. */
/* */ /* */
typedef enum FT_Render_Mode_ typedef enum FT_Render_Mode_
{ {
@ -2342,15 +2342,15 @@ FT_BEGIN_HEADER
/* ft_render_mode_xxx */ /* ft_render_mode_xxx */
/* */ /* */
/* <Description> */ /* <Description> */
/* these constats are deprecated. Use the corresponding */ /* These constats are deprecated. Use the corresponding */
/* @FT_Render_Mode values instead */ /* @FT_Render_Mode values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
/* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */ /* ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL */
/* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */ /* ft_render_mode_mono :: see @FT_RENDER_MODE_MONO */
/* */ /* */
#define ft_render_mode_normal FT_RENDER_MODE_NORMAL #define ft_render_mode_normal FT_RENDER_MODE_NORMAL
#define ft_render_mode_mono FT_RENDER_MODE_MONO #define ft_render_mode_mono FT_RENDER_MODE_MONO
/*************************************************************************/ /*************************************************************************/
@ -2407,16 +2407,18 @@ FT_BEGIN_HEADER
} FT_Kerning_Mode; } FT_Kerning_Mode;
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Const> */ /* <Const> */
/* ft_kerning_default */ /* ft_kerning_default */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_KERNING_DEFAULT */ /* This constant is deprecated. Please use @FT_KERNING_DEFAULT */
/* instead. */ /* instead. */
/* */ /* */
#define ft_kerning_default FT_KERNING_DEFAULT #define ft_kerning_default FT_KERNING_DEFAULT
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -2424,10 +2426,11 @@ FT_BEGIN_HEADER
/* ft_kerning_unfitted */ /* ft_kerning_unfitted */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_KERNING_UNFITTED */ /* This constant is deprecated. Please use @FT_KERNING_UNFITTED */
/* instead. */ /* instead. */
/* */ /* */
#define ft_kerning_unfitted FT_KERNING_UNFITTED #define ft_kerning_unfitted FT_KERNING_UNFITTED
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -2435,10 +2438,10 @@ FT_BEGIN_HEADER
/* ft_kerning_unscaled */ /* ft_kerning_unscaled */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_KERNING_UNSCALED */ /* This constant is deprecated. Please use @FT_KERNING_UNSCALED */
/* instead. */ /* instead. */
/* */ /* */
#define ft_kerning_unscaled FT_KERNING_UNSCALED #define ft_kerning_unscaled FT_KERNING_UNSCALED
/*************************************************************************/ /*************************************************************************/

View File

@ -115,39 +115,38 @@ FT_BEGIN_HEADER
/* future. */ /* future. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* FT_PIXEL_MODE_MONO :: */ /* FT_PIXEL_MODE_MONO :: */
/* A monochrome bitmap, using 1 bit per pixel. Note that pixels */ /* A monochrome bitmap, using 1 bit per pixel. Note that pixels */
/* are stored in most-significant order (MSB), which means that */ /* are stored in most-significant order (MSB), which means that */
/* the left-most pixel in a byte has value 128 */ /* the left-most pixel in a byte has value 128. */
/* */ /* */
/* FT_PIXEL_MODE_GRAY :: */ /* FT_PIXEL_MODE_GRAY :: */
/* An 8-bit bitmap, generally used to represent anti-aliased glyph */ /* An 8-bit bitmap, generally used to represent anti-aliased glyph */
/* images. Each pixel is stored in one byte. Note that the number */ /* images. Each pixel is stored in one byte. Note that the number */
/* of value "gray" levels is stored in the 'num_bytes' field of */ /* of value "gray" levels is stored in the `num_bytes' field of */
/* the @FT_Bitmap structure (it generally is 256) */ /* the @FT_Bitmap structure (it generally is 256). */
/* */ /* */
/* FT_PIXEL_MODE_GRAY2 :: */ /* FT_PIXEL_MODE_GRAY2 :: */
/* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */ /* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */
/* bitmaps in font files according to the OpenType specification. */ /* bitmaps in font files according to the OpenType specification. */
/* We haven't found a single font using this format however */ /* We haven't found a single font using this format, however. */
/* */ /* */
/* FT_PIXEL_MODE_GRAY4 :: */ /* FT_PIXEL_MODE_GRAY4 :: */
/* A 4-bit/pixel bitmap, used to represent embedded anti-aliased */ /* A 4-bit/pixel bitmap, used to represent embedded anti-aliased */
/* bitmaps in font files according to the OpenType specification. */ /* bitmaps in font files according to the OpenType specification. */
/* We haven't found a single font using this format however */ /* We haven't found a single font using this format, however. */
/* */ /* */
/* */ /* FT_PIXEL_MODE_LCD :: */
/* FT_PIXEL_MODE_LCD :: */
/* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */ /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
/* images used for display on LCD displays; the bitmap's width is */ /* images used for display on LCD displays; the bitmap's width is */
/* three times wider than the original glyph image. See also */ /* three times wider than the original glyph image. See also */
/* @FT_RENDER_MODE_LCD */ /* @FT_RENDER_MODE_LCD. */
/* */ /* */
/* FT_PIXEL_MODE_LCD_V :: */ /* FT_PIXEL_MODE_LCD_V :: */
/* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */ /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
/* images used for display on rotated LCD displays; the bitmap's */ /* images used for display on rotated LCD displays; the bitmap's */
/* height is three times taller than the original glyph image. */ /* height is three times taller than the original glyph image. */
/* See also @FT_RENDER_MODE_LCD_V */ /* See also @FT_RENDER_MODE_LCD_V. */
/* */ /* */
typedef enum FT_Pixel_Mode_ typedef enum FT_Pixel_Mode_
{ {
@ -170,31 +169,33 @@ FT_BEGIN_HEADER
/* ft_pixel_mode_xxx */ /* ft_pixel_mode_xxx */
/* */ /* */
/* <Description> */ /* <Description> */
/* a list of deprecated constants. Use the corresponding */ /* A list of deprecated constants. Use the corresponding */
/* @FT_Pixel_Mode values instead */ /* @FT_Pixel_Mode values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
/* ft_pixel_mode_none :: see @FT_PIXEL_MODE_NONE */ /* ft_pixel_mode_none :: see @FT_PIXEL_MODE_NONE */
/* ft_pixel_mode_mono :: see @FT_PIXEL_MODE_MONO */ /* ft_pixel_mode_mono :: see @FT_PIXEL_MODE_MONO */
/* ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY */ /* ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY */
/* ft_pixel_mode_pal2 :: see @FT_PIXEL_MODE_GRAY2 */ /* ft_pixel_mode_pal2 :: see @FT_PIXEL_MODE_GRAY2 */
/* ft_pixel_mode_pal4 :: see @FT_PIXEL_MODE_GRAY4 */ /* ft_pixel_mode_pal4 :: see @FT_PIXEL_MODE_GRAY4 */
/* */ /* */
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE #define ft_pixel_mode_none FT_PIXEL_MODE_NONE
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO #define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
#define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY #define ft_pixel_mode_grays FT_PIXEL_MODE_GRAY
#define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2 #define ft_pixel_mode_pal2 FT_PIXEL_MODE_GRAY2
#define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4 #define ft_pixel_mode_pal4 FT_PIXEL_MODE_GRAY4
/* */ /* */
#if 0 #if 0
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Enum> */ /* <Enum> */
/* FT_Palette_Mode */ /* FT_Palette_Mode */
/* */ /* */
/* <Description> */ /* <Description> */
/* THIS TYPE IS DEPRECATED. DO NOT USE IT !! */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */
/* */ /* */
/* An enumeration type used to describe the format of a bitmap */ /* An enumeration type used to describe the format of a bitmap */
/* palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */ /* palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
@ -220,8 +221,10 @@ FT_BEGIN_HEADER
} FT_Palette_Mode; } FT_Palette_Mode;
/* */ /* */
#endif #endif
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
@ -249,7 +252,7 @@ FT_BEGIN_HEADER
/* most cases. */ /* most cases. */
/* */ /* */
/* num_grays :: This field is only used with */ /* num_grays :: This field is only used with */
/* `FT_PIXEL_MODE_GRAY'; it gives the number of gray */ /* `FT_PIXEL_MODE_GRAY'; it gives the number of gray */
/* levels used in the bitmap. */ /* levels used in the bitmap. */
/* */ /* */
/* pixel_mode :: The pixel_mode, i.e., how pixel bits are stored. */ /* pixel_mode :: The pixel_mode, i.e., how pixel bits are stored. */
@ -415,16 +418,18 @@ FT_BEGIN_HEADER
} FT_Outline_Flags; } FT_Outline_Flags;
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Const> */ /* <Const> */
/* FT_OUTLINE_NONE */ /* FT_OUTLINE_NONE */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_NONE */ /* This constant is deprecated. Please use @FT_OUTLINE_NONE */
/* instead. */ /* instead. */
/* */ /* */
#define zft_outline_none FT_OUTLINE_NONE #define zft_outline_none FT_OUTLINE_NONE
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -432,10 +437,11 @@ FT_BEGIN_HEADER
/* FT_OUTLINE_OWNER */ /* FT_OUTLINE_OWNER */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_OWNER */ /* This constant is deprecated. Please use @FT_OUTLINE_OWNER */
/* instead. */ /* instead. */
/* */ /* */
#define zft_outline_owner FT_OUTLINE_OWNER #define zft_outline_owner FT_OUTLINE_OWNER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -443,10 +449,11 @@ FT_BEGIN_HEADER
/* ft_outline_even_odd_fill */ /* ft_outline_even_odd_fill */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_EVEN_ODD_FILL */ /* This constant is deprecated. Please use @FT_OUTLINE_EVEN_ODD_FILL */
/* instead. */ /* instead. */
/* */ /* */
#define zft_outline_even_off_fill FT_OUTLINE_EVEN_ODD_FILL #define zft_outline_even_off_fill FT_OUTLINE_EVEN_ODD_FILL
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -454,10 +461,11 @@ FT_BEGIN_HEADER
/* FT_OUTLINE_REVERSE_FILL */ /* FT_OUTLINE_REVERSE_FILL */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_REVERSE_FILL */ /* This constant is deprecated. Please use @FT_OUTLINE_REVERSE_FILL */
/* instead. */ /* instead. */
/* */ /* */
#define zft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL #define zft_outline_reverse_fill FT_OUTLINE_REVERSE_FILL
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -465,10 +473,11 @@ FT_BEGIN_HEADER
/* FT_OUTLINE_IGNORE_DROPOUTS */ /* FT_OUTLINE_IGNORE_DROPOUTS */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_IGNORE_DROPOUTS */ /* This constant is deprecated. Please use */
/* instead. */ /* @FT_OUTLINE_IGNORE_DROPOUTS instead. */
/* */ /* */
#define zft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS #define zft_outline_ignore_dropouts FT_OUTLINE_IGNORE_DROPOUTS
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -476,10 +485,11 @@ FT_BEGIN_HEADER
/* FT_OUTLINE_HIGH_PRECISION */ /* FT_OUTLINE_HIGH_PRECISION */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_HIGH_PRECISION */ /* This constant is deprecated. Please use */
/* instead. */ /* @FT_OUTLINE_HIGH_PRECISION instead. */
/* */ /* */
#define zft_outline_high_precision FT_OUTLINE_HIGH_PRECISION #define zft_outline_high_precision FT_OUTLINE_HIGH_PRECISION
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -487,10 +497,10 @@ FT_BEGIN_HEADER
/* FT_OUTLINE_SINGLE_PASS */ /* FT_OUTLINE_SINGLE_PASS */
/* */ /* */
/* <Description> */ /* <Description> */
/* this constant is deprecated. Please use @FT_OUTLINE_SINGLE_PASS */ /* This constant is deprecated. Please use @FT_OUTLINE_SINGLE_PASS */
/* instead. */ /* instead. */
/* */ /* */
#define zft_outline_single_pass FT_OUTLINE_SINGLE_PASS #define zft_outline_single_pass FT_OUTLINE_SINGLE_PASS
/* */ /* */
@ -724,28 +734,28 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_GLYPH_FORMAT_NONE :: */ /* FT_GLYPH_FORMAT_NONE :: */
/* the value 0 is reserved and does describe a glyph format */ /* The value 0 is reserved and does describe a glyph format. */
/* */ /* */
/* FT_GLYPH_FORMAT_COMPOSITE :: */ /* FT_GLYPH_FORMAT_COMPOSITE :: */
/* the glyph image is a composite of several other images. This */ /* The glyph image is a composite of several other images. This */
/* format is _only_ used with @FT_LOAD_FLAG_NO_RECURSE, and is */ /* format is _only_ used with @FT_LOAD_FLAG_NO_RECURSE, and is */
/* used to report compound glyphs (like accented characters) */ /* used to report compound glyphs (like accented characters). */
/* */ /* */
/* FT_GLYPH_FORMAT_BITMAP :: */ /* FT_GLYPH_FORMAT_BITMAP :: */
/* the glyph image is a bitmap, and can be described as a */ /* The glyph image is a bitmap, and can be described as an */
/* @FT_Bitmap. You'll generally need to access the 'bitmap' field */ /* @FT_Bitmap. You generally need to access the `bitmap' field of */
/* of the @FT_GlyphSlotRec structure to read it. */ /* the @FT_GlyphSlotRec structure to read it. */
/* */ /* */
/* FT_GLYPH_FORMAT_OUTLINE :: The glyph image is a vectorial image */ /* FT_GLYPH_FORMAT_OUTLINE :: */
/* the glyph image is a vertorial outline made of line segments */ /* The glyph image is a vertorial outline made of line segments */
/* and bezier arcs; it can be described as a @FT_Outline and you'll */ /* and Bezier arcs; it can be described as an @FT_Outline; you */
/* generally want to access the 'outline' field of the */ /* generally want to access the `outline' field of the */
/* @FT_GlyphSlotRec structure to read it. */ /* @FT_GlyphSlotRec structure to read it. */
/* */ /* */
/* FT_GLYPH_FORMAT_PLOTTER :: */ /* FT_GLYPH_FORMAT_PLOTTER :: */
/* the glyph image is a vectorial path with no inside/outside */ /* The glyph image is a vectorial path with no inside/outside */
/* contours. Some Type 1 fonts, like those in the Hershy family, */ /* contours. Some Type 1 fonts, like those in the Hershey family, */
/* contain glyphs in this format. These are described as */ /* contain glyphs in this format. These are described as */
/* @FT_Outline, but FreeType isn't currently capable of rendering */ /* @FT_Outline, but FreeType isn't currently capable of rendering */
/* them correctly. */ /* them correctly. */
/* */ /* */
@ -760,13 +770,14 @@ FT_BEGIN_HEADER
} FT_Glyph_Format; } FT_Glyph_Format;
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Enum> */ /* <Enum> */
/* ft_glyph_format_xxx */ /* ft_glyph_format_xxx */
/* */ /* */
/* <Description> */ /* <Description> */
/* A list of decprecated constants. Use the corresponding */ /* A list of decprecated constants. Use the corresponding */
/* @FT_Glyph_Format values instead. */ /* @FT_Glyph_Format values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
@ -776,11 +787,12 @@ FT_BEGIN_HEADER
/* ft_glyph_format_outline :: see @FT_GLYPH_FORMAT_OUTLINE */ /* ft_glyph_format_outline :: see @FT_GLYPH_FORMAT_OUTLINE */
/* ft_glyph_format_plotter :: see @FT_GLYPH_FORMAT_PLOTTER */ /* ft_glyph_format_plotter :: see @FT_GLYPH_FORMAT_PLOTTER */
/* */ /* */
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE #define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE #define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
#define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP #define ft_glyph_format_bitmap FT_GLYPH_FORMAT_BITMAP
#define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE #define ft_glyph_format_outline FT_GLYPH_FORMAT_OUTLINE
#define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER #define ft_glyph_format_plotter FT_GLYPH_FORMAT_PLOTTER
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -854,7 +866,7 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Note> */ /* <Note> */
/* This structure is used by the span drawing callback type named */ /* This structure is used by the span drawing callback type named */
/* FT_SpanFunc which takes the y-coordinate of the span as */ /* FT_SpanFunc which takes the y-coordinate of the span as a */
/* a parameter. */ /* a parameter. */
/* */ /* */
/* The coverage value is always between 0 and 255, even if the number */ /* The coverage value is always between 0 and 255, even if the number */
@ -911,7 +923,8 @@ FT_BEGIN_HEADER
FT_Span* spans, FT_Span* spans,
void* user ); void* user );
#define FT_Raster_Span_Func FT_SpanFunc #define FT_Raster_Span_Func FT_SpanFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -919,7 +932,7 @@ FT_BEGIN_HEADER
/* FT_Raster_BitTest_Func */ /* FT_Raster_BitTest_Func */
/* */ /* */
/* <Description> */ /* <Description> */
/* THIS TYPE IS DEPRECATED. DO NOT USE IT */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
/* */ /* */
/* A function used as a call-back by the monochrome scan-converter */ /* A function used as a call-back by the monochrome scan-converter */
/* to test whether a given target pixel is already set to the drawing */ /* to test whether a given target pixel is already set to the drawing */
@ -948,7 +961,7 @@ FT_BEGIN_HEADER
/* FT_Raster_BitSet_Func */ /* FT_Raster_BitSet_Func */
/* */ /* */
/* <Description> */ /* <Description> */
/* THIS TYPE IS DEPRECATED. DO NOT USE IT */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT. */
/* */ /* */
/* A function used as a call-back by the monochrome scan-converter */ /* A function used as a call-back by the monochrome scan-converter */
/* to set an individual target pixel. This is crucial to implement */ /* to set an individual target pixel. This is crucial to implement */
@ -969,6 +982,7 @@ FT_BEGIN_HEADER
int x, int x,
void* user ); void* user );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Enum> */ /* <Enum> */
@ -1018,10 +1032,10 @@ FT_BEGIN_HEADER
} FT_Raster_Flag; } FT_Raster_Flag;
#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT #define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
#define ft_raster_flag_aa FT_RASTER_FLAG_AA #define ft_raster_flag_aa FT_RASTER_FLAG_AA
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT #define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
#define ft_raster_flag_clip FT_RASTER_FLAG_CLIP #define ft_raster_flag_clip FT_RASTER_FLAG_CLIP
/*************************************************************************/ /*************************************************************************/
@ -1045,9 +1059,9 @@ FT_BEGIN_HEADER
/* */ /* */
/* black_spans :: The black span drawing callback. */ /* black_spans :: The black span drawing callback. */
/* */ /* */
/* bit_test :: The bit test callback. UNIMPLEMENTED !! */ /* bit_test :: The bit test callback. UNIMPLEMENTED! */
/* */ /* */
/* bit_set :: The bit set callback. UNIMPLEMENTED !! */ /* bit_set :: The bit set callback. UNIMPLEMENTED! */
/* */ /* */
/* user :: User-supplied data that is passed to each drawing */ /* user :: User-supplied data that is passed to each drawing */
/* callback. */ /* callback. */
@ -1081,8 +1095,8 @@ FT_BEGIN_HEADER
int flags; int flags;
FT_SpanFunc gray_spans; FT_SpanFunc gray_spans;
FT_SpanFunc black_spans; FT_SpanFunc black_spans;
FT_Raster_BitTest_Func bit_test; /* doesn't work !! */ FT_Raster_BitTest_Func bit_test; /* doesn't work! */
FT_Raster_BitSet_Func bit_set; /* doesn't work !! */ FT_Raster_BitSet_Func bit_set; /* doesn't work! */
void* user; void* user;
FT_BBox clip_box; FT_BBox clip_box;

View File

@ -63,12 +63,13 @@ FT_BEGIN_HEADER
FT_GlyphSlot slot ); FT_GlyphSlot slot );
/* deprecated */ /* deprecated */
#define FT_Glyph_Init_Func FT_Glyph_InitFunc #define FT_Glyph_Init_Func FT_Glyph_InitFunc
#define FT_Glyph_Done_Func FT_Glyph_DoneFunc #define FT_Glyph_Done_Func FT_Glyph_DoneFunc
#define FT_Glyph_Transform_Func FT_Glyph_TransformFunc #define FT_Glyph_Transform_Func FT_Glyph_TransformFunc
#define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc #define FT_Glyph_BBox_Func FT_Glyph_GetBBoxFunc
#define FT_Glyph_Copy_Func FT_Glyph_CopyFunc #define FT_Glyph_Copy_Func FT_Glyph_CopyFunc
#define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc #define FT_Glyph_Prepare_Func FT_Glyph_PrepareFunc
struct FT_Glyph_Class_ struct FT_Glyph_Class_
{ {
@ -108,11 +109,10 @@ FT_BEGIN_HEADER
FT_Pointer mode_ptr ); FT_Pointer mode_ptr );
/* deprecated identifiers */ /* deprecated identifiers */
#define FTRenderer_render FT_Renderer_RenderFunc #define FTRenderer_render FT_Renderer_RenderFunc
#define FTRenderer_transform FT_Renderer_TransformFunc #define FTRenderer_transform FT_Renderer_TransformFunc
#define FTRenderer_getCBox FT_Renderer_GetCBoxFunc #define FTRenderer_getCBox FT_Renderer_GetCBoxFunc
#define FTRenderer_setMode FT_Renderer_SetModeFunc #define FTRenderer_setMode FT_Renderer_SetModeFunc
/*************************************************************************/ /*************************************************************************/

View File

@ -556,14 +556,14 @@ FT_BEGIN_HEADER
typedef struct FT_RendererRec_ typedef struct FT_RendererRec_
{ {
FT_ModuleRec root; FT_ModuleRec root;
FT_Renderer_Class* clazz; FT_Renderer_Class* clazz;
FT_Glyph_Format glyph_format; FT_Glyph_Format glyph_format;
FT_Glyph_Class glyph_class; FT_Glyph_Class glyph_class;
FT_Raster raster; FT_Raster raster;
FT_Raster_Render_Func raster_render; FT_Raster_Render_Func raster_render;
FT_Renderer_RenderFunc render; FT_Renderer_RenderFunc render;
} FT_RendererRec; } FT_RendererRec;

View File

@ -4,7 +4,7 @@
/* */ /* */
/* TrueType name ID definitions (specification only). */ /* TrueType name ID definitions (specification only). */
/* */ /* */
/* Copyright 1996-2001 by */ /* Copyright 1996-2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
@ -31,48 +31,51 @@ FT_BEGIN_HEADER
/* Possible values for the `platform' identifier code in the name */ /* Possible values for the `platform' identifier code in the name */
/* records of the TTF `name' table. */ /* records of the TTF `name' table. */
/* */ /* */
/*************************************************************************/
/***********************************************************************
*
* @enum:
* TT_PLATFORM_XXX
*
* @description:
* A list of valid values for the `platform_id' identifier code in
* @FT_CharmapRec and @FT_SfntName structures.
*
* @values:
* TT_PLATFORM_APPLE_UNICODE ::
* Used by Apple to indicate a Unicode character map and/or name entry.
* See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note
* that name entries in this format are coded as big-endian UCS-2
* character codes _only_.
*
* TT_PLATFORM_MACINTOSH ::
* Used by Apple to indicate a MacOS-specific charmap and/or name entry.
* See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that
* most TrueType fonts contain an Apple roman charmap to be usable on
* MacOS systems (even if they contain a Microsoft charmap as well).
*
* TT_PLATFORM_ISO ::
* This value was used to specify Unicode charmaps. It is however
* now deprecated. See @TT_ISO_ID_XXX for a list of corresponding
* `encoding_id' values.
*
* TT_PLATFORM_MICROSOFT ::
* Used by Microsoft to indicate Windows-specific charmaps. See
* @TT_MS_ID_XXX for a list of corresponding `encoding_id' values.
* Note that most fonts contain a Unicode charmap using
* (@TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).
*
* TT_PLATFORM_CUSTOM ::
* Used to indicate application-specific charmaps.
*
* TT_PLATFORM_ADOBE ::
* This value isn't part of any font format specification, but is used
* by FreeType to report Adobe-specific charmaps in an @FT_CharMapRec
* structure. See @TT_ADOBE_ID_XXX.
*/
/***********************************************************************
*
* @enum:
* TT_PLATFORM_XXX
*
* @description:
* a list of valie values for the 'platform_d' identifier code in
* @FT_CharmapRec and @FT_SfntName structures
*
* @values:
* TT_PLATFORM_APPLE_UNICODE ::
* used by Apple to indicate a Unicode character map and/or name entry.
* see @TT_APPLE_ID_XXX for corresponding 'encoding_id' values. Note that
* name entries in this format are coded as big-endian UCS-2 character
* codes _only_ .
*
* TT_PLATFORM_MACINTOSH ::
* used by Apple to indicate a MacOS-specific charmap and/or name entry.
* see @TT_MAC_ID_XXX for corresponding 'encoding_id' values. Note that
* most TrueType fonts contain an Apple roman charmap to be usable on
* MacOS systems (even when they contain a Microsoft charmap as well)
*
* TT_PLATFORM_ISO ::
* this value was used to specify Unicode charmaps. It is however
* now deprecated. See @TT_ISO_ID_XXX for a list of
* corresponding 'encoding_id' values
*
* TT_PLATFORM_MICROSOFT ::
* used by Microsoft to indicate Windows-specific charmaps. See
* @TT_MS_ID_XXX for a list of corresponding 'encoding_id' values.
* note that most fonts contain a Unicode charmap using
* ( @@TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS )
*
* TT_PLATFORM_CUSTOM ::
* used to indicate application-specific charmaps.
*
* TT_PLATFORM_ADOBE ::
* this value isn't part of any font format specification, but is used
* by FreeType to report Adobe-specific charmaps in a @FT_CharMapRec
* structure. See @TT_ADOBE_ID_XXX
*/
#define TT_PLATFORM_APPLE_UNICODE 0 #define TT_PLATFORM_APPLE_UNICODE 0
#define TT_PLATFORM_MACINTOSH 1 #define TT_PLATFORM_MACINTOSH 1
#define TT_PLATFORM_ISO 2 /* deprecated */ #define TT_PLATFORM_ISO 2 /* deprecated */
@ -81,22 +84,28 @@ FT_BEGIN_HEADER
#define TT_PLATFORM_ADOBE 7 /* artificial */ #define TT_PLATFORM_ADOBE 7 /* artificial */
/*********************************************************************** /***********************************************************************
* *
* @enum: * @enum:
* TT_APPLE_ID_XXX * TT_APPLE_ID_XXX
* *
* @description: * @description:
* a list of valid values for the 'encoding_id' for * A list of valid values for the `encoding_id' for
* @TT_PLATFORM_APPLE_UNICODE charmaps and name entries * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
* *
* @values: * @values:
* TT_APPLE_ID_DEFAULT :: Unicode 1.0 * TT_APPLE_ID_DEFAULT ::
* TT_APPLE_ID_UNICODE_1_1 :: Unicode 1.1, specifies Hangul at U+34xx * Unicode version 1.0.
* TT_APPLE_ID_ISO_10646 :: deprecated * TT_APPLE_ID_UNICODE_1_1 ::
* TT_APPLE_ID_UNICODE_2_0 :: Unicode 2.0 and beyond (UTF-16 BMP only) * Unicode 1.1; specifies Hangul characters starting at U+34xx.
* TT_APPLE_ID_UNICODE_32 :: UTF-32 (Adobe proposal for OpenType) * TT_APPLE_ID_ISO_10646 ::
*/ * Deprecated.
* TT_APPLE_ID_UNICODE_2_0 ::
* Unicode 2.0 and beyond (UTF-16 BMP only).
* TT_APPLE_ID_UNICODE_32 ::
* UTF-32 (Adobe proposal for OpenType).
*/
#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ #define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */
#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ #define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */
#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ #define TT_APPLE_ID_ISO_10646 2 /* deprecated */
@ -104,51 +113,52 @@ FT_BEGIN_HEADER
#define TT_APPLE_ID_UNICODE_32 4 /* Adobe proposal */ #define TT_APPLE_ID_UNICODE_32 4 /* Adobe proposal */
/*********************************************************************** /***********************************************************************
* *
* @enum: * @enum:
* TT_MAC_ID_XXX * TT_MAC_ID_XXX
* *
* @description: * @description:
* a list of valid values for the 'encoding_id' for * A list of valid values for the `encoding_id' for
* @TT_PLATFORM_MACINTOSH charmaps and name entries * @TT_PLATFORM_MACINTOSH charmaps and name entries.
* *
* @values: * @values:
* TT_MAC_ID_ROMAN :: * TT_MAC_ID_ROMAN ::
* TT_MAC_ID_JAPANESE :: * TT_MAC_ID_JAPANESE ::
* TT_MAC_ID_TRADITIONAL_CHINESE :: * TT_MAC_ID_TRADITIONAL_CHINESE ::
* TT_MAC_ID_KOREAN :: * TT_MAC_ID_KOREAN ::
* TT_MAC_ID_ARABIC :: * TT_MAC_ID_ARABIC ::
* TT_MAC_ID_HEBREW :: * TT_MAC_ID_HEBREW ::
* TT_MAC_ID_GREEK :: * TT_MAC_ID_GREEK ::
* TT_MAC_ID_RUSSIAN :: * TT_MAC_ID_RUSSIAN ::
* TT_MAC_ID_RSYMBOL :: * TT_MAC_ID_RSYMBOL ::
* TT_MAC_ID_DEVANAGARI :: * TT_MAC_ID_DEVANAGARI ::
* TT_MAC_ID_GURMUKHI :: * TT_MAC_ID_GURMUKHI ::
* TT_MAC_ID_GUJARATI :: * TT_MAC_ID_GUJARATI ::
* TT_MAC_ID_ORIYA :: * TT_MAC_ID_ORIYA ::
* TT_MAC_ID_BENGALI :: * TT_MAC_ID_BENGALI ::
* TT_MAC_ID_TAMIL :: * TT_MAC_ID_TAMIL ::
* TT_MAC_ID_TELUGU :: * TT_MAC_ID_TELUGU ::
* TT_MAC_ID_KANNADA :: * TT_MAC_ID_KANNADA ::
* TT_MAC_ID_MALAYALAM :: * TT_MAC_ID_MALAYALAM ::
* TT_MAC_ID_SINHALESE :: * TT_MAC_ID_SINHALESE ::
* TT_MAC_ID_BURMESE :: * TT_MAC_ID_BURMESE ::
* TT_MAC_ID_KHMER :: * TT_MAC_ID_KHMER ::
* TT_MAC_ID_THAI :: * TT_MAC_ID_THAI ::
* TT_MAC_ID_LAOTIAN :: * TT_MAC_ID_LAOTIAN ::
* TT_MAC_ID_GEORGIAN :: * TT_MAC_ID_GEORGIAN ::
* TT_MAC_ID_ARMENIAN :: * TT_MAC_ID_ARMENIAN ::
* TT_MAC_ID_MALDIVIAN :: * TT_MAC_ID_MALDIVIAN ::
* TT_MAC_ID_SIMPLIFIED_CHINESE :: * TT_MAC_ID_SIMPLIFIED_CHINESE ::
* TT_MAC_ID_TIBETAN :: * TT_MAC_ID_TIBETAN ::
* TT_MAC_ID_MONGOLIAN :: * TT_MAC_ID_MONGOLIAN ::
* TT_MAC_ID_GEEZ :: * TT_MAC_ID_GEEZ ::
* TT_MAC_ID_SLAVIC :: * TT_MAC_ID_SLAVIC ::
* TT_MAC_ID_VIETNAMESE :: * TT_MAC_ID_VIETNAMESE ::
* TT_MAC_ID_SINDHI :: * TT_MAC_ID_SINDHI ::
* TT_MAC_ID_UNINTERP :: * TT_MAC_ID_UNINTERP ::
*/ */
#define TT_MAC_ID_ROMAN 0 #define TT_MAC_ID_ROMAN 0
#define TT_MAC_ID_JAPANESE 1 #define TT_MAC_ID_JAPANESE 1
#define TT_MAC_ID_TRADITIONAL_CHINESE 2 #define TT_MAC_ID_TRADITIONAL_CHINESE 2
@ -185,67 +195,72 @@ FT_BEGIN_HEADER
#define TT_MAC_ID_UNINTERP 32 #define TT_MAC_ID_UNINTERP 32
/*********************************************************************** /***********************************************************************
* *
* @enum: * @enum:
* TT_ISO_ID_XXX * TT_ISO_ID_XXX
* *
* @description: * @description:
* a list of valid values for the 'encoding_id' for * A list of valid values for the `encoding_id' for
* @TT_PLATFORM_ISO charmaps and name entries * @TT_PLATFORM_ISO charmaps and name entries.
* *
* their use is now deprecated * Their use is now deprecated.
* *
* @values: * @values:
* TT_ISO_ID_7BIT_ASCII :: ASCII * TT_ISO_ID_7BIT_ASCII ::
* TT_ISO_ID_10646 :: ISO/10646 * ASCII.
* TT_ISO_ID_8859_1 :: a.k.a. Latin-1 * TT_ISO_ID_10646 ::
*/ * ISO/10646.
* TT_ISO_ID_8859_1 ::
* Also known as Latin-1.
*/
#define TT_ISO_ID_7BIT_ASCII 0 #define TT_ISO_ID_7BIT_ASCII 0
#define TT_ISO_ID_10646 1 #define TT_ISO_ID_10646 1
#define TT_ISO_ID_8859_1 2 #define TT_ISO_ID_8859_1 2
/*********************************************************************** /***********************************************************************
* *
* @enum: * @enum:
* TT_MS_ID_XXX * TT_MS_ID_XXX
* *
* @description: * @description:
* a list of valid values for the 'encoding_id' for * A list of valid values for the `encoding_id' for
* @TT_PLATFORM_MICROSOFT charmaps and name entries * @TT_PLATFORM_MICROSOFT charmaps and name entries.
* *
* @values: * @values:
* TT_MS_ID_SYMBOLS_CS :: * TT_MS_ID_SYMBOLS_CS ::
* correspond to symbol encodings. see @FT_ENCODING_MS_SYMBOL * Corresponds to symbol encodings. see @FT_ENCODING_MS_SYMBOL.
* *
* TT_MS_ID_UNICODE_CS :: * TT_MS_ID_UNICODE_CS ::
* correspond to a Microsoft WGL4 charmap, matching Unicode. See * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See
* @FT_ENCODING_UNICODE * @FT_ENCODING_UNICODE.
* *
* TT_MS_ID_SJIS :: * TT_MS_ID_SJIS ::
* corresponds to Microsoft S-JIS Japanese encoding. * Corresponds to Microsoft SJIS Japanese encoding.
* See @FT_ENCODING_MS_SJIS * See @FT_ENCODING_MS_SJIS.
* *
* TT_MS_ID_GB2312 :: * TT_MS_ID_GB2312 ::
* corresponds to Microsoft Simplified Chinese as used in China. See * Corresponds to Microsoft Simplified Chinese as used in Mainland
* @FT_ENCODING_MS_GB2312 * China. See @FT_ENCODING_MS_GB2312.
* *
* TT_MS_ID_BIG_5 :: * TT_MS_ID_BIG_5 ::
* corresponds to Microsoft Simplified Chinese as used in Taiwan and * Corresponds to Microsoft Traditional Chinese as used in Taiwan and
* Hong Kong. See @FT_ENCODING_MS_BIG5 * Hong Kong. See @FT_ENCODING_MS_BIG5.
* *
* TT_MS_ID_WANSUNG :: * TT_MS_ID_WANSUNG ::
* corresponds to Microsoft Korean Wansung encoding. See * Corresponds to Microsoft Korean Wansung encoding. See
* @FT_ENCODING_MS_WANSUNG * @FT_ENCODING_MS_WANSUNG.
* *
* TT_MS_ID_JOHAB :: * TT_MS_ID_JOHAB ::
* corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB * Corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB.
* *
* TT_MS_ID_UCS_4 :: * TT_MS_ID_UCS_4 ::
* corresponds to UCS-4 or UTF-32 charmaps. This is a recent Adobe proposal * Corresponds to UCS-4 or UTF-32 charmaps. This is a recent Adobe
* for OpenType. * proposal for OpenType.
*/ */
#define TT_MS_ID_SYMBOL_CS 0 #define TT_MS_ID_SYMBOL_CS 0
#define TT_MS_ID_UNICODE_CS 1 #define TT_MS_ID_UNICODE_CS 1
#define TT_MS_ID_SJIS 2 #define TT_MS_ID_SJIS 2
@ -256,28 +271,24 @@ FT_BEGIN_HEADER
#define TT_MS_ID_UCS_4 10 #define TT_MS_ID_UCS_4 10
/*************************************************************************/ /***********************************************************************
/* */ *
/* possible values of the platform specific encoding identifier field in */ * @enum:
/* the name records of the TTF `name' table if the `platform' identifier */ * TT_ADOBE_ID_XXX
/* code is TT_PLATFORM_ADOBE. */ *
/* */ * @description:
/* These are artificial values defined ad-hoc by FreeType. */ * A list of valid values for the `encoding_id' for
/* */ * @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension!
/*********************************************************************** *
* * @values:
* @enum: * TT_ADOBE_ID_STANDARD ::
* TT_ADOBE_ID_XXX * Adobe standard encoding.
* * TT_ADOBE_ID_EXPERT ::
* @description: * Adobe expert encoding.
* a list of valid values for the 'encoding_id' for * TT_ADOBE_ID_CUSTOM ::
* @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific list !! * Adobe custom encoding.
* */
* @values:
* TT_ADOBE_ID_STANDARD :: Adobe standard encoding
* TT_ADOBE_ID_EXPERT :: Adobe expert encoding
* TT_ADOBE_ID_CUSTOM :: Adobe custom encoding
*/
#define TT_ADOBE_ID_STANDARD 0 #define TT_ADOBE_ID_STANDARD 0
#define TT_ADOBE_ID_EXPERT 1 #define TT_ADOBE_ID_EXPERT 1
#define TT_ADOBE_ID_CUSTOM 2 #define TT_ADOBE_ID_CUSTOM 2

View File

@ -289,15 +289,15 @@
ah_hinter_compute_widths( AH_Hinter hinter ) ah_hinter_compute_widths( AH_Hinter hinter )
{ {
/* scan the array of segments in each direction */ /* scan the array of segments in each direction */
AH_Outline outline = hinter->glyph; AH_Outline outline = hinter->glyph;
AH_Segment segments; AH_Segment segments;
AH_Segment limit; AH_Segment limit;
AH_Globals globals = &hinter->globals->design; AH_Globals globals = &hinter->globals->design;
FT_Pos* widths; FT_Pos* widths;
FT_Int dimension; FT_Int dimension;
FT_Int* p_num_widths; FT_Int* p_num_widths;
FT_Error error = 0; FT_Error error = 0;
FT_Pos edge_distance_threshold = 32000; FT_Pos edge_distance_threshold = 32000;
globals->num_widths = 0; globals->num_widths = 0;
@ -334,9 +334,9 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Segment seg = segments; AH_Segment seg = segments;
AH_Segment link; AH_Segment link;
FT_Int num_widths = 0; FT_Int num_widths = 0;
for ( ; seg < limit; seg++ ) for ( ; seg < limit; seg++ )

View File

@ -32,12 +32,12 @@
#include <stdio.h> #include <stdio.h>
void void
ah_dump_edges( AH_Outline outline ) ah_dump_edges( AH_Outline outline )
{ {
AH_Edge edges; AH_Edge edges;
AH_Edge edge_limit; AH_Edge edge_limit;
AH_Segment segments; AH_Segment segments;
FT_Int dimension; FT_Int dimension;
edges = outline->horz_edges; edges = outline->horz_edges;
@ -84,12 +84,12 @@
/* A function used to dump the array of linked segments */ /* A function used to dump the array of linked segments */
void void
ah_dump_segments( AH_Outline outline ) ah_dump_segments( AH_Outline outline )
{ {
AH_Segment segments; AH_Segment segments;
AH_Segment segment_limit; AH_Segment segment_limit;
AH_Point points; AH_Point points;
FT_Int dimension; FT_Int dimension;
points = outline->points; points = outline->points;
@ -98,7 +98,7 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Segment seg; AH_Segment seg;
printf ( "Table of %s segments:\n", printf ( "Table of %s segments:\n",
@ -298,11 +298,11 @@
/* ah_outline_new */ /* ah_outline_new */
/* */ /* */
/* <Description> */ /* <Description> */
/* Creates a new and empty AH_OutlineRec object. */ /* Creates a new and empty AH_OutlineRec object. */
/* */ /* */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
ah_outline_new( FT_Memory memory, ah_outline_new( FT_Memory memory,
AH_Outline * aoutline ) AH_Outline* aoutline )
{ {
FT_Error error; FT_Error error;
AH_Outline outline; AH_Outline outline;
@ -324,10 +324,10 @@
/* ah_outline_done */ /* ah_outline_done */
/* */ /* */
/* <Description> */ /* <Description> */
/* Destroys a given AH_OutlineRec object. */ /* Destroys a given AH_OutlineRec object. */
/* */ /* */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_done( AH_Outline outline ) ah_outline_done( AH_Outline outline )
{ {
FT_Memory memory = outline->memory; FT_Memory memory = outline->memory;
@ -347,12 +347,12 @@
/* ah_outline_save */ /* ah_outline_save */
/* */ /* */
/* <Description> */ /* <Description> */
/* Saves the content of a given AH_OutlineRec object into a face's glyph */ /* Saves the contents of a given AH_OutlineRec object into a face's */
/* slot. */ /* glyph slot. */
/* */ /* */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_save( AH_Outline outline, ah_outline_save( AH_Outline outline,
AH_Loader gloader ) AH_Loader gloader )
{ {
AH_Point point = outline->points; AH_Point point = outline->points;
AH_Point point_limit = point + outline->num_points; AH_Point point_limit = point + outline->num_points;
@ -382,19 +382,19 @@
/* ah_outline_load */ /* ah_outline_load */
/* */ /* */
/* <Description> */ /* <Description> */
/* Loads an unscaled outline from a glyph slot into an AH_OutlineRec */ /* Loads an unscaled outline from a glyph slot into an AH_OutlineRec */
/* object. */ /* object. */
/* */ /* */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
ah_outline_load( AH_Outline outline, ah_outline_load( AH_Outline outline,
FT_Face face ) FT_Face face )
{ {
FT_Memory memory = outline->memory; FT_Memory memory = outline->memory;
FT_Error error = AH_Err_Ok; FT_Error error = AH_Err_Ok;
FT_Outline* source = &face->glyph->outline; FT_Outline* source = &face->glyph->outline;
FT_Int num_points = source->n_points; FT_Int num_points = source->n_points;
FT_Int num_contours = source->n_contours; FT_Int num_contours = source->n_contours;
AH_Point points; AH_Point points;
/* check arguments */ /* check arguments */
@ -469,8 +469,8 @@
{ {
/* do one thing at a time -- it is easier to understand, and */ /* do one thing at a time -- it is easier to understand, and */
/* the code is clearer */ /* the code is clearer */
AH_Point point; AH_Point point;
AH_Point point_limit = points + outline->num_points; AH_Point point_limit = points + outline->num_points;
/* compute coordinates */ /* compute coordinates */
@ -512,10 +512,10 @@
/* compute `next' and `prev' */ /* compute `next' and `prev' */
{ {
FT_Int contour_index; FT_Int contour_index;
AH_Point prev; AH_Point prev;
AH_Point first; AH_Point first;
AH_Point end; AH_Point end;
contour_index = 0; contour_index = 0;
@ -548,10 +548,10 @@
/* set-up the contours array */ /* set-up the contours array */
{ {
AH_Point * contour = outline->contours; AH_Point* contour = outline->contours;
AH_Point * contour_limit = contour + outline->num_contours; AH_Point* contour_limit = contour + outline->num_contours;
short* end = source->contours; short* end = source->contours;
short idx = 0; short idx = 0;
for ( ; contour < contour_limit; contour++, end++ ) for ( ; contour < contour_limit; contour++, end++ )
@ -622,11 +622,11 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_setup_uv( AH_Outline outline, ah_setup_uv( AH_Outline outline,
AH_UV source ) AH_UV source )
{ {
AH_Point point = outline->points; AH_Point point = outline->points;
AH_Point point_limit = point + outline->num_points; AH_Point point_limit = point + outline->num_points;
for ( ; point < point_limit; point++ ) for ( ; point < point_limit; point++ )
@ -677,10 +677,10 @@
/* compute all inflex points in a given glyph */ /* compute all inflex points in a given glyph */
static void static void
ah_outline_compute_inflections( AH_Outline outline ) ah_outline_compute_inflections( AH_Outline outline )
{ {
AH_Point * contour = outline->contours; AH_Point* contour = outline->contours;
AH_Point * contour_limit = contour + outline->num_contours; AH_Point* contour_limit = contour + outline->num_contours;
/* load original coordinates in (u,v) */ /* load original coordinates in (u,v) */
@ -792,7 +792,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_compute_segments( AH_Outline outline ) ah_outline_compute_segments( AH_Outline outline )
{ {
int dimension; int dimension;
AH_Segment segments; AH_Segment segments;
@ -811,28 +811,28 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Point * contour = outline->contours; AH_Point* contour = outline->contours;
AH_Point * contour_limit = contour + outline->num_contours; AH_Point* contour_limit = contour + outline->num_contours;
AH_Segment segment = segments; AH_Segment segment = segments;
FT_Int num_segments = 0; FT_Int num_segments = 0;
#ifdef AH_HINT_METRICS #ifdef AH_HINT_METRICS
AH_Point min_point = 0; AH_Point min_point = 0;
AH_Point max_point = 0; AH_Point max_point = 0;
FT_Pos min_coord = 32000; FT_Pos min_coord = 32000;
FT_Pos max_coord = -32000; FT_Pos max_coord = -32000;
#endif #endif
/* do each contour separately */ /* do each contour separately */
for ( ; contour < contour_limit; contour++ ) for ( ; contour < contour_limit; contour++ )
{ {
AH_Point point = contour[0]; AH_Point point = contour[0];
AH_Point last = point->prev; AH_Point last = point->prev;
int on_edge = 0; int on_edge = 0;
FT_Pos min_pos = +32000; /* minimum segment pos != min_coord */ FT_Pos min_pos = +32000; /* minimum segment pos != min_coord */
FT_Pos max_pos = -32000; /* maximum segment pos != max_coord */ FT_Pos max_pos = -32000; /* maximum segment pos != max_coord */
FT_Bool passed; FT_Bool passed;
#ifdef AH_HINT_METRICS #ifdef AH_HINT_METRICS
@ -961,11 +961,11 @@
/* we do this by inserting fake segments when needed */ /* we do this by inserting fake segments when needed */
if ( dimension == 0 ) if ( dimension == 0 )
{ {
AH_Point point = outline->points; AH_Point point = outline->points;
AH_Point point_limit = point + outline->num_points; AH_Point point_limit = point + outline->num_points;
FT_Pos min_pos = 32000; FT_Pos min_pos = 32000;
FT_Pos max_pos = -32000; FT_Pos max_pos = -32000;
min_point = 0; min_point = 0;
@ -1034,11 +1034,11 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_link_segments( AH_Outline outline ) ah_outline_link_segments( AH_Outline outline )
{ {
AH_Segment segments; AH_Segment segments;
AH_Segment segment_limit; AH_Segment segment_limit;
int dimension; int dimension;
ah_setup_uv( outline, AH_UV_FYX ); ah_setup_uv( outline, AH_UV_FYX );
@ -1048,14 +1048,16 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Segment seg1; AH_Segment seg1;
AH_Segment seg2; AH_Segment seg2;
/* now compare each segment to the others */ /* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ ) for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{ {
FT_Pos best_score; FT_Pos best_score;
AH_Segment best_segment; AH_Segment best_segment;
/* the fake segments are introduced to hint the metrics -- */ /* the fake segments are introduced to hint the metrics -- */
/* we must never link them to anything */ /* we must never link them to anything */
@ -1148,7 +1150,7 @@
static void static void
ah_outline_compute_edges( AH_Outline outline ) ah_outline_compute_edges( AH_Outline outline )
{ {
AH_Edge edges; AH_Edge edges;
AH_Segment segments; AH_Segment segments;
@ -1169,9 +1171,9 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Edge edge; AH_Edge edge;
AH_Edge edge_limit; /* really == edge + num_edges */ AH_Edge edge_limit; /* really == edge + num_edges */
AH_Segment seg; AH_Segment seg;
/*********************************************************************/ /*********************************************************************/
@ -1198,7 +1200,7 @@
edge_limit = edges; edge_limit = edges;
for ( seg = segments; seg < segment_limit; seg++ ) for ( seg = segments; seg < segment_limit; seg++ )
{ {
AH_Edge found = 0; AH_Edge found = 0;
/* look for an edge corresponding to the segment */ /* look for an edge corresponding to the segment */
@ -1313,8 +1315,8 @@
if ( seg->link || is_serif ) if ( seg->link || is_serif )
{ {
AH_Edge edge2; AH_Edge edge2;
AH_Segment seg2; AH_Segment seg2;
edge2 = edge->link; edge2 = edge->link;
@ -1398,10 +1400,10 @@
/* ah_outline_detect_features */ /* ah_outline_detect_features */
/* */ /* */
/* <Description> */ /* <Description> */
/* Performs feature detection on a given AH_OutlineRec object. */ /* Performs feature detection on a given AH_OutlineRec object. */
/* */ /* */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_detect_features( AH_Outline outline ) ah_outline_detect_features( AH_Outline outline )
{ {
ah_outline_compute_segments ( outline ); ah_outline_compute_segments ( outline );
ah_outline_link_segments ( outline ); ah_outline_link_segments ( outline );
@ -1420,15 +1422,15 @@
/* be snapped to a blue zone edge (top or bottom). */ /* be snapped to a blue zone edge (top or bottom). */
/* */ /* */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_compute_blue_edges( AH_Outline outline, ah_outline_compute_blue_edges( AH_Outline outline,
AH_Face_Globals face_globals ) AH_Face_Globals face_globals )
{ {
AH_Edge edge = outline->horz_edges; AH_Edge edge = outline->horz_edges;
AH_Edge edge_limit = edge + outline->num_hedges; AH_Edge edge_limit = edge + outline->num_hedges;
AH_Globals globals = &face_globals->design; AH_Globals globals = &face_globals->design;
FT_Fixed y_scale = outline->y_scale; FT_Fixed y_scale = outline->y_scale;
FT_Bool blue_active[AH_BLUE_MAX]; FT_Bool blue_active[AH_BLUE_MAX];
/* compute which blue zones are active, i.e. have their scaled */ /* compute which blue zones are active, i.e. have their scaled */
@ -1554,12 +1556,12 @@
/* edge' pointer from `design units' to `scaled ones'). */ /* edge' pointer from `design units' to `scaled ones'). */
/* */ /* */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_outline_scale_blue_edges( AH_Outline outline, ah_outline_scale_blue_edges( AH_Outline outline,
AH_Face_Globals globals ) AH_Face_Globals globals )
{ {
AH_Edge edge = outline->horz_edges; AH_Edge edge = outline->horz_edges;
AH_Edge edge_limit = edge + outline->num_hedges; AH_Edge edge_limit = edge + outline->num_hedges;
FT_Int delta; FT_Int delta;
delta = globals->scaled.blue_refs - globals->design.blue_refs; delta = globals->scaled.blue_refs - globals->design.blue_refs;

View File

@ -46,43 +46,43 @@ FT_BEGIN_HEADER
FT_LOCAL( void ) FT_LOCAL( void )
ah_setup_uv( AH_Outline outline, ah_setup_uv( AH_Outline outline,
AH_UV source ); AH_UV source );
/* AH_OutlineRec functions - they should be typically called in this order */ /* AH_OutlineRec functions - they should be typically called in this order */
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
ah_outline_new( FT_Memory memory, ah_outline_new( FT_Memory memory,
AH_Outline * aoutline ); AH_Outline* aoutline );
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
ah_outline_load( AH_Outline outline, ah_outline_load( AH_Outline outline,
FT_Face face ); FT_Face face );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_compute_segments( AH_Outline outline ); ah_outline_compute_segments( AH_Outline outline );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_link_segments( AH_Outline outline ); ah_outline_link_segments( AH_Outline outline );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_detect_features( AH_Outline outline ); ah_outline_detect_features( AH_Outline outline );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_compute_blue_edges( AH_Outline outline, ah_outline_compute_blue_edges( AH_Outline outline,
AH_Face_Globals globals ); AH_Face_Globals globals );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_scale_blue_edges( AH_Outline outline, ah_outline_scale_blue_edges( AH_Outline outline,
AH_Face_Globals globals ); AH_Face_Globals globals );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_save( AH_Outline outline, ah_outline_save( AH_Outline outline,
AH_Loader loader ); AH_Loader loader );
FT_LOCAL( void ) FT_LOCAL( void )
ah_outline_done( AH_Outline outline ); ah_outline_done( AH_Outline outline );
FT_END_HEADER FT_END_HEADER

View File

@ -27,7 +27,7 @@
#include FT_OUTLINE_H #include FT_OUTLINE_H
#define FACE_GLOBALS( face ) ((AH_Face_Globals )(face)->autohint.data) #define FACE_GLOBALS( face ) ((AH_Face_Globals)(face)->autohint.data)
#define AH_USE_IUP #define AH_USE_IUP
#define OPTIM_STEM_SNAP #define OPTIM_STEM_SNAP
@ -89,13 +89,13 @@
/* compute the snapped width of a given stem */ /* compute the snapped width of a given stem */
static FT_Pos static FT_Pos
ah_compute_stem_width( AH_Hinter hinter, ah_compute_stem_width( AH_Hinter hinter,
int vertical, int vertical,
FT_Pos width ) FT_Pos width )
{ {
AH_Globals globals = &hinter->globals->scaled; AH_Globals globals = &hinter->globals->scaled;
FT_Pos dist = width; FT_Pos dist = width;
FT_Int sign = 0; FT_Int sign = 0;
if ( dist < 0 ) if ( dist < 0 )
@ -202,9 +202,9 @@
/* align one stem edge relative to the previous stem edge */ /* align one stem edge relative to the previous stem edge */
static void static void
ah_align_linked_edge( AH_Hinter hinter, ah_align_linked_edge( AH_Hinter hinter,
AH_Edge base_edge, AH_Edge base_edge,
AH_Edge stem_edge, AH_Edge stem_edge,
int vertical ) int vertical )
{ {
FT_Pos dist = stem_edge->opos - base_edge->opos; FT_Pos dist = stem_edge->opos - base_edge->opos;
@ -216,9 +216,9 @@
static void static void
ah_align_serif_edge( AH_Hinter hinter, ah_align_serif_edge( AH_Hinter hinter,
AH_Edge base, AH_Edge base,
AH_Edge serif, AH_Edge serif,
int vertical ) int vertical )
{ {
FT_Pos dist; FT_Pos dist;
FT_Pos sign = 1; FT_Pos sign = 1;
@ -269,10 +269,10 @@
static void static void
ah_hint_edges_3( AH_Hinter hinter ) ah_hint_edges_3( AH_Hinter hinter )
{ {
AH_Edge edges; AH_Edge edges;
AH_Edge edge_limit; AH_Edge edge_limit;
AH_Outline outline = hinter->glyph; AH_Outline outline = hinter->glyph;
FT_Int dimension; FT_Int dimension;
edges = outline->horz_edges; edges = outline->horz_edges;
@ -280,9 +280,9 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Edge edge; AH_Edge edge;
AH_Edge anchor = 0; AH_Edge anchor = 0;
int has_serifs = 0; int has_serifs = 0;
if ( hinter->no_horz_hints && !dimension ) if ( hinter->no_horz_hints && !dimension )
@ -297,7 +297,7 @@
{ {
for ( edge = edges; edge < edge_limit; edge++ ) for ( edge = edges; edge < edge_limit; edge++ )
{ {
FT_Pos* blue; FT_Pos* blue;
AH_EdgeRec *edge1, *edge2; AH_EdgeRec *edge1, *edge2;
@ -340,7 +340,7 @@
/* relative order of stems in the glyph.. */ /* relative order of stems in the glyph.. */
for ( edge = edges; edge < edge_limit; edge++ ) for ( edge = edges; edge < edge_limit; edge++ )
{ {
AH_EdgeRec *edge2; AH_EdgeRec* edge2;
if ( edge->flags & AH_EDGE_DONE ) if ( edge->flags & AH_EDGE_DONE )
@ -498,10 +498,10 @@
static void static void
ah_hinter_align_edge_points( AH_Hinter hinter ) ah_hinter_align_edge_points( AH_Hinter hinter )
{ {
AH_Outline outline = hinter->glyph; AH_Outline outline = hinter->glyph;
AH_Edge edges; AH_Edge edges;
AH_Edge edge_limit; AH_Edge edge_limit;
FT_Int dimension; FT_Int dimension;
edges = outline->horz_edges; edges = outline->horz_edges;
@ -509,7 +509,7 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Edge edge; AH_Edge edge;
edge = edges; edge = edges;
@ -517,12 +517,12 @@
{ {
/* move the points of each segment */ /* move the points of each segment */
/* in each edge to the edge's position */ /* in each edge to the edge's position */
AH_Segment seg = edge->first; AH_Segment seg = edge->first;
do do
{ {
AH_Point point = seg->first; AH_Point point = seg->first;
for (;;) for (;;)
@ -559,13 +559,13 @@
static void static void
ah_hinter_align_strong_points( AH_Hinter hinter ) ah_hinter_align_strong_points( AH_Hinter hinter )
{ {
AH_Outline outline = hinter->glyph; AH_Outline outline = hinter->glyph;
FT_Int dimension; FT_Int dimension;
AH_Edge edges; AH_Edge edges;
AH_Edge edge_limit; AH_Edge edge_limit;
AH_Point points; AH_Point points;
AH_Point point_limit; AH_Point point_limit;
AH_Flags touch_flag; AH_Flags touch_flag;
points = outline->points; points = outline->points;
@ -577,8 +577,8 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Point point; AH_Point point;
AH_Edge edge; AH_Edge edge;
if ( edges < edge_limit ) if ( edges < edge_limit )
@ -632,8 +632,8 @@
/* otherwise, interpolate the point in between */ /* otherwise, interpolate the point in between */
{ {
AH_Edge before = 0; AH_Edge before = 0;
AH_Edge after = 0; AH_Edge after = 0;
for ( edge = edges; edge < edge_limit; edge++ ) for ( edge = edges; edge < edge_limit; edge++ )
@ -687,12 +687,12 @@
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION #ifndef AH_OPTION_NO_WEAK_INTERPOLATION
static void static void
ah_iup_shift( AH_Point p1, ah_iup_shift( AH_Point p1,
AH_Point p2, AH_Point p2,
AH_Point ref ) AH_Point ref )
{ {
AH_Point p; AH_Point p;
FT_Pos delta = ref->u - ref->v; FT_Pos delta = ref->u - ref->v;
for ( p = p1; p < ref; p++ ) for ( p = p1; p < ref; p++ )
@ -704,17 +704,17 @@
static void static void
ah_iup_interp( AH_Point p1, ah_iup_interp( AH_Point p1,
AH_Point p2, AH_Point p2,
AH_Point ref1, AH_Point ref1,
AH_Point ref2 ) AH_Point ref2 )
{ {
AH_Point p; AH_Point p;
FT_Pos u; FT_Pos u;
FT_Pos v1 = ref1->v; FT_Pos v1 = ref1->v;
FT_Pos v2 = ref2->v; FT_Pos v2 = ref2->v;
FT_Pos d1 = ref1->u - v1; FT_Pos d1 = ref1->u - v1;
FT_Pos d2 = ref2->u - v2; FT_Pos d2 = ref2->u - v2;
if ( p1 > p2 ) if ( p1 > p2 )
@ -775,12 +775,12 @@
static void static void
ah_hinter_align_weak_points( AH_Hinter hinter ) ah_hinter_align_weak_points( AH_Hinter hinter )
{ {
AH_Outline outline = hinter->glyph; AH_Outline outline = hinter->glyph;
FT_Int dimension; FT_Int dimension;
AH_Point points; AH_Point points;
AH_Point point_limit; AH_Point point_limit;
AH_Point * contour_limit; AH_Point* contour_limit;
AH_Flags touch_flag; AH_Flags touch_flag;
points = outline->points; points = outline->points;
@ -796,10 +796,10 @@
for ( dimension = 1; dimension >= 0; dimension-- ) for ( dimension = 1; dimension >= 0; dimension-- )
{ {
AH_Point point; AH_Point point;
AH_Point end_point; AH_Point end_point;
AH_Point first_point; AH_Point first_point;
AH_Point * contour; AH_Point* contour;
point = points; point = points;
@ -816,8 +816,8 @@
if ( point <= end_point ) if ( point <= end_point )
{ {
AH_Point first_touched = point; AH_Point first_touched = point;
AH_Point cur_touched = point; AH_Point cur_touched = point;
point++; point++;
@ -907,13 +907,13 @@
/* scale and fit the global metrics */ /* scale and fit the global metrics */
static void static void
ah_hinter_scale_globals( AH_Hinter hinter, ah_hinter_scale_globals( AH_Hinter hinter,
FT_Fixed x_scale, FT_Fixed x_scale,
FT_Fixed y_scale ) FT_Fixed y_scale )
{ {
FT_Int n; FT_Int n;
AH_Face_Globals globals = hinter->globals; AH_Face_Globals globals = hinter->globals;
AH_Globals design = &globals->design; AH_Globals design = &globals->design;
AH_Globals scaled = &globals->scaled; AH_Globals scaled = &globals->scaled;
/* copy content */ /* copy content */
@ -994,12 +994,12 @@
/* create a new empty hinter object */ /* create a new empty hinter object */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
ah_hinter_new( FT_Library library, ah_hinter_new( FT_Library library,
AH_Hinter* ahinter ) AH_Hinter *ahinter )
{ {
AH_Hinter hinter = 0; AH_Hinter hinter = 0;
FT_Memory memory = library->memory; FT_Memory memory = library->memory;
FT_Error error; FT_Error error;
*ahinter = 0; *ahinter = 0;
@ -1030,13 +1030,13 @@
/* create a face's autohint globals */ /* create a face's autohint globals */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
ah_hinter_new_face_globals( AH_Hinter hinter, ah_hinter_new_face_globals( AH_Hinter hinter,
FT_Face face, FT_Face face,
AH_Globals globals ) AH_Globals globals )
{ {
FT_Error error; FT_Error error;
FT_Memory memory = hinter->memory; FT_Memory memory = hinter->memory;
AH_Face_Globals face_globals; AH_Face_Globals face_globals;
if ( FT_NEW( face_globals ) ) if ( FT_NEW( face_globals ) )
@ -1062,7 +1062,7 @@
/* discard a face's autohint globals */ /* discard a face's autohint globals */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_hinter_done_face_globals( AH_Face_Globals globals ) ah_hinter_done_face_globals( AH_Face_Globals globals )
{ {
FT_Face face = globals->face; FT_Face face = globals->face;
FT_Memory memory = face->memory; FT_Memory memory = face->memory;
@ -1073,10 +1073,10 @@
static FT_Error static FT_Error
ah_hinter_load( AH_Hinter hinter, ah_hinter_load( AH_Hinter hinter,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_Int32 load_flags, FT_Int32 load_flags,
FT_UInt depth ) FT_UInt depth )
{ {
FT_Face face = hinter->face; FT_Face face = hinter->face;
FT_GlyphSlot slot = face->glyph; FT_GlyphSlot slot = face->glyph;
@ -1087,6 +1087,7 @@
AH_Outline outline = hinter->glyph; AH_Outline outline = hinter->glyph;
AH_Loader gloader = hinter->loader; AH_Loader gloader = hinter->loader;
/* load the glyph */ /* load the glyph */
error = FT_Load_Glyph( face, glyph_index, load_flags ); error = FT_Load_Glyph( face, glyph_index, load_flags );
if ( error ) if ( error )
@ -1184,10 +1185,10 @@
/* we now need to hint the metrics according to the change in */ /* we now need to hint the metrics according to the change in */
/* width/positioning that occured during the hinting process */ /* width/positioning that occured during the hinting process */
{ {
FT_Pos old_advance, old_rsb, old_lsb, new_lsb; FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
AH_Edge edge1 = outline->vert_edges; /* leftmost edge */ AH_Edge edge1 = outline->vert_edges; /* leftmost edge */
AH_Edge edge2 = edge1 + AH_Edge edge2 = edge1 +
outline->num_vedges - 1; /* rightmost edge */ outline->num_vedges - 1; /* rightmost edge */
old_advance = hinter->pp2.x; old_advance = hinter->pp2.x;
@ -1404,12 +1405,12 @@
FT_UInt glyph_index, FT_UInt glyph_index,
FT_Int32 load_flags ) FT_Int32 load_flags )
{ {
FT_Face face = slot->face; FT_Face face = slot->face;
FT_Error error; FT_Error error;
FT_Fixed x_scale = size->metrics.x_scale; FT_Fixed x_scale = size->metrics.x_scale;
FT_Fixed y_scale = size->metrics.y_scale; FT_Fixed y_scale = size->metrics.y_scale;
AH_Face_Globals face_globals = FACE_GLOBALS( face ); AH_Face_Globals face_globals = FACE_GLOBALS( face );
FT_Render_Mode hint_mode = FT_LOAD_TARGET_MODE(load_flags); FT_Render_Mode hint_mode = FT_LOAD_TARGET_MODE(load_flags);
/* first of all, we need to check that we're using the correct face and */ /* first of all, we need to check that we're using the correct face and */
@ -1443,16 +1444,16 @@
#ifdef DEBUG_HINTER #ifdef DEBUG_HINTER
hinter->no_horz_hints = ah_debug_disable_vert; /* not a bug, the meaning */ hinter->no_horz_hints = ah_debug_disable_vert; /* not a bug, the meaning */
hinter->no_vert_hints = ah_debug_disable_horz; /* of h/v is inverted !! */ hinter->no_vert_hints = ah_debug_disable_horz; /* of h/v is inverted! */
#endif #endif
/* we snap the width of vertical stems for the monochrome and horizontal */ /* we snap the width of vertical stems for the monochrome and */
/* LCD rendering targets only. Corresponds to X snapping */ /* horizontal LCD rendering targets only. Corresponds to X snapping. */
hinter->no_horz_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_NORMAL || hinter->no_horz_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_NORMAL ||
hint_mode == FT_RENDER_MODE_LCD_V ); hint_mode == FT_RENDER_MODE_LCD_V );
/* we snap the width of horizontal stems for the monochrome and vertical */ /* we snap the width of horizontal stems for the monochrome and */
/* LCD rendering targets only. Corresponds to Y snapping */ /* vertical LCD rendering targets only. Corresponds to Y snapping. */
hinter->no_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_NORMAL || hinter->no_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_NORMAL ||
hint_mode == FT_RENDER_MODE_LCD ); hint_mode == FT_RENDER_MODE_LCD );
@ -1473,13 +1474,13 @@
/* retrieve a face's autohint globals for client applications */ /* retrieve a face's autohint globals for client applications */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_hinter_get_global_hints( AH_Hinter hinter, ah_hinter_get_global_hints( AH_Hinter hinter,
FT_Face face, FT_Face face,
void** global_hints, void** global_hints,
long* global_len ) long* global_len )
{ {
AH_Globals globals = 0; AH_Globals globals = 0;
FT_Memory memory = hinter->memory; FT_Memory memory = hinter->memory;
FT_Error error; FT_Error error;
/* allocate new master globals */ /* allocate new master globals */
@ -1510,7 +1511,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
ah_hinter_done_global_hints( AH_Hinter hinter, ah_hinter_done_global_hints( AH_Hinter hinter,
void* global_hints ) void* global_hints )
{ {
FT_Memory memory = hinter->memory; FT_Memory memory = hinter->memory;

View File

@ -38,7 +38,7 @@ FT_BEGIN_HEADER
/* create a new empty hinter object */ /* create a new empty hinter object */
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
ah_hinter_new( FT_Library library, ah_hinter_new( FT_Library library,
AH_Hinter* ahinter ); AH_Hinter* ahinter );
/* Load a hinted glyph in the hinter */ /* Load a hinted glyph in the hinter */
@ -54,13 +54,13 @@ FT_BEGIN_HEADER
ah_hinter_done( AH_Hinter hinter ); ah_hinter_done( AH_Hinter hinter );
FT_LOCAL( void ) FT_LOCAL( void )
ah_hinter_done_face_globals( AH_Face_Globals globals ); ah_hinter_done_face_globals( AH_Face_Globals globals );
FT_LOCAL( void ) FT_LOCAL( void )
ah_hinter_get_global_hints( AH_Hinter hinter, ah_hinter_get_global_hints( AH_Hinter hinter,
FT_Face face, FT_Face face,
void** global_hints, void** global_hints,
long* global_len ); long* global_len );
FT_LOCAL( void ) FT_LOCAL( void )
ah_hinter_done_global_hints( AH_Hinter hinter, ah_hinter_done_global_hints( AH_Hinter hinter,

View File

@ -25,15 +25,15 @@
#ifdef DEBUG_HINTER #ifdef DEBUG_HINTER
AH_Hinter ah_debug_hinter = NULL; AH_Hinter ah_debug_hinter = NULL;
FT_Bool ah_debug_disable_horz = 0; FT_Bool ah_debug_disable_horz = 0;
FT_Bool ah_debug_disable_vert = 0; FT_Bool ah_debug_disable_vert = 0;
#endif #endif
typedef struct FT_AutoHinterRec_ typedef struct FT_AutoHinterRec_
{ {
FT_ModuleRec root; FT_ModuleRec root;
AH_Hinter hinter; AH_Hinter hinter;
} FT_AutoHinterRec; } FT_AutoHinterRec;
@ -83,7 +83,7 @@
FT_UNUSED( module ); FT_UNUSED( module );
if ( face->autohint.data ) if ( face->autohint.data )
ah_hinter_done_face_globals( (AH_Face_Globals )(face->autohint.data) ); ah_hinter_done_face_globals( (AH_Face_Globals)(face->autohint.data) );
} }

View File

@ -157,8 +157,8 @@
static int static int
valid_stem_segments( AH_Segment seg1, valid_stem_segments( AH_Segment seg1,
AH_Segment seg2 ) AH_Segment seg2 )
{ {
return seg1->serif == 0 && return seg1->serif == 0 &&
seg2 && seg2 &&
@ -173,15 +173,15 @@
static int static int
optim_compute_stems( AH_Optimizer* optimizer ) optim_compute_stems( AH_Optimizer* optimizer )
{ {
AH_Outline outline = optimizer->outline; AH_Outline outline = optimizer->outline;
FT_Fixed scale; FT_Fixed scale;
FT_Memory memory = optimizer->memory; FT_Memory memory = optimizer->memory;
FT_Error error = 0; FT_Error error = 0;
FT_Int dimension; FT_Int dimension;
AH_Edge edges; AH_Edge edges;
AH_Edge edge_limit; AH_Edge edge_limit;
AH_Stem** p_stems; AH_Stem** p_stems;
FT_Int* p_num_stems; FT_Int* p_num_stems;
edges = outline->horz_edges; edges = outline->horz_edges;
@ -201,7 +201,7 @@
/* first of all, count the number of stems in this direction */ /* first of all, count the number of stems in this direction */
for ( edge = edges; edge < edge_limit; edge++ ) for ( edge = edges; edge < edge_limit; edge++ )
{ {
AH_Segment seg = edge->first; AH_Segment seg = edge->first;
do do
@ -226,8 +226,8 @@
stem = stems; stem = stems;
for ( edge = edges; edge < edge_limit; edge++ ) for ( edge = edges; edge < edge_limit; edge++ )
{ {
AH_Segment seg = edge->first; AH_Segment seg = edge->first;
AH_Segment seg2; AH_Segment seg2;
do do
@ -235,8 +235,8 @@
seg2 = seg->link; seg2 = seg->link;
if ( valid_stem_segments( seg, seg2 ) ) if ( valid_stem_segments( seg, seg2 ) )
{ {
AH_Edge edge1 = seg->edge; AH_Edge edge1 = seg->edge;
AH_Edge edge2 = seg2->edge; AH_Edge edge2 = seg2->edge;
stem->edge1 = edge1; stem->edge1 = edge1;

View File

@ -37,22 +37,22 @@ FT_BEGIN_HEADER
typedef struct AH_Stem_ typedef struct AH_Stem_
{ {
FT_Pos pos; /* current position */ FT_Pos pos; /* current position */
FT_Pos velocity; /* current velocity */ FT_Pos velocity; /* current velocity */
FT_Pos force; /* sum of current forces */ FT_Pos force; /* sum of current forces */
FT_Pos width; /* normalized width */ FT_Pos width; /* normalized width */
FT_Pos min_pos; /* minimum grid position */ FT_Pos min_pos; /* minimum grid position */
FT_Pos max_pos; /* maximum grid position */ FT_Pos max_pos; /* maximum grid position */
AH_Edge edge1; /* left/bottom edge */ AH_Edge edge1; /* left/bottom edge */
AH_Edge edge2; /* right/top edge */ AH_Edge edge2; /* right/top edge */
FT_Pos opos; /* original position */ FT_Pos opos; /* original position */
FT_Pos owidth; /* original width */ FT_Pos owidth; /* original width */
FT_Pos min_coord; /* minimum coordinate */ FT_Pos min_coord; /* minimum coordinate */
FT_Pos max_coord; /* maximum coordinate */ FT_Pos max_coord; /* maximum coordinate */
} AH_Stem; } AH_Stem;

View File

@ -183,7 +183,8 @@ FT_BEGIN_HEADER
/* AH_PointRec */ /* AH_PointRec */
/* */ /* */
/* <Description> */ /* <Description> */
/* A structure used to model an outline point to the AH_OutlineRec type. */ /* A structure used to model an outline point to the AH_OutlineRec */
/* type. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* flags :: The current point hint flags. */ /* flags :: The current point hint flags. */
@ -266,14 +267,14 @@ FT_BEGIN_HEADER
/* */ /* */
/* score :: Used to score the segment when selecting them. */ /* score :: Used to score the segment when selecting them. */
/* */ /* */
typedef struct AH_SegmentRec_ typedef struct AH_SegmentRec_
{ {
AH_Edge_Flags flags; AH_Edge_Flags flags;
AH_Direction dir; AH_Direction dir;
AH_Point first; /* first point in edge segment */ AH_Point first; /* first point in edge segment */
AH_Point last; /* last point in edge segment */ AH_Point last; /* last point in edge segment */
AH_Point * contour; /* ptr to first point of segment's contour */ AH_Point* contour; /* ptr to first point of segment's contour */
FT_Pos pos; /* position of segment */ FT_Pos pos; /* position of segment */
FT_Pos min_coord; /* minimum coordinate of segment */ FT_Pos min_coord; /* minimum coordinate of segment */
@ -327,7 +328,7 @@ FT_BEGIN_HEADER
/* Only set for some of the horizontal edges in a Latin */ /* Only set for some of the horizontal edges in a Latin */
/* font. */ /* font. */
/* */ /* */
typedef struct AH_EdgeRec_ typedef struct AH_EdgeRec_
{ {
AH_Edge_Flags flags; AH_Edge_Flags flags;
AH_Direction dir; AH_Direction dir;

View File

@ -215,7 +215,7 @@
(FT_Glyph_DoneFunc) ft_bitmap_glyph_done, (FT_Glyph_DoneFunc) ft_bitmap_glyph_done,
(FT_Glyph_CopyFunc) ft_bitmap_glyph_copy, (FT_Glyph_CopyFunc) ft_bitmap_glyph_copy,
(FT_Glyph_TransformFunc)0, (FT_Glyph_TransformFunc)0,
(FT_Glyph_GetBBoxFunc) ft_bitmap_glyph_bbox, (FT_Glyph_GetBBoxFunc) ft_bitmap_glyph_bbox,
(FT_Glyph_PrepareFunc) 0 (FT_Glyph_PrepareFunc) 0
}; };
@ -336,7 +336,7 @@
(FT_Glyph_DoneFunc) ft_outline_glyph_done, (FT_Glyph_DoneFunc) ft_outline_glyph_done,
(FT_Glyph_CopyFunc) ft_outline_glyph_copy, (FT_Glyph_CopyFunc) ft_outline_glyph_copy,
(FT_Glyph_TransformFunc)ft_outline_glyph_transform, (FT_Glyph_TransformFunc)ft_outline_glyph_transform,
(FT_Glyph_GetBBoxFunc) ft_outline_glyph_bbox, (FT_Glyph_GetBBoxFunc) ft_outline_glyph_bbox,
(FT_Glyph_PrepareFunc) ft_outline_glyph_prepare (FT_Glyph_PrepareFunc) ft_outline_glyph_prepare
}; };

View File

@ -404,9 +404,9 @@
/* documentation is in freetype.h */ /* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Error ) FT_EXPORT_DEF( FT_Error )
FT_Load_Glyph( FT_Face face, FT_Load_Glyph( FT_Face face,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_Int32 load_flags ) FT_Int32 load_flags )
{ {
FT_Error error; FT_Error error;
FT_Driver driver; FT_Driver driver;

View File

@ -308,7 +308,7 @@ THE SOFTWARE.
prop = bdf_get_font_property( font, (char *)"AVERAGE_WIDTH" ); prop = bdf_get_font_property( font, (char *)"AVERAGE_WIDTH" );
if ( ( prop != NULL ) && ( prop->value.int32 >= 10 ) ) if ( ( prop != NULL ) && ( prop->value.int32 >= 10 ) )
root->available_sizes->width = (short)( prop->value.int32 / 10 ); root->available_sizes->width = (short)( prop->value.int32 / 10 );
prop = bdf_get_font_property( font, (char *)"PIXEL_SIZE" ); prop = bdf_get_font_property( font, (char *)"PIXEL_SIZE" );
if ( prop != NULL ) if ( prop != NULL )

View File

@ -573,13 +573,17 @@
/* For incremental fonts get the character data using the */ /* For incremental fonts get the character data using the */
/* callback function. */ /* callback function. */
if ( face->root.internal->incremental_interface ) if ( face->root.internal->incremental_interface )
{ {
FT_Data data; FT_Data data;
FT_Error error = face->root.internal->incremental_interface->funcs->get_glyph_data( FT_Error error =
face->root.internal->incremental_interface->object, face->root.internal->incremental_interface->funcs->get_glyph_data(
glyph_index, &data ); face->root.internal->incremental_interface->object,
glyph_index, &data );
*pointer = (FT_Byte*)data.pointer; *pointer = (FT_Byte*)data.pointer;
*length = data.length; *length = data.length;
return error; return error;
} }
else else
@ -587,6 +591,8 @@
{ {
CFF_Font cff = (CFF_Font)(face->extra.data); CFF_Font cff = (CFF_Font)(face->extra.data);
return cff_index_access_element( &cff->charstrings_index, glyph_index, return cff_index_access_element( &cff->charstrings_index, glyph_index,
pointer, length ); pointer, length );
} }
@ -606,10 +612,13 @@
/* For incremental fonts get the character data using the */ /* For incremental fonts get the character data using the */
/* callback function. */ /* callback function. */
if ( face->root.internal->incremental_interface ) if ( face->root.internal->incremental_interface )
{ {
FT_Data data; FT_Data data;
data.pointer = *pointer;
data.length = length;
data.pointer = *pointer;
data.length = length;
face->root.internal->incremental_interface->funcs->free_glyph_data( face->root.internal->incremental_interface->funcs->free_glyph_data(
face->root.internal->incremental_interface->object,&data ); face->root.internal->incremental_interface->object,&data );
} }
@ -617,7 +626,9 @@
#endif /* FT_CONFIG_OPTION_INCREMENTAL */ #endif /* FT_CONFIG_OPTION_INCREMENTAL */
{ {
CFF_Font cff = (CFF_Font)(face->extra.data); CFF_Font cff = (CFF_Font)(face->extra.data);
cff_index_forget_element( &cff->charstrings_index, pointer ); cff_index_forget_element( &cff->charstrings_index, pointer );
} }
} }
@ -638,11 +649,12 @@
FT_Byte* charstring; FT_Byte* charstring;
FT_ULong charstring_len; FT_ULong charstring_len;
#ifdef FT_CONFIG_OPTION_INCREMENTAL #ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts don't necessarily have valid charsets. */ /* Incremental fonts don't necessarily have valid charsets. */
/* They use the character code, not the glyph index, in this case. */ /* They use the character code, not the glyph index, in this case. */
if ( face->root.internal->incremental_interface ) if ( face->root.internal->incremental_interface )
{ {
bchar_index = bchar; bchar_index = bchar;
achar_index = achar; achar_index = achar;
} }
@ -651,9 +663,10 @@
{ {
CFF_Font cff = (CFF_Font)(face->extra.data); CFF_Font cff = (CFF_Font)(face->extra.data);
bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar ); bchar_index = cff_lookup_glyph_by_stdcharcode( cff, bchar );
achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar ); achar_index = cff_lookup_glyph_by_stdcharcode( cff, achar );
} }
if ( bchar_index < 0 || achar_index < 0 ) if ( bchar_index < 0 || achar_index < 0 )
{ {
@ -2320,7 +2333,7 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL #ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Control data and length may not be available for incremental */ /* Control data and length may not be available for incremental */
/* fonts. */ /* fonts. */
if ( face->root.internal->incremental_interface ) if ( face->root.internal->incremental_interface )
{ {
@ -2334,11 +2347,13 @@
/* See how charstring loads at cff_index_access_element() in */ /* See how charstring loads at cff_index_access_element() in */
/* cffload.c. */ /* cffload.c. */
{ {
CFF_IndexRec csindex = cff->charstrings_index; CFF_IndexRec csindex = cff->charstrings_index;
glyph->root.control_data =
csindex.bytes + csindex.offsets[glyph_index] - 1;
glyph->root.control_len = glyph->root.control_data =
charstring_len; csindex.bytes + csindex.offsets[glyph_index] - 1;
glyph->root.control_len =
charstring_len;
} }
} }

View File

@ -123,7 +123,7 @@
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
CID_Size_Init( CID_Size size ) cid_size_init( CID_Size size )
{ {
FT_Error error = 0; FT_Error error = 0;
PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size ); PSH_Globals_Funcs funcs = cid_size_get_globals_funcs( size );

View File

@ -123,7 +123,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
CID_Size_Init( CID_Size size ); cid_size_init( CID_Size size );
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )

View File

@ -93,7 +93,7 @@
(FT_Face_InitFunc) cid_face_init, (FT_Face_InitFunc) cid_face_init,
(FT_Face_DoneFunc) cid_face_done, (FT_Face_DoneFunc) cid_face_done,
(FT_Size_InitFunc) CID_Size_Init, (FT_Size_InitFunc) cid_size_init,
(FT_Size_DoneFunc) cid_size_done, (FT_Size_DoneFunc) cid_size_done,
(FT_Slot_InitFunc) cid_slot_init, (FT_Slot_InitFunc) cid_slot_init,
(FT_Slot_DoneFunc) cid_slot_done, (FT_Slot_DoneFunc) cid_slot_done,

View File

@ -58,7 +58,7 @@
t1_builder_done, t1_builder_done,
t1_builder_check_points, t1_builder_check_points,
t1_builder_add_point, t1_builder_add_point,
T1_Builder_Add_Point1, t1_builder_add_point1,
t1_builder_add_contour, t1_builder_add_contour,
t1_builder_start_point, t1_builder_start_point,
t1_builder_close_contour t1_builder_close_contour

View File

@ -1270,7 +1270,7 @@
/* check space for a new on-curve point, then add it */ /* check space for a new on-curve point, then add it */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
T1_Builder_Add_Point1( T1_Builder builder, t1_builder_add_point1( T1_Builder builder,
FT_Pos x, FT_Pos x,
FT_Pos y ) FT_Pos y )
{ {
@ -1328,7 +1328,7 @@
builder->path_begun = 1; builder->path_begun = 1;
error = t1_builder_add_contour( builder ); error = t1_builder_add_contour( builder );
if ( !error ) if ( !error )
error = T1_Builder_Add_Point1( builder, x, y ); error = t1_builder_add_point1( builder, x, y );
} }
return error; return error;
} }

View File

@ -164,7 +164,7 @@ FT_BEGIN_HEADER
FT_Byte flag ); FT_Byte flag );
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
T1_Builder_Add_Point1( T1_Builder builder, t1_builder_add_point1( T1_Builder builder,
FT_Pos x, FT_Pos x,
FT_Pos y ); FT_Pos y );

View File

@ -350,7 +350,7 @@
#define start_point t1_builder_start_point #define start_point t1_builder_start_point
#define check_points t1_builder_check_points #define check_points t1_builder_check_points
#define add_point t1_builder_add_point #define add_point t1_builder_add_point
#define add_point1 T1_Builder_Add_Point1 #define add_point1 t1_builder_add_point1
#define add_contour t1_builder_add_contour #define add_contour t1_builder_add_contour
#define close_contour t1_builder_close_contour #define close_contour t1_builder_close_contour

View File

@ -50,7 +50,7 @@
PSH3_Hint hint2 ) PSH3_Hint hint2 )
{ {
return ( hint1->org_pos + hint1->org_len >= hint2->org_pos && return ( hint1->org_pos + hint1->org_len >= hint2->org_pos &&
hint2->org_pos + hint2->org_len >= hint1->org_pos ); hint2->org_pos + hint2->org_len >= hint1->org_pos );
} }
@ -503,18 +503,18 @@
/* the stem is less than one pixel, we will center it */ /* the stem is less than one pixel, we will center it */
/* around the nearest pixel center */ /* around the nearest pixel center */
/* */ /* */
pos = ( pos + (len >> 1) & -64 ); pos = ( pos + ( (len >> 1) & -64 ) );
len = 64; len = 64;
} }
else else
{ {
FT_Pos delta = len - dim->stdw.widths[0].cur; FT_Pos Delta = len - dim->stdw.widths[0].cur;
if ( delta < 0 ) if ( Delta < 0 )
delta = -delta; Delta = -Delta;
if ( delta < 40 ) if ( Delta < 40 )
{ {
len = dim->stdw.widths[0].cur; len = dim->stdw.widths[0].cur;
if ( len < 32 ) if ( len < 32 )
@ -523,20 +523,20 @@
if ( len < 3 * 64 ) if ( len < 3 * 64 )
{ {
delta = ( len & 63 ); Delta = ( len & 63 );
len &= -64; len &= -64;
if ( delta < 10 ) if ( Delta < 10 )
len += delta; len += Delta;
else if ( delta < 32 ) else if ( Delta < 32 )
len += 10; len += 10;
else if ( delta < 54 ) else if ( Delta < 54 )
len += 54; len += 54;
else else
len += delta; len += Delta;
} }
else else
len = ( len + 32 ) & -64; len = ( len + 32 ) & -64;

View File

@ -559,8 +559,8 @@
/* */ /* */
static FT_Error static FT_Error
tt_face_load_generic_header( TT_Face face, tt_face_load_generic_header( TT_Face face,
FT_Stream stream, FT_Stream stream,
FT_ULong tag ) FT_ULong tag )
{ {
FT_Error error; FT_Error error;
TT_Header* header; TT_Header* header;

View File

@ -622,9 +622,9 @@
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
tt_face_set_sbit_strike( TT_Face face, tt_face_set_sbit_strike( TT_Face face,
FT_Int x_ppem, FT_Int x_ppem,
FT_Int y_ppem, FT_Int y_ppem,
FT_ULong *astrike_index ) FT_ULong *astrike_index )
{ {
FT_Int i; FT_Int i;

View File

@ -153,7 +153,7 @@
pitch = width; pitch = width;
if ( hmul ) if ( hmul )
{ {
width = width*hmul; width = width * hmul;
pitch = ( width + 3 ) & -4; pitch = ( width + 3 ) & -4;
} }
@ -184,6 +184,7 @@
FT_Int n; FT_Int n;
FT_Vector* vec; FT_Vector* vec;
if ( hmul ) if ( hmul )
for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ ) for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
vec->x *= hmul; vec->x *= hmul;
@ -201,6 +202,7 @@
FT_Int n; FT_Int n;
FT_Vector* vec; FT_Vector* vec;
if ( hmul ) if ( hmul )
for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ ) for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
vec->x /= hmul; vec->x /= hmul;
@ -210,7 +212,6 @@
vec->y /= vmul; vec->y /= vmul;
} }
FT_Outline_Translate( outline, cbox.xMin, cbox.yMin ); FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );
if ( error ) if ( error )
@ -228,7 +229,6 @@
} }
/* convert a slot's glyph image into a bitmap */ /* convert a slot's glyph image into a bitmap */
static FT_Error static FT_Error
ft_smooth_render( FT_Renderer render, ft_smooth_render( FT_Renderer render,
@ -268,7 +268,6 @@
} }
FT_CALLBACK_TABLE_DEF FT_CALLBACK_TABLE_DEF
const FT_Renderer_Class ft_smooth_renderer_class = const FT_Renderer_Class ft_smooth_renderer_class =
{ {

View File

@ -93,7 +93,7 @@
FT_UShort k = header->number_Of_HMetrics; FT_UShort k = header->number_Of_HMetrics;
if (k == 0) if ( k == 0 )
{ {
*bearing = *advance = 0; *bearing = *advance = 0;
return; return;

View File

@ -164,7 +164,7 @@
(FT_Byte**)type1->glyph_names, (FT_Byte**)type1->glyph_names,
face->blend, face->blend,
0, 0,
0, FT_RENDER_MODE_NORMAL,
T1_Parse_Glyph ); T1_Parse_Glyph );
if ( error ) if ( error )
return error; return error;