mirror of https://github.com/freetype/freetype
Formatting.
This commit is contained in:
parent
bcc438b15e
commit
9cc4aed879
|
@ -451,31 +451,30 @@ FT_BEGIN_HEADER
|
|||
|
||||
/* */
|
||||
|
||||
#define FT_REQUEST_WIDTH( req ) \
|
||||
( ( req )->horiResolution \
|
||||
? (FT_Pos)( ( req )->width * ( req )->horiResolution + 36 ) / 72 \
|
||||
: ( req )->width )
|
||||
#define FT_REQUEST_WIDTH( req ) \
|
||||
( (req)->horiResolution \
|
||||
? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \
|
||||
: (req)->width )
|
||||
|
||||
#define FT_REQUEST_HEIGHT( req ) \
|
||||
( ( req )->vertResolution \
|
||||
? (FT_Pos)( ( req )->height * ( req )->vertResolution + 36 ) / 72 \
|
||||
: ( req )->height )
|
||||
#define FT_REQUEST_HEIGHT( req ) \
|
||||
( (req)->vertResolution \
|
||||
? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \
|
||||
: (req)->height )
|
||||
|
||||
/* set the metrics according to a bitmap strike */
|
||||
|
||||
/* Set the metrics according to a bitmap strike. */
|
||||
FT_BASE( void )
|
||||
FT_Select_Metrics( FT_Face face,
|
||||
FT_ULong strike_index );
|
||||
|
||||
|
||||
/* set the metrics according to a size request */
|
||||
/* Set the metrics according to a size request. */
|
||||
FT_BASE( void )
|
||||
FT_Request_Metrics( FT_Face face,
|
||||
FT_Size_Request req );
|
||||
|
||||
|
||||
/*
|
||||
* Match a size request against `available_sizes'.
|
||||
*/
|
||||
/* Match a size request against `available_sizes'. */
|
||||
FT_BASE( FT_Error )
|
||||
FT_Match_Size( FT_Face face,
|
||||
FT_Size_Request req,
|
||||
|
@ -483,35 +482,27 @@ FT_BEGIN_HEADER
|
|||
FT_ULong* index );
|
||||
|
||||
|
||||
/*
|
||||
* Use the horizontal metrics to synthesize the vertical metrics.
|
||||
* If `advance' is zero, it is also synthesized.
|
||||
*/
|
||||
/* Use the horizontal metrics to synthesize the vertical metrics. */
|
||||
/* If `advance' is zero, it is also synthesized. */
|
||||
FT_BASE( void )
|
||||
ft_synthesize_vertical_metrics( FT_Glyph_Metrics* metrics,
|
||||
FT_Pos advance );
|
||||
|
||||
|
||||
/*
|
||||
* Free the bitmap of a given glyphslot when needed
|
||||
* (i.e., only when it was allocated with ft_glyphslot_alloc_bitmap).
|
||||
*/
|
||||
/* Free the bitmap of a given glyphslot when needed (i.e., only when it */
|
||||
/* was allocated with ft_glyphslot_alloc_bitmap). */
|
||||
FT_BASE( void )
|
||||
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
|
||||
|
||||
|
||||
/*
|
||||
* Allocate a new bitmap buffer in a glyph slot.
|
||||
*/
|
||||
/* Allocate a new bitmap buffer in a glyph slot. */
|
||||
FT_BASE( FT_Error )
|
||||
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
|
||||
FT_ULong size );
|
||||
|
||||
|
||||
/*
|
||||
* Set the bitmap buffer in a glyph slot to a given pointer.
|
||||
* The buffer will not be freed by a later call to ft_glyphslot_free_bitmap.
|
||||
*/
|
||||
/* Set the bitmap buffer in a glyph slot to a given pointer. The buffer */
|
||||
/* will not be freed by a later call to ft_glyphslot_free_bitmap. */
|
||||
FT_BASE( void )
|
||||
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
|
||||
FT_Byte* buffer );
|
||||
|
@ -623,17 +614,15 @@ FT_BEGIN_HEADER
|
|||
/*************************************************************************/
|
||||
|
||||
|
||||
/* this hook is used by the TrueType debugger. It must be set to an alternate
|
||||
* truetype bytecode interpreter function
|
||||
*/
|
||||
/* This hook is used by the TrueType debugger. It must be set to an */
|
||||
/* alternate truetype bytecode interpreter function. */
|
||||
#define FT_DEBUG_HOOK_TRUETYPE 0
|
||||
|
||||
|
||||
/* set this debug hook to a non-null pointer to force unpatented hinting
|
||||
* for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
|
||||
* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used
|
||||
* during debugging
|
||||
*/
|
||||
/* Set this debug hook to a non-null pointer to force unpatented hinting */
|
||||
/* for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and */
|
||||
/* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used */
|
||||
/* during debugging. */
|
||||
#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1
|
||||
|
||||
|
||||
|
|
|
@ -314,9 +314,9 @@
|
|||
static void
|
||||
ft_glyphslot_done( FT_GlyphSlot slot )
|
||||
{
|
||||
FT_Driver driver = slot->face->driver;
|
||||
FT_Driver_Class clazz = driver->clazz;
|
||||
FT_Memory memory = driver->root.memory;
|
||||
FT_Driver driver = slot->face->driver;
|
||||
FT_Driver_Class clazz = driver->clazz;
|
||||
FT_Memory memory = driver->root.memory;
|
||||
|
||||
|
||||
if ( clazz->done_slot )
|
||||
|
@ -342,11 +342,11 @@
|
|||
FT_New_GlyphSlot( FT_Face face,
|
||||
FT_GlyphSlot *aslot )
|
||||
{
|
||||
FT_Error error;
|
||||
FT_Driver driver;
|
||||
FT_Driver_Class clazz;
|
||||
FT_Memory memory;
|
||||
FT_GlyphSlot slot;
|
||||
FT_Error error;
|
||||
FT_Driver driver;
|
||||
FT_Driver_Class clazz;
|
||||
FT_Memory memory;
|
||||
FT_GlyphSlot slot;
|
||||
|
||||
|
||||
if ( !face || !face->driver )
|
||||
|
@ -2006,7 +2006,7 @@
|
|||
if ( req->type != FT_SIZE_REQUEST_TYPE_NOMINAL )
|
||||
return FT_Err_Unimplemented_Feature;
|
||||
|
||||
w = FT_REQUEST_WIDTH( req );
|
||||
w = FT_REQUEST_WIDTH ( req );
|
||||
h = FT_REQUEST_HEIGHT( req );
|
||||
|
||||
if ( req->width && !req->height )
|
||||
|
@ -2158,7 +2158,7 @@
|
|||
if ( h < 0 )
|
||||
h = -h;
|
||||
|
||||
scaled_w = FT_REQUEST_WIDTH( req );
|
||||
scaled_w = FT_REQUEST_WIDTH ( req );
|
||||
scaled_h = FT_REQUEST_HEIGHT( req );
|
||||
|
||||
/* determine scales */
|
||||
|
@ -2217,7 +2217,7 @@
|
|||
FT_Select_Size( FT_Face face,
|
||||
FT_Int strike_index )
|
||||
{
|
||||
FT_Driver_Class clazz;
|
||||
FT_Driver_Class clazz;
|
||||
|
||||
|
||||
if ( !face || !FT_HAS_FIXED_SIZES( face ) )
|
||||
|
@ -2243,8 +2243,8 @@
|
|||
FT_Request_Size( FT_Face face,
|
||||
FT_Size_Request req )
|
||||
{
|
||||
FT_Driver_Class clazz;
|
||||
FT_ULong strike_index;
|
||||
FT_Driver_Class clazz;
|
||||
FT_ULong strike_index;
|
||||
|
||||
|
||||
if ( !face )
|
||||
|
@ -2275,7 +2275,8 @@
|
|||
if ( error )
|
||||
return error;
|
||||
|
||||
FT_TRACE3(( "FT_Request_Size: bitmap strike %lu matched\n", strike_index ));
|
||||
FT_TRACE3(( "FT_Request_Size: bitmap strike %lu matched\n",
|
||||
strike_index ));
|
||||
|
||||
return FT_Select_Size( face, (FT_Int)strike_index );
|
||||
}
|
||||
|
@ -2572,10 +2573,10 @@
|
|||
|
||||
|
||||
FT_BASE_DEF( FT_Error )
|
||||
FT_CMap_New( FT_CMap_Class clazz,
|
||||
FT_Pointer init_data,
|
||||
FT_CharMap charmap,
|
||||
FT_CMap *acmap )
|
||||
FT_CMap_New( FT_CMap_Class clazz,
|
||||
FT_Pointer init_data,
|
||||
FT_CharMap charmap,
|
||||
FT_CMap *acmap )
|
||||
{
|
||||
FT_Error error = FT_Err_Ok;
|
||||
FT_Face face;
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
return CFF_Err_Ok;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
|
||||
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
|
@ -200,6 +200,7 @@
|
|||
CFF_Size cffsize = (CFF_Size)size;
|
||||
PSH_Globals_Funcs funcs;
|
||||
|
||||
|
||||
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
|
||||
|
||||
if ( FT_HAS_FIXED_SIZES( size->face ) )
|
||||
|
|
|
@ -119,8 +119,8 @@
|
|||
|
||||
FT_LOCAL_DEF( FT_Int )
|
||||
PS_Conv_ToInt( FT_Byte** cursor,
|
||||
FT_Byte* limit )
|
||||
|
||||
FT_Byte* limit )
|
||||
|
||||
{
|
||||
FT_Byte* p;
|
||||
FT_Int num;
|
||||
|
@ -142,8 +142,8 @@
|
|||
|
||||
FT_LOCAL_DEF( FT_Fixed )
|
||||
PS_Conv_ToFixed( FT_Byte** cursor,
|
||||
FT_Byte* limit,
|
||||
FT_Int power_ten )
|
||||
FT_Byte* limit,
|
||||
FT_Int power_ten )
|
||||
{
|
||||
FT_Byte* p = *cursor;
|
||||
FT_Fixed integral;
|
||||
|
@ -230,9 +230,9 @@
|
|||
#if 0
|
||||
FT_LOCAL_DEF( FT_UInt )
|
||||
PS_Conv_StringDecode( FT_Byte** cursor,
|
||||
FT_Byte* limit,
|
||||
FT_Byte* buffer,
|
||||
FT_UInt n )
|
||||
FT_Byte* limit,
|
||||
FT_Byte* buffer,
|
||||
FT_UInt n )
|
||||
{
|
||||
FT_Byte* p;
|
||||
FT_UInt r = 0;
|
||||
|
@ -325,9 +325,9 @@
|
|||
|
||||
FT_LOCAL_DEF( FT_UInt )
|
||||
PS_Conv_ASCIIHexDecode( FT_Byte** cursor,
|
||||
FT_Byte* limit,
|
||||
FT_Byte* buffer,
|
||||
FT_UInt n )
|
||||
FT_Byte* limit,
|
||||
FT_Byte* buffer,
|
||||
FT_UInt n )
|
||||
{
|
||||
FT_Byte* p;
|
||||
FT_UInt r = 0;
|
||||
|
@ -366,10 +366,10 @@
|
|||
|
||||
FT_LOCAL_DEF( FT_UInt )
|
||||
PS_Conv_EexecDecode( FT_Byte** cursor,
|
||||
FT_Byte* limit,
|
||||
FT_Byte* buffer,
|
||||
FT_UInt n,
|
||||
FT_UShort* seed )
|
||||
FT_Byte* limit,
|
||||
FT_Byte* buffer,
|
||||
FT_UInt n,
|
||||
FT_UShort* seed )
|
||||
{
|
||||
FT_Byte* p;
|
||||
FT_UInt r;
|
||||
|
|
|
@ -173,7 +173,8 @@
|
|||
|
||||
/* XXX: Is this correct? */
|
||||
bsize->height = ascender - descender;
|
||||
bsize->width = (FT_Short)( avgwidth * y_ppem + em_size / 2 ) / em_size;
|
||||
bsize->width = (FT_Short)( avgwidth * y_ppem + em_size / 2 ) /
|
||||
em_size;
|
||||
|
||||
/* assume 72dpi */
|
||||
bsize->size = bsize->y_ppem;
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
return error;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
|
||||
|
||||
|
||||
static FT_Error
|
||||
|
@ -196,7 +196,7 @@
|
|||
return tt_size_select( size, index );
|
||||
}
|
||||
|
||||
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
|
||||
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
|
||||
|
||||
FT_Request_Metrics( size->face, req );
|
||||
|
||||
|
|
Loading…
Reference in New Issue