Formatting.
This commit is contained in:
parent
d087199f2c
commit
370aea802c
|
@ -545,7 +545,8 @@
|
||||||
FT_Pos fitted = ( scaled + 40 ) & ~63;
|
FT_Pos fitted = ( scaled + 40 ) & ~63;
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if ( scaled != fitted ) {
|
if ( scaled != fitted )
|
||||||
|
{
|
||||||
scale = FT_MulDiv( scale, fitted, scaled );
|
scale = FT_MulDiv( scale, fitted, scaled );
|
||||||
AF_LOG(( "== scaled x-top = %.2g fitted = %.2g, scaling = %.4g\n", scaled/64.0, fitted/64.0, (fitted*1.0)/scaled ));
|
AF_LOG(( "== scaled x-top = %.2g fitted = %.2g, scaling = %.4g\n", scaled/64.0, fitted/64.0, (fitted*1.0)/scaled ));
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,8 @@
|
||||||
#undef FT_USE_MODULE
|
#undef FT_USE_MODULE
|
||||||
#define FT_USE_MODULE( type, x ) MODULE_CLASS_##x,
|
#define FT_USE_MODULE( type, x ) MODULE_CLASS_##x,
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
#include FT_CONFIG_MODULES_H
|
#include FT_CONFIG_MODULES_H
|
||||||
FT_NUM_MODULE_CLASSES
|
FT_NUM_MODULE_CLASSES
|
||||||
};
|
};
|
||||||
|
|
|
@ -1371,7 +1371,8 @@
|
||||||
|
|
||||||
/* If the property happens to be a comment, then it doesn't need */
|
/* If the property happens to be a comment, then it doesn't need */
|
||||||
/* to be added to the internal hash table. */
|
/* to be added to the internal hash table. */
|
||||||
if ( ft_memcmp( name, "COMMENT", 7 ) != 0 ) {
|
if ( ft_memcmp( name, "COMMENT", 7 ) != 0 )
|
||||||
|
{
|
||||||
/* Add the property to the font property table. */
|
/* Add the property to the font property table. */
|
||||||
error = hash_insert( fp->name,
|
error = hash_insert( fp->name,
|
||||||
font->props_used,
|
font->props_used,
|
||||||
|
@ -2344,7 +2345,8 @@
|
||||||
/* Make sure the comments are NULL terminated if they exist. */
|
/* Make sure the comments are NULL terminated if they exist. */
|
||||||
memory = p->font->memory;
|
memory = p->font->memory;
|
||||||
|
|
||||||
if ( p->font->comments_len > 0 ) {
|
if ( p->font->comments_len > 0 )
|
||||||
|
{
|
||||||
if ( FT_RENEW_ARRAY( p->font->comments,
|
if ( FT_RENEW_ARRAY( p->font->comments,
|
||||||
p->font->comments_len,
|
p->font->comments_len,
|
||||||
p->font->comments_len + 1 ) )
|
p->font->comments_len + 1 ) )
|
||||||
|
|
|
@ -920,14 +920,16 @@
|
||||||
|
|
||||||
/* check whether the range contains at least one valid glyph; */
|
/* check whether the range contains at least one valid glyph; */
|
||||||
/* the constant is given in the CFF specification */
|
/* the constant is given in the CFF specification */
|
||||||
if ( glyph_sid >= 65000L ) {
|
if ( glyph_sid >= 65000L )
|
||||||
|
{
|
||||||
FT_ERROR(( "cff_charset_load: invalid SID range\n" ));
|
FT_ERROR(( "cff_charset_load: invalid SID range\n" ));
|
||||||
error = CFF_Err_Invalid_File_Format;
|
error = CFF_Err_Invalid_File_Format;
|
||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try to rescue some of the SIDs if `nleft' is too large */
|
/* try to rescue some of the SIDs if `nleft' is too large */
|
||||||
if ( nleft > 65000L - 1L || glyph_sid >= 65000L - nleft ) {
|
if ( nleft > 65000L - 1L || glyph_sid >= 65000L - nleft )
|
||||||
|
{
|
||||||
FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" ));
|
FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" ));
|
||||||
nleft = ( FT_UInt )( 65000L - 1L - glyph_sid );
|
nleft = ( FT_UInt )( 65000L - 1L - glyph_sid );
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,8 @@
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* Remove non-significant digits. */
|
/* Remove non-significant digits. */
|
||||||
if ( integer_length < 0 ) {
|
if ( integer_length < 0 )
|
||||||
|
{
|
||||||
number /= power_tens[-integer_length];
|
number /= power_tens[-integer_length];
|
||||||
fraction_length += integer_length;
|
fraction_length += integer_length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,8 @@
|
||||||
otv_MathItalicsCorrectionInfo_validate(
|
otv_MathItalicsCorrectionInfo_validate(
|
||||||
table + MathTopAccentAttachment, valid, FALSE );
|
table + MathTopAccentAttachment, valid, FALSE );
|
||||||
|
|
||||||
if ( ExtendedShapeCoverage ) {
|
if ( ExtendedShapeCoverage )
|
||||||
|
{
|
||||||
OTV_NAME_ENTER( "ExtendedShapeCoverage" );
|
OTV_NAME_ENTER( "ExtendedShapeCoverage" );
|
||||||
otv_Coverage_validate( table + ExtendedShapeCoverage, valid, -1 );
|
otv_Coverage_validate( table + ExtendedShapeCoverage, valid, -1 );
|
||||||
OTV_EXIT;
|
OTV_EXIT;
|
||||||
|
|
|
@ -214,7 +214,8 @@
|
||||||
*ot_jstf = (FT_Bytes)jstf;
|
*ot_jstf = (FT_Bytes)jstf;
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
if ( error ) {
|
if ( error )
|
||||||
|
{
|
||||||
FT_Memory memory = FT_FACE_MEMORY( face );
|
FT_Memory memory = FT_FACE_MEMORY( face );
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,6 +225,7 @@
|
||||||
FT_FREE( gsub );
|
FT_FREE( gsub );
|
||||||
FT_FREE( jstf );
|
FT_FREE( jstf );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
FT_Memory memory = FT_FACE_MEMORY( face );
|
FT_Memory memory = FT_FACE_MEMORY( face );
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,8 @@ THE SOFTWARE.
|
||||||
{
|
{
|
||||||
prop = &face->properties[i];
|
prop = &face->properties[i];
|
||||||
|
|
||||||
if ( prop ) {
|
if ( prop )
|
||||||
|
{
|
||||||
FT_FREE( prop->name );
|
FT_FREE( prop->name );
|
||||||
if ( prop->isString )
|
if ( prop->isString )
|
||||||
FT_FREE( prop->value.atom );
|
FT_FREE( prop->value.atom );
|
||||||
|
|
|
@ -56,7 +56,8 @@ FT_BEGIN_HEADER
|
||||||
typedef struct AFM_ValueRec_
|
typedef struct AFM_ValueRec_
|
||||||
{
|
{
|
||||||
enum AFM_ValueType_ type;
|
enum AFM_ValueType_ type;
|
||||||
union {
|
union
|
||||||
|
{
|
||||||
char* s;
|
char* s;
|
||||||
FT_Fixed f;
|
FT_Fixed f;
|
||||||
FT_Int i;
|
FT_Int i;
|
||||||
|
|
|
@ -1622,7 +1622,8 @@
|
||||||
|
|
||||||
if ( builder->parse_state == T1_Parse_Have_Path )
|
if ( builder->parse_state == T1_Parse_Have_Path )
|
||||||
error = PSaux_Err_Ok;
|
error = PSaux_Err_Ok;
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
builder->parse_state = T1_Parse_Have_Path;
|
builder->parse_state = T1_Parse_Have_Path;
|
||||||
error = t1_builder_add_contour( builder );
|
error = t1_builder_add_contour( builder );
|
||||||
if ( !error )
|
if ( !error )
|
||||||
|
|
|
@ -370,7 +370,8 @@
|
||||||
if ( !error )
|
if ( !error )
|
||||||
error = PSnames_Err_Invalid_Argument; /* No unicode chars here! */
|
error = PSnames_Err_Invalid_Argument; /* No unicode chars here! */
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
/* Reallocate if the number of used entries is much smaller. */
|
/* Reallocate if the number of used entries is much smaller. */
|
||||||
if ( count < num_glyphs / 2 )
|
if ( count < num_glyphs / 2 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2787,7 +2787,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* and the non-default table (these glyphs are specified here) */
|
/* and the non-default table (these glyphs are specified here) */
|
||||||
if ( nondefOff != 0 ) {
|
if ( nondefOff != 0 )
|
||||||
|
{
|
||||||
FT_Byte* ndp = table + nondefOff;
|
FT_Byte* ndp = table + nondefOff;
|
||||||
FT_ULong numMappings = TT_NEXT_ULONG( ndp );
|
FT_ULong numMappings = TT_NEXT_ULONG( ndp );
|
||||||
FT_ULong i, lastUni = 0;
|
FT_ULong i, lastUni = 0;
|
||||||
|
|
|
@ -77,7 +77,8 @@
|
||||||
{
|
{
|
||||||
/* For compatibility with Windows, we consider */
|
/* For compatibility with Windows, we consider */
|
||||||
/* zero-length tables the same as missing tables. */
|
/* zero-length tables the same as missing tables. */
|
||||||
if ( entry->Tag == tag ) {
|
if ( entry->Tag == tag )
|
||||||
|
{
|
||||||
if ( entry->Length != 0 )
|
if ( entry->Length != 0 )
|
||||||
{
|
{
|
||||||
FT_TRACE4(( "found table.\n" ));
|
FT_TRACE4(( "found table.\n" ));
|
||||||
|
|
|
@ -1728,7 +1728,8 @@
|
||||||
if ( distance && val < 0 )
|
if ( distance && val < 0 )
|
||||||
val = 0;
|
val = 0;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
val = distance - compensation;
|
val = distance - compensation;
|
||||||
if ( val > 0 )
|
if ( val > 0 )
|
||||||
val = 0;
|
val = 0;
|
||||||
|
|
|
@ -52,7 +52,8 @@
|
||||||
/* as Type42 fonts have no Private dict, */
|
/* as Type42 fonts have no Private dict, */
|
||||||
/* we set the last argument of T1_FIELD_XXX to 0 */
|
/* we set the last argument of T1_FIELD_XXX to 0 */
|
||||||
static const
|
static const
|
||||||
T1_FieldRec t42_keywords[] = {
|
T1_FieldRec t42_keywords[] =
|
||||||
|
{
|
||||||
|
|
||||||
#undef FT_STRUCTURE
|
#undef FT_STRUCTURE
|
||||||
#define FT_STRUCTURE T1_FontInfo
|
#define FT_STRUCTURE T1_FontInfo
|
||||||
|
@ -268,7 +269,8 @@
|
||||||
temp_scale ) >> 16 );
|
temp_scale ) >> 16 );
|
||||||
|
|
||||||
/* we need to scale the values by 1.0/temp_scale */
|
/* we need to scale the values by 1.0/temp_scale */
|
||||||
if ( temp_scale != 0x10000L ) {
|
if ( temp_scale != 0x10000L )
|
||||||
|
{
|
||||||
temp[0] = FT_DivFix( temp[0], temp_scale );
|
temp[0] = FT_DivFix( temp[0], temp_scale );
|
||||||
temp[1] = FT_DivFix( temp[1], temp_scale );
|
temp[1] = FT_DivFix( temp[1], temp_scale );
|
||||||
temp[2] = FT_DivFix( temp[2], temp_scale );
|
temp[2] = FT_DivFix( temp[2], temp_scale );
|
||||||
|
|
Loading…
Reference in New Issue