* src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes.

formatting, copyright updates
This commit is contained in:
Werner Lemberg 2002-04-01 22:01:46 +00:00
parent 91db04cb9c
commit efa996155e
16 changed files with 203 additions and 193 deletions

View File

@ -1,3 +1,7 @@
2002-04-02 Werner Lemberg <wl@gnu.org>
* src/type1/t1driver.c, src/type1/t1parse.c: 16bit fixes.
2002-04-01 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c: 16bit fixes.

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2002 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000 by
# Copyright 1996-2000, 2001 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 driver interface (body). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -239,6 +239,7 @@
/* */
/* <Input> */
/* charmap :: A handle to the source charmap object. */
/* */
/* charcode :: The character code. */
/* */
/* <Return> */
@ -269,7 +270,7 @@
/* the function returns 0xFFFF if the Unicode charcode has */
/* no corresponding glyph */
if ( result == 0xFFFF )
if ( result == 0xFFFFU )
result = 0;
goto Exit;
@ -286,7 +287,7 @@
/* the function returns 0xFFFF if the Unicode charcode has */
/* no corresponding glyph */
if ( result == 0xFFFF )
if ( result == 0xFFFFU )
result = 0;
}
goto Exit;
@ -355,6 +356,7 @@
/* */
/* <Input> */
/* charmap :: A handle to the source charmap object. */
/* */
/* charcode :: The character code. */
/* */
/* <Return> */
@ -485,13 +487,13 @@
(FT_Face_DoneFunc) T1_Face_Done,
(FT_Size_InitFunc) T1_Size_Init,
(FT_Size_DoneFunc) T1_Size_Done,
(FT_Slot_InitFunc)T1_GlyphSlot_Init,
(FT_Slot_DoneFunc)T1_GlyphSlot_Done,
(FT_Slot_InitFunc) T1_GlyphSlot_Init,
(FT_Slot_DoneFunc) T1_GlyphSlot_Done,
(FT_Size_ResetPointsFunc) T1_Size_Reset,
(FT_Size_ResetPixelsFunc)T1_Size_Reset,
(FT_Size_ResetPixelsFunc) T1_Size_Reset,
(FT_Slot_LoadFunc) T1_Load_Glyph,
(FT_CharMap_CharIndexFunc) Get_Char_Index,
(FT_CharMap_CharIndexFunc)Get_Char_Index,
#ifdef T1_CONFIG_OPTION_NO_AFM
(FT_Face_GetKerningFunc) 0,

View File

@ -4,7 +4,7 @@
/* */
/* High-level Type 1 driver interface (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (body). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -153,6 +153,7 @@
FT_Matrix font_matrix;
FT_Vector font_offset;
if ( load_flags & FT_LOAD_NO_RECURSE )
load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (body). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -283,6 +283,7 @@
FT_Fixed* blends = map->blend_points;
FT_Int before = -1, after = -1;
for ( p = 0; p < (FT_UInt)map->num_points; p++ )
{
FT_Fixed p_design = designs[p];
@ -416,8 +417,9 @@
FT_Byte* name;
FT_Int len;
/* skip first slash, if any */
if (token->start[0] == '/')
if ( token->start[0] == '/' )
token->start++;
len = (FT_Int)( token->limit - token->start );
@ -529,7 +531,7 @@
FT_Error error = 0;
T1_Parser parser = &loader->parser;
PS_Blend blend;
T1_TokenRec axis_tokens[ T1_MAX_MM_AXIS ];
T1_TokenRec axis_tokens[T1_MAX_MM_AXIS];
FT_Int n, num_axis;
FT_Byte* old_cursor;
FT_Byte* old_limit;
@ -1129,7 +1131,6 @@
/* */
/* `index' + binary data */
/* */
for ( n = 0; n < loader->num_subrs; n++ )
{
FT_Int idx, size;
@ -1400,7 +1401,6 @@
}
else if ( !notdef_found )
{
/* notdef_index is already 0, or /.notdef is undefined in */
/* charstrings dictionary. Worry about /.notdef undefined. */
/* We take index 0 and add it to the end of the table(s) */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 objects manager (body). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -351,6 +351,7 @@
char* full = face->type1.font_info.full_name;
char* family = root->family_name;
if ( full )
{
while ( *family && *full == *family )
@ -392,8 +393,8 @@
root->bbox.xMin = face->type1.font_bbox.xMin >> 16;
root->bbox.yMin = face->type1.font_bbox.yMin >> 16;
root->bbox.xMax = (face->type1.font_bbox.xMax + 0xFFFFU) >> 16;
root->bbox.yMax = (face->type1.font_bbox.yMax + 0xFFFFU) >> 16;
root->bbox.xMax = ( face->type1.font_bbox.xMax + 0xFFFFU ) >> 16;
root->bbox.yMax = ( face->type1.font_bbox.yMax + 0xFFFFU ) >> 16;
/* Set units_per_EM if we didn't set it in parse_font_matrix. */
if ( !root->units_per_EM )
@ -434,12 +435,14 @@
{
FT_Face root = &face->root;
if ( psnames && psaux )
{
FT_CharMapRec charmap;
T1_CMap_Classes cmap_classes = psaux->t1_cmap_classes;
FT_CMap_Class clazz;
charmap.face = root;
/* first of all, try to synthetize a Unicode charmap */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 objects manager (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 parser (body). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -108,7 +108,7 @@
*size = 0;
if ( !FT_STREAM_READ_FIELDS( pfb_tag_fields, &head ) )
{
if ( head.tag == 0x8001 || head.tag == 0x8002 )
if ( head.tag == 0x8001U || head.tag == 0x8002U )
{
*tag = head.tag;
*size = head.size;
@ -165,7 +165,7 @@
if ( error )
goto Exit;
if ( tag != 0x8001 )
if ( tag != 0x8001U )
{
/* assume that this is a PFA file for now; an error will */
/* be produced later when more things are checked */
@ -294,7 +294,7 @@
if ( error )
goto Fail;
if ( tag != 0x8002 )
if ( tag != 0x8002U )
break;
parser->private_len += size;
@ -321,7 +321,7 @@
for (;;)
{
error = read_pfb_tag( stream, &tag, &size );
if ( error || tag != 0x8002 )
if ( error || tag != 0x8002U )
{
error = T1_Err_Ok;
break;

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 parser (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* Type 1 tokenizer (specification). */
/* */
/* Copyright 1996-2001 by */
/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -21,14 +21,14 @@
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
T1_FIELD_STRING( "version", version )
T1_FIELD_STRING( "Notice", notice )
T1_FIELD_STRING( "FullName", full_name )
T1_FIELD_STRING( "FamilyName", family_name )
T1_FIELD_STRING( "Weight", weight )
T1_FIELD_STRING ( "version", version )
T1_FIELD_STRING ( "Notice", notice )
T1_FIELD_STRING ( "FullName", full_name )
T1_FIELD_STRING ( "FamilyName", family_name )
T1_FIELD_STRING ( "Weight", weight )
T1_FIELD_NUM ( "ItalicAngle", italic_angle )
T1_FIELD_TYPE_BOOL ( "isFixedPitch", is_fixed_pitch )
T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
T1_FIELD_NUM ( "UnderlinePosition", underline_position )
T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )