diff --git a/include/freetype/ftbbox.h b/include/freetype/ftbbox.h index 2695cdd77..e1446647d 100644 --- a/include/freetype/ftbbox.h +++ b/include/freetype/ftbbox.h @@ -7,8 +7,8 @@ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ -/* This file is part of the FreeType project, and may only be used */ -/* modified and distributed under the terms of the FreeType project */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ diff --git a/include/freetype/fterrors.h b/include/freetype/fterrors.h index 0ae4b628d..9fb8099b8 100644 --- a/include/freetype/fterrors.h +++ b/include/freetype/fterrors.h @@ -2,7 +2,7 @@ /* */ /* fterrors.h */ /* */ -/* FreeType error codes (specification). */ +/* FreeType error codes (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/ftglyph.h b/include/freetype/ftglyph.h index 8b374a89d..0647c883e 100644 --- a/include/freetype/ftglyph.h +++ b/include/freetype/ftglyph.h @@ -2,7 +2,7 @@ /* */ /* ftglyph.h */ /* */ -/* FreeType convenience functions to handle glyphs.. */ +/* FreeType convenience functions to handle glyphs (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h index e61443c3b..71d6ca889 100644 --- a/include/freetype/ftimage.h +++ b/include/freetype/ftimage.h @@ -2,10 +2,11 @@ /* */ /* ftimage.h */ /* */ -/* FreeType glyph image formats and default raster interface. */ +/* FreeType glyph image formats and default raster interface */ +/* (specification). */ /* */ /* Copyright 1996-2000 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, */ /* modified, and distributed under the terms of the FreeType project */ diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h index 0dd1f5a88..db5db0464 100644 --- a/include/freetype/ftmm.h +++ b/include/freetype/ftmm.h @@ -2,7 +2,7 @@ /* */ /* ftmm.h */ /* */ -/* FreeType Multiple Master font interface. */ +/* FreeType Multiple Master font interface (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -47,7 +47,7 @@ FT_String* name; FT_Long minimum; FT_Long maximum; - + } FT_MM_Axis; @@ -75,13 +75,13 @@ FT_UInt num_axis; FT_UInt num_designs; FT_MM_Axis axis[T1_MAX_MM_AXIS]; - + } FT_Multi_Master; typedef FT_Error (*FT_Get_MM_Func)( FT_Face face, FT_Multi_Master* master ); - + typedef FT_Error (*FT_Set_MM_Design_Func)( FT_Face face, FT_UInt num_coords, FT_Long* coords ); diff --git a/include/freetype/ftmodule.h b/include/freetype/ftmodule.h index 258bbf5ca..3c09aa2af 100644 --- a/include/freetype/ftmodule.h +++ b/include/freetype/ftmodule.h @@ -2,7 +2,7 @@ /* */ /* ftmodule.h */ /* */ -/* FreeType modules public interface. */ +/* FreeType modules public interface (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -99,7 +99,7 @@ FT_Module_Constructor module_init; FT_Module_Destructor module_done; FT_Module_Requester get_interface; - + } FT_Module_Class; @@ -151,32 +151,6 @@ const char* module_name ); - /*************************************************************************/ - /* */ - /* */ - /* FT_Get_Module_Interface */ - /* */ - /* */ - /* Finds a module and returns its specific interface as a typeless */ - /* pointer. */ - /* */ - /* */ - /* library :: A handle to the library object. */ - /* */ - /* module_name :: The module's name (as an ASCII string). */ - /* */ - /* */ - /* A module-specific interface if available, 0 otherwise. */ - /* */ - /* */ - /* You should better be familiar with FreeType internals to know */ - /* which module to look for, and what its interface is :-) */ - /* */ - FT_EXPORT_DEF( const void* ) FT_Get_Module_Interface( - FT_Library library, - const char* mod_name ); - - /*************************************************************************/ /* */ /* */ @@ -244,7 +218,7 @@ typedef void (*FT_DebugHook_Func)( void* arg ); - + /*************************************************************************/ /* */ /* */ diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h index 523064ea5..1e448bd0e 100644 --- a/include/freetype/ftoutln.h +++ b/include/freetype/ftoutln.h @@ -2,8 +2,8 @@ /* */ /* ftoutln.h */ /* */ -/* Support for the FT_Outline type (used to store glyph shapes of */ -/* most scalable font formats) */ +/* Support for the FT_Outline type used to store glyph shapes of */ +/* most scalable font formats (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h index a4b477750..fe5acd2ce 100644 --- a/include/freetype/ftrender.h +++ b/include/freetype/ftrender.h @@ -2,7 +2,7 @@ /* */ /* ftrender.h */ /* */ -/* FreeType renderer modules public interface */ +/* FreeType renderer modules public interface (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/ftsystem.h b/include/freetype/ftsystem.h index f88c41e90..bc74bced2 100644 --- a/include/freetype/ftsystem.h +++ b/include/freetype/ftsystem.h @@ -2,7 +2,7 @@ /* */ /* ftsystem.h */ /* */ -/* FreeType low-level system interface definition */ +/* FreeType low-level system interface definition (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/fttypes.h b/include/freetype/fttypes.h index 8889bb51c..ec909061d 100644 --- a/include/freetype/fttypes.h +++ b/include/freetype/fttypes.h @@ -2,7 +2,7 @@ /* */ /* fttypes.h */ /* */ -/* FreeType simple types definitions */ +/* FreeType simple types definitions (specification only). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h index b3409f532..5d35a5dcd 100644 --- a/include/freetype/internal/autohint.h +++ b/include/freetype/internal/autohint.h @@ -2,7 +2,7 @@ /* */ /* autohint.h */ /* */ -/* High-level `autohint" module-specific interface (specification) */ +/* High-level `autohint' module-specific interface (specification). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -13,159 +13,172 @@ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ -/* */ -/* The auto-hinter is used to load and automatically hint glyphs */ -/* when a format-specific hinter isn't available.. */ -/* */ /***************************************************************************/ + + /*************************************************************************/ + /* */ + /* The auto-hinter is used to load and automatically hint glyphs if a */ + /* format-specific hinter isn't available. */ + /* */ + /*************************************************************************/ + + #ifndef AUTOHINT_H #define AUTOHINT_H - /*************************************************************************** - * - * A small technical note regarding automatic hinting in order to clarify - * this module interface. - * - * An automatic hinter might compute two kinds of data for a given face: - * - * - global hints: usually some metrics that describe global properties - * of the face. It is computed by scanning more or less - * agressively the glyphs in the face, and thus can be - * very slow to compute (even if the size of global hints - * is really small) - * - * - glyph hints: these describe some important features of the glyph - * outline, as well as how to align them. They are generally - * much faster to compute than global hints. - * - * The current FreeType auto-hinter does a pretty good job while performing - * fast computations for both global and glyph hints. However, we might be - * interested in introducing more complex and powerful algorithms in the - * future, like the one described in the John D. Hobby paper, which - * unfortunately require a lot more horsepower. - * - * Because a sufficiently sophisticated font management system would - * typically implement a LRU cache of opened face objects to reduce memory - * usage, it is a good idea to be able to avoid recomputing global hints - * every time the same face is re-opened. - * - * We thus provide the ability to cache global hints outside of the face - * object, in order to speed up font re-opening time. Of course, this - * feature is purely optional, so most client programs won't even notice - * it :o) - * - * I initially though that it'd be a good idea to cache the glyph hints too, - * however, if my general idea now is that if you really need to cache these - * too, you're simply in need of a new font format, where all this information - * could be stored within the font file and decoded on the fly :-) - * - */ + + /*************************************************************************/ + /* */ + /* A small technical note regarding automatic hinting in order to */ + /* clarify this module interface. */ + /* */ + /* An automatic hinter might compute two kinds of data for a given face: */ + /* */ + /* - global hints: Usually some metrics that describe global properties */ + /* of the face. It is computed by scanning more or less */ + /* agressively the glyphs in the face, and thus can be */ + /* very slow to compute (even if the size of global */ + /* hints is really small). */ + /* */ + /* - glyph hints: These describe some important features of the glyph */ + /* outline, as well as how to align them. They are */ + /* generally much faster to compute than global hints. */ + /* */ + /* The current FreeType auto-hinter does a pretty good job while */ + /* performing fast computations for both global and glyph hints. */ + /* However, we might be interested in introducing more complex and */ + /* powerful algorithms in the future, like the one described in the John */ + /* D. Hobby paper, which unfortunately requires a lot more horsepower. */ + /* */ + /* Because a sufficiently sophisticated font management system would */ + /* typically implement an LRU cache of opened face objects to reduce */ + /* memory usage, it is a good idea to be able to avoid recomputing */ + /* global hints every time the same face is re-opened. */ + /* */ + /* We thus provide the ability to cache global hints outside of the face */ + /* object, in order to speed up font re-opening time. Of course, this */ + /* feature is purely optional, so most client programs won't even notice */ + /* it. */ + /* */ + /* I initially thought that it would be a good idea to cache the glyph */ + /* hints too. However, my general idea now is that if you really need */ + /* to cache these too, you are simply in need of a new font format, */ + /* where all this information could be stored within the font file and */ + /* decoded on the fly. */ + /* */ + /*************************************************************************/ + #include + typedef struct FT_AutoHinterRec_ *FT_AutoHinter; - /*********************************************************************** - * - * - * FT_AutoHinter_Get_Global_Func - * - * - * Retrieve the global hints computed for a given face object - * the resulting data is dissociated from the face and will survive - * a call to FT_Done_Face. It must be discarded through the API - * FT_AutoHinter_Done_Global_Func. - * - * - * hinter :: handle to source auto-hinter - * face :: handle to source face object - * - * - * global_hints :: typeless pointer to the global hints - * global_len :: size in bytes of global hints - * - */ - typedef void (*FT_AutoHinter_Get_Global_Func)( FT_AutoHinter hinter, - FT_Face face, - void* *global_hints, - long *global_len ); - /*********************************************************************** - * - * - * FT_AutoHinter_Done_Global_Func - * - * - * Discards the global hints retrieved through - * FT_AutoHinter_Get_Global_Func. This is the only way these hints - * are freed from memory. - * - * - * hinter :: handle to auto-hinter module - * global :: pointer to retrieved global hints to discard - */ - typedef void (*FT_AutoHinter_Done_Global_Func)( FT_AutoHinter hinter, - void* global ); + /*************************************************************************/ + /* */ + /* */ + /* FT_AutoHinter_Get_Global_Func */ + /* */ + /* */ + /* Retrieves the global hints computed for a given face object the */ + /* resulting data is dissociated from the face and will survive a */ + /* call to FT_Done_Face(). It must be discarded through the API */ + /* FT_AutoHinter_Done_Global_Func(). */ + /* */ + /* */ + /* hinter :: A handle to the source auto-hinter. */ + /* */ + /* face :: A handle to the source face object. */ + /* */ + /* */ + /* global_hints :: A typeless pointer to the global hints. */ + /* */ + /* global_len :: The size in bytes of the global hints. */ + /* */ + typedef void (*FT_AutoHinter_Get_Global_Func)( + FT_AutoHinter hinter, + FT_Face face, + void** global_hints, + long* global_len ); - /*********************************************************************** - * - * - * FT_AutoHinter_Reset_Func - * - * - * This function is used to recompute the global metrics in a given - * font. This is useful when global font data changes (e.g. multiple - * masters fonts where blend coordinates change..) - * - * - * hinter :: handle to source auto-hinter - * face :: handle to the face. - * - * - */ - typedef void (*FT_AutoHinter_Reset_Func)( FT_AutoHinter hinter, - FT_Face face ); - /*********************************************************************** - * - * - * FT_AutoHinter_Load_Func - * - * - * This function is used to load, scale and automatically hint a glyph - * from a given face. - * - * - * face :: handle to the face. - * glyph_index :: glyph index - * load_flags :: load flags - * - * - * This function is capable of loading composite glyphs by hinting - * each sub-glyph independently (which improves quality). - * - * It will call the font driver with FT_Load_Glyph, with FT_LOAD_NO_SCALE - * set.. - * - */ - typedef FT_Error (*FT_AutoHinter_Load_Func)( - FT_AutoHinter hinter, - FT_GlyphSlot slot, - FT_Size size, - FT_UInt glyph_index, - FT_ULong load_flags ); + /*************************************************************************/ + /* */ + /* */ + /* FT_AutoHinter_Done_Global_Func */ + /* */ + /* */ + /* Discards the global hints retrieved through */ + /* FT_AutoHinter_Get_Global_Func(). This is the only way these hints */ + /* are freed from memory. */ + /* */ + /* */ + /* hinter :: A handle to the auto-hinter module. */ + /* */ + /* global :: A pointer to retrieved global hints to discard. */ + /* */ + typedef void (*FT_AutoHinter_Done_Global_Func)( FT_AutoHinter hinter, + void* global ); - /*********************************************************************** - * - * - * FT_AutoHinter_Interface - * - * - * The auto-hinter module's interface. - * - */ - typedef struct FT_AutoHinter_Interface + + /*************************************************************************/ + /* */ + /* */ + /* FT_AutoHinter_Reset_Func */ + /* */ + /* */ + /* This function is used to recompute the global metrics in a given */ + /* font. This is useful when global font data changes (e.g. Multiple */ + /* Masters fonts where blend coordinates change). */ + /* */ + /* */ + /* hinter :: A handle to the source auto-hinter. */ + /* */ + /* face :: A handle to the face. */ + /* */ + typedef void (*FT_AutoHinter_Reset_Func)( FT_AutoHinter hinter, + FT_Face face ); + + + /*************************************************************************/ + /* */ + /* */ + /* FT_AutoHinter_Load_Func */ + /* */ + /* */ + /* This function is used to load, scale, and automatically hint a */ + /* glyph from a given face. */ + /* */ + /* */ + /* face :: A handle to the face. */ + /* glyph_index :: The glyph index. */ + /* load_flags :: The load flags. */ + /* */ + /* */ + /* This function is capable of loading composite glyphs by hinting */ + /* each sub-glyph independently (which improves quality). */ + /* */ + /* It will call the font driver with FT_Load_Glyph(), with */ + /* FT_LOAD_NO_SCALE set. */ + /* */ + typedef FT_Error (*FT_AutoHinter_Load_Func)( FT_AutoHinter hinter, + FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_ULong load_flags ); + + + /*************************************************************************/ + /* */ + /* */ + /* FT_AutoHinter_Interface */ + /* */ + /* */ + /* The auto-hinter module's interface. */ + /* */ + typedef struct FT_AutoHinter_Interface { FT_AutoHinter_Reset_Func reset_face; FT_AutoHinter_Load_Func load_glyph; @@ -175,5 +188,8 @@ } FT_AutoHinter_Interface; + #endif /* AUTOHINT_H */ + +/* END */ diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index 3d17177c8..74f08102b 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -5,10 +5,10 @@ /* The FreeType private base classes (specification). */ /* */ /* Copyright 1996-2000 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 */ -/* modified and distributed under the terms of the FreeType project */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ @@ -142,6 +142,32 @@ #define FT_DRIVER_HAS_HINTER(x) (FT_MODULE_CLASS(x)->module_flags & \ ft_module_driver_has_hinter ) + + /*************************************************************************/ + /* */ + /* */ + /* FT_Get_Module_Interface */ + /* */ + /* */ + /* Finds a module and returns its specific interface as a typeless */ + /* pointer. */ + /* */ + /* */ + /* library :: A handle to the library object. */ + /* */ + /* module_name :: The module's name (as an ASCII string). */ + /* */ + /* */ + /* A module-specific interface if available, 0 otherwise. */ + /* */ + /* */ + /* You should better be familiar with FreeType internals to know */ + /* which module to look for, and what its interface is :-) */ + /* */ + BASE_DEF( const void* ) FT_Get_Module_Interface( FT_Library library, + const char* mod_name ); + + /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ diff --git a/include/freetype/t1tables.h b/include/freetype/t1tables.h index e25c5d1c5..323e0130c 100644 --- a/include/freetype/t1tables.h +++ b/include/freetype/t1tables.h @@ -2,7 +2,8 @@ /* */ /* t1tables.h */ /* */ -/* Basic Type 1/Type 2 tables definitions and interface */ +/* Basic Type 1/Type 2 tables definitions and interface (specification */ +/* only). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -139,7 +140,7 @@ /* maximum number of Multiple Masters designs, as defined in the spec */ #define T1_MAX_MM_DESIGNS 16 - + /* maximum number of Multiple Masters axes, as defined in the spec */ #define T1_MAX_MM_AXIS 4 @@ -153,7 +154,7 @@ FT_Byte num_points; FT_Fixed* design_points; FT_Fixed* blend_points; - + } T1_DesignMap; @@ -161,19 +162,19 @@ { FT_UInt num_designs; FT_UInt num_axis; - + FT_String* axis_names[T1_MAX_MM_AXIS]; FT_Fixed* design_pos[T1_MAX_MM_DESIGNS]; T1_DesignMap design_map[T1_MAX_MM_AXIS]; - + FT_Fixed* weight_vector; FT_Fixed* default_weight_vector; - + T1_FontInfo* font_infos[T1_MAX_MM_DESIGNS + 1]; T1_Private* privates [T1_MAX_MM_DESIGNS + 1]; - + FT_ULong blend_bitflags; - + } T1_Blend; @@ -185,7 +186,7 @@ FT_Fixed forcebold_threshold; FT_Pos stroke_width; FT_Fixed expansion_factor; - + FT_Byte paint_type; FT_Byte font_type; FT_Matrix font_matrix; diff --git a/include/freetype/ttnameid.h b/include/freetype/ttnameid.h index 681f1b166..489024241 100644 --- a/include/freetype/ttnameid.h +++ b/include/freetype/ttnameid.h @@ -2,7 +2,7 @@ /* */ /* ttmakeid.h */ /* */ -/* TrueType name ID definitions */ +/* TrueType name ID definitions (specification only). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/include/freetype/tttables.h b/include/freetype/tttables.h index cbdd9c71a..27c46f3c9 100644 --- a/include/freetype/tttables.h +++ b/include/freetype/tttables.h @@ -3,6 +3,7 @@ /* tttables.h */ /* */ /* Basic SFNT/TrueType tables definitions and interface */ +/* (specification only). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -428,7 +429,7 @@ FT_Char WidthType; FT_Byte SerifStyle; FT_Byte Reserved; - + } TT_PCLT; diff --git a/include/freetype/tttags.h b/include/freetype/tttags.h index 7d9af15b0..9de9810e9 100644 --- a/include/freetype/tttags.h +++ b/include/freetype/tttags.h @@ -9,7 +9,7 @@ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ -/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ diff --git a/src/base/ftbase.c b/src/base/ftbase.c index 99a38e234..f9d9bbf8e 100644 --- a/src/base/ftbase.c +++ b/src/base/ftbase.c @@ -2,7 +2,7 @@ /* */ /* ftbase.c */ /* */ -/* Single object library component. */ +/* Single object library component (body only). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/src/base/ftextend.c b/src/base/ftextend.c index 782bb3e04..f298b19a8 100644 --- a/src/base/ftextend.c +++ b/src/base/ftextend.c @@ -2,7 +2,7 @@ /* */ /* ftextend.h */ /* */ -/* FreeType extensions implementation (body). */ +/* FreeType extensions implementation (body). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/src/base/ftinit.c b/src/base/ftinit.c index a42be8aaf..c5d81db54 100644 --- a/src/base/ftinit.c +++ b/src/base/ftinit.c @@ -2,7 +2,7 @@ /* */ /* ftinit.c */ /* */ -/* FreeType initialisation layer (body). */ +/* FreeType initialization layer (body). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index b2be57739..bbfb3624f 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2,7 +2,7 @@ /* */ /* ftobjs.c */ /* */ -/* The FreeType private base classes (base). */ +/* The FreeType private base classes (body). */ /* */ /* Copyright 1996-2000 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -2088,32 +2088,30 @@ driver = face->driver; memory = driver->root.memory; + kerning->x = 0; + kerning->y = 0; + if ( driver->clazz->get_kerning ) { error = driver->clazz->get_kerning( face, left_glyph, right_glyph, kerning ); - } - if ( !error ) - { - if ( kern_mode != ft_kerning_unscaled ) + if ( !error ) { - kerning->x = FT_MulFix( kerning->x, face->size->metrics.x_scale ); - kerning->y = FT_MulFix( kerning->y, face->size->metrics.y_scale ); - - if ( kern_mode != ft_kerning_unfitted ) + if ( kern_mode != ft_kerning_unscaled ) { - kerning->x = ( kerning->x + 32 ) & -64; - kerning->y = ( kerning->y + 32 ) & -64; + kerning->x = FT_MulFix( kerning->x, face->size->metrics.x_scale ); + kerning->y = FT_MulFix( kerning->y, face->size->metrics.y_scale ); + + if ( kern_mode != ft_kerning_unfitted ) + { + kerning->x = ( kerning->x + 32 ) & -64; + kerning->y = ( kerning->y + 32 ) & -64; + } } } } - else - { - kerning->x = 0; - kerning->y = 0; - } return error; } @@ -2922,9 +2920,8 @@ /* You should better be familiar with FreeType internals to know */ /* which module to look for, and what its interface is :-) */ /* */ - FT_EXPORT_FUNC( const void* ) FT_Get_Module_Interface( - FT_Library library, - const char* mod_name ) + BASE_FUNC( const void* ) FT_Get_Module_Interface( FT_Library library, + const char* mod_name ) { FT_Module module; diff --git a/src/cff/t2gload.c b/src/cff/t2gload.c index 1a779356a..1023e3cf4 100644 --- a/src/cff/t2gload.c +++ b/src/cff/t2gload.c @@ -1264,7 +1264,7 @@ args = stack; - /* adding six more points; 4 control points, 2 on-curve point */ + /* adding six more points; 4 control points, 2 on-curve points */ if ( start_point( builder, x, y ) || check_points ( builder, 6 ) ) goto Memory_Error; @@ -1316,7 +1316,7 @@ FT_TRACE4(( " flex1" )); - /* adding five more points; 4 control points, 1 on-curve point */ + /* adding six more points; 4 control points, 2 on-curve points */ if ( start_point( builder, x, y ) || check_points( builder, 6 ) ) goto Memory_Error; @@ -1355,7 +1355,7 @@ args += 2; } - /* is last operand a x or y delta ? */ + /* is last operand an x- or y-delta? */ if ( horizontal ) { x += args[0]; @@ -1389,7 +1389,8 @@ { x += args[0]; y += args[1]; - add_point( builder, x, y, (FT_Bool)( count == 3 || count == 0) ); + add_point( builder, x, y, + (FT_Bool)( count == 3 || count == 0 ) ); args += 2; }