Formatting.

This commit is contained in:
Werner Lemberg 2017-02-18 10:43:10 +01:00
parent 467b026cd5
commit d22f5ec563
6 changed files with 58 additions and 63 deletions

View File

@ -342,12 +342,6 @@ FT_BEGIN_HEADER
/* this data when first opened. This field exists only if */
/* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
/* */
/* refcount :: */
/* A counter initialized to~1 at the time an @FT_Face structure is */
/* created. @FT_Reference_Face increments this counter, and */
/* @FT_Done_Face only destroys a face if the counter is~1, */
/* otherwise it simply decrements it. */
/* */
/* no_stem_darkening :: */
/* Overrides the module-level default, see @stem-darkening[cff], */
/* for example. FALSE and TRUE toggle stem darkening on and off, */
@ -357,11 +351,17 @@ FT_BEGIN_HEADER
/* Overrides the library default with custom weights for the 5-tap */
/* FIR filter. `{0, 0, 0, 0, 0}' means to use the library default. */
/* */
/* refcount :: */
/* A counter initialized to~1 at the time an @FT_Face structure is */
/* created. @FT_Reference_Face increments this counter, and */
/* @FT_Done_Face only destroys a face if the counter is~1, */
/* otherwise it simply decrements it. */
/* */
typedef struct FT_Face_InternalRec_
{
FT_Matrix transform_matrix;
FT_Vector transform_delta;
FT_Int transform_flags;
FT_Matrix transform_matrix;
FT_Vector transform_delta;
FT_Int transform_flags;
FT_ServiceCacheRec services;
@ -369,14 +369,13 @@ FT_BEGIN_HEADER
FT_Incremental_InterfaceRec* incremental_interface;
#endif
FT_Int refcount;
FT_Char no_stem_darkening;
FT_Char no_stem_darkening;
#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
FT_LcdFiveTapFilter lcd_weights; /* preset or custom filter weights */
#endif
FT_Int refcount;
} FT_Face_InternalRec;
@ -843,14 +842,17 @@ FT_BEGIN_HEADER
/* handle to the current renderer for the */
/* FT_GLYPH_FORMAT_OUTLINE format. */
/* */
/* auto_hinter :: XXX */
/* auto_hinter :: The auto-hinter module interface. */
/* */
/* raster_pool :: The raster object's render pool. This can */
/* ideally be changed dynamically at run-time. */
/* */
/* raster_pool_size :: The size of the render pool in bytes. */
/* */
/* debug_hooks :: XXX */
/* debug_hooks :: An array of four function pointers that allow */
/* debuggers to hook into a font format's */
/* interpreter. Currently, only the TrueType */
/* bytecode debugger uses this. */
/* */
/* lcd_filter :: If subpixel rendering is activated, the */
/* selected LCD filter mode. */

View File

@ -1457,7 +1457,7 @@ FT_BEGIN_HEADER
/***********************************************************************/
/* */
/* TrueType-specific fields (ignored by the OTF-Type2 driver) */
/* TrueType-specific fields (ignored by the CFF driver) */
/* */
/***********************************************************************/

View File

@ -833,6 +833,7 @@
{
FT_UInt* hinting_engine = (FT_UInt*)value;
if ( *hinting_engine == FT_CFF_HINTING_ADOBE
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|| *hinting_engine == FT_CFF_HINTING_FREETYPE

View File

@ -684,62 +684,56 @@
}
#endif /* FT_DEBUG_LEVEL_TRACE */
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
{
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
FT_Int instance_index = face_index >> 16;
if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
mm &&
instance_index > 0 )
{
FT_MM_Var* mm_var;
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
FT_Int instance_index = face_index >> 16;
error = mm->get_mm_var( cffface, NULL );
if ( error )
goto Exit;
mm->get_var_blend( cffface, NULL, NULL, &mm_var );
if ( mm_var->namedstyle )
if ( FT_HAS_MULTIPLE_MASTERS( cffface ) &&
mm &&
instance_index > 0 )
{
FT_Var_Named_Style* named_style;
FT_String* style_name;
FT_MM_Var* mm_var;
/* in `face_index', the instance index starts with value 1 */
named_style = mm_var->namedstyle + instance_index - 1;
error = sfnt->get_name( face,
(FT_UShort)named_style->strid,
&style_name );
error = mm->get_mm_var( cffface, NULL );
if ( error )
goto Exit;
/* set style name; if already set, replace it */
if ( face->root.style_name )
FT_FREE( face->root.style_name );
face->root.style_name = style_name;
mm->get_var_blend( cffface, NULL, NULL, &mm_var );
/* finally, select the named instance */
error = mm->set_var_design( cffface,
mm_var->num_axis,
named_style->coords );
if ( error )
goto Exit;
if ( mm_var->namedstyle )
{
FT_Var_Named_Style* named_style;
FT_String* style_name;
/* in `face_index', the instance index starts with value 1 */
named_style = mm_var->namedstyle + instance_index - 1;
error = sfnt->get_name( face,
(FT_UShort)named_style->strid,
&style_name );
if ( error )
goto Exit;
/* set style name; if already set, replace it */
if ( face->root.style_name )
FT_FREE( face->root.style_name );
face->root.style_name = style_name;
/* finally, select the named instance */
error = mm->set_var_design( cffface,
mm_var->num_axis,
named_style->coords );
if ( error )
goto Exit;
}
}
}
}
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
if ( !dict->has_font_matrix )
dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
@ -1022,7 +1016,6 @@
cffface->style_flags = flags;
}
#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
/* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
/* has unset this flag because of the 3.0 `post' table. */
@ -1033,7 +1026,6 @@
if ( dict->cid_registry != 0xFFFFU && pure_cff )
cffface->face_flags |= FT_FACE_FLAG_CID_KEYED;
/*******************************************************************/
/* */
/* Compute char maps. */

View File

@ -118,10 +118,9 @@ FT_BEGIN_HEADER
{
FT_DriverRec root;
FT_UInt hinting_engine;
FT_Bool no_stem_darkening;
FT_Int darken_params[8];
FT_UInt hinting_engine;
FT_Bool no_stem_darkening;
FT_Int darken_params[8];
} CFF_DriverRec;

View File

@ -389,6 +389,7 @@ FT_BEGIN_HEADER
/* since version 2.4.12 */
FT_Generic cf2_instance;
/* since version 2.7.1 */
CFF_VStoreRec vstore; /* parsed vstore structure */
} CFF_FontRec;