Formatting, copyright year updates.

Decorate long constants with `L' and `UL' where appropriate.
This commit is contained in:
Werner Lemberg 2006-01-13 14:53:28 +00:00
Родитель fa7d6ab217
Коммит f1c2b91e14
36 изменённых файлов: 164 добавлений и 156 удалений

Просмотреть файл

@ -2,7 +2,7 @@
Introduce new size selection interface.
* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec_):
* include/freetype/internal/ftdriver.h (struct FT_Driver_ClassRec):
Replace `set_char_sizes' and `set_pixel_sizes' by `request_size' and
`select_size'.

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -300,8 +300,8 @@ FT_BEGIN_HEADER
/* Windows FNT: */
/* The nominal size given in a FNT font is not reliable. Thus when */
/* the driver finds it incorrect, it sets `size' to some calculated */
/* values and set `x_ppem' and `y_ppem' to pixel width and height */
/* given in the font, respectively. */
/* values and sets `x_ppem' and `y_ppem' to the pixel width and */
/* height given in the font, respectively. */
/* */
/* TrueType embedded bitmaps: */
/* `size', `width', and `height' values are not contained in the */
@ -1622,7 +1622,7 @@ FT_BEGIN_HEADER
/* FT_Init_FreeType */
/* */
/* <Description> */
/* Initializes a new FreeType library object. The set of modules */
/* Initialize a new FreeType library object. The set of modules */
/* that are registered by this function is determined at build time. */
/* */
/* <Output> */
@ -1677,7 +1677,7 @@ FT_BEGIN_HEADER
/* FT_Done_FreeType */
/* */
/* <Description> */
/* Destroys a given FreeType library object and all of its childs, */
/* Destroy a given FreeType library object and all of its childs, */
/* including resources, drivers, faces, sizes, etc. */
/* */
/* <Input> */
@ -1834,7 +1834,7 @@ FT_BEGIN_HEADER
/* FT_New_Face */
/* */
/* <Description> */
/* Creates a new face object from a given resource and typeface index */
/* Create a new face object from a given resource and typeface index */
/* using a pathname to the font file. */
/* */
/* <InOut> */
@ -1885,7 +1885,7 @@ FT_BEGIN_HEADER
/* FT_New_Memory_Face */
/* */
/* <Description> */
/* Creates a new face object from a given resource and typeface index */
/* Create a new face object from a given resource and typeface index */
/* using a font file already loaded into memory. */
/* */
/* <InOut> */
@ -1941,7 +1941,7 @@ FT_BEGIN_HEADER
/* FT_Open_Face */
/* */
/* <Description> */
/* Opens a face object from a given resource and typeface index using */
/* Open a face object from a given resource and typeface index using */
/* an `FT_Open_Args' structure. If the face object doesn't exist, it */
/* is created. */
/* */
@ -1991,7 +1991,7 @@ FT_BEGIN_HEADER
/* FT_Attach_File */
/* */
/* <Description> */
/* `Attaches' a given font file to an existing face. This is usually */
/* `Attach' a given font file to an existing face. This is usually */
/* to read additional information for a single face object. For */
/* example, it is used to read the AFM files that come with Type 1 */
/* fonts in order to add kerning data and other metrics. */
@ -2060,8 +2060,8 @@ FT_BEGIN_HEADER
/* FT_Done_Face */
/* */
/* <Description> */
/* Discards a given face object, as well as all of its child slots */
/* and sizes. */
/* Discard a given face object, as well as all of its child slots and */
/* sizes. */
/* */
/* <Input> */
/* face :: A handle to a target face object. */
@ -2079,7 +2079,7 @@ FT_BEGIN_HEADER
/* FT_Select_Size */
/* */
/* <Description> */
/* Selects a fixed size. */
/* Select a fixed size . */
/* */
/* <InOut> */
/* face :: A handle to a target face object. */
@ -2102,7 +2102,7 @@ FT_BEGIN_HEADER
/* FT_Size_Request_Type */
/* */
/* <Description> */
/* An enumeration type that lists the size request types supported. */
/* An enumeration type that lists the supported size request types. */
/* */
/* <Values> */
/* FT_SIZE_REQUEST_TYPE_NOMINAL :: */
@ -2110,23 +2110,24 @@ FT_BEGIN_HEADER
/* @FT_FaceRec. */
/* */
/* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */
/* The real dimension. That is, the sum of the Ascender and */
/* (minus of) Descender fields of @FT_FaceRec. */
/* The real dimension. That is, the sum of the `Ascender' and */
/* (minus of) `Descender' fields of @FT_FaceRec. */
/* */
/* FT_SIZE_REQUEST_TYPE_BBOX :: */
/* The font bounding box. That is, the bbox field of @FT_FaceRec. */
/* The font bounding box. That is, the `bbox' field of */
/* @FT_FaceRec. */
/* */
/* FT_SIZE_REQUEST_TYPE_CELL :: */
/* The horizontal scale is determined by the max_advance_width */
/* field of @FT_FaceRec and the vertical scale is determined the */
/* The horizontal scale is determined by the `max_advance_width' */
/* field of @FT_FaceRec, and the vertical scale is determined the */
/* same way as @FT_SIZE_REQUEST_TYPE_REAL_DIM does. Finally, both */
/* scales are set to the smaller one. This type is useful when */
/* you want to specify the font size for, for example, a window of */
/* scales are set to the smaller one. This type is useful if you */
/* want to specify the font size for, for example, a window of */
/* 80x24 cells. */
/* */
/* <Note> */
/* See the note section of @FT_Size_Metrics if you wonder how does */
/* size requesting relate to scales. */
/* See the note section of @FT_Size_Metrics if you wonder how size */
/* requesting relates to scales. */
/* */
typedef enum FT_Size_Request_Type_
{
@ -2153,19 +2154,19 @@ FT_BEGIN_HEADER
/* */
/* height :: The desired height. */
/* */
/* horiResolution :: The horizontal resolution. If set to zero, then */
/* the width is treated as 26.6 fractional pixels. */
/* horiResolution :: The horizontal resolution. If set to zero, the */
/* width is treated as 26.6 fractional pixels. */
/* */
/* vertResolution :: The vertical resolution. If set to zero, then */
/* the height is treated as 26.6 fractional pixels. */
/* vertResolution :: The vertical resolution. If set to zero, the */
/* height is treated as 26.6 fractional pixels. */
/* */
/* <Note> */
/* width and height cannot both be zero. If either of them is zero, */
/* its value is chosen so that the horizontal and vertical scales are */
/* equal. */
/* `width' and `height' cannot both be zero. If either of them is */
/* zero, its value is chosen so that the horizontal and vertical */
/* scales are equal. */
/* */
/* You should use @FT_Select_Size if you are intended to select some */
/* fixed size from the `available_sizes' field of @FT_FaceRec. */
/* You should use @FT_Select_Size if you intend to select some fixed */
/* size from the `available_sizes' field of @FT_FaceRec. */
/* */
typedef struct FT_Size_RequestRec_
{
@ -2174,6 +2175,7 @@ FT_BEGIN_HEADER
FT_F26Dot6 height;
FT_UInt horiResolution;
FT_UInt vertResolution;
} FT_Size_RequestRec, *FT_Size_Request;
@ -2186,10 +2188,10 @@ FT_BEGIN_HEADER
/* Request the size of the active size object of a given face object. */
/* */
/* <InOut> */
/* face :: A handle to a target face object. */
/* face :: A handle to a target face object. */
/* */
/* <Input> */
/* req :: A pointer to a @FT_Size_RequestRec. */
/* req :: A pointer to a @FT_Size_RequestRec. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
@ -2709,9 +2711,8 @@ FT_BEGIN_HEADER
/* FT_Render_Glyph */
/* */
/* <Description> */
/* Converts a given glyph image to a bitmap. It does so by */
/* inspecting the glyph image format, find the relevant renderer, and */
/* invoke it. */
/* Convert a given glyph image to a bitmap. It does so by inspecting */
/* the glyph image format, find the relevant renderer, and invoke it. */
/* */
/* <InOut> */
/* slot :: A handle to the glyph slot containing the image to */
@ -2800,7 +2801,7 @@ FT_BEGIN_HEADER
/* FT_Get_Kerning */
/* */
/* <Description> */
/* Returns the kerning vector between two glyphs of a same face. */
/* Return the kerning vector between two glyphs of a same face. */
/* */
/* <Input> */
/* face :: A handle to a source face object. */
@ -2841,7 +2842,7 @@ FT_BEGIN_HEADER
/* FT_Get_Glyph_Name */
/* */
/* <Description> */
/* Retrieves the ASCII name of a given glyph in a face. This only */
/* Retriev the ASCII name of a given glyph in a face. This only */
/* works for those faces where @FT_HAS_GLYPH_NAMES(face) returns */
/* TRUE. */
/* */
@ -2885,7 +2886,7 @@ FT_BEGIN_HEADER
/* FT_Get_Postscript_Name */
/* */
/* <Description> */
/* Retrieves the ASCII Postscript name of a given face, if available. */
/* Retriev the ASCII Postscript name of a given face, if available. */
/* This only works with Postscript and TrueType fonts. */
/* */
/* <Input> */
@ -2908,7 +2909,7 @@ FT_BEGIN_HEADER
/* FT_Select_Charmap */
/* */
/* <Description> */
/* Selects a given charmap by its encoding tag (as listed in */
/* Select a given charmap by its encoding tag (as listed in */
/* `freetype.h'). */
/* */
/* <InOut> */
@ -2935,8 +2936,7 @@ FT_BEGIN_HEADER
/* FT_Set_Charmap */
/* */
/* <Description> */
/* Selects a given charmap for character code to glyph index */
/* decoding. */
/* Select a given charmap for character code to glyph index decoding. */
/* */
/* <InOut> */
/* face :: A handle to the source face object. */
@ -2984,7 +2984,7 @@ FT_BEGIN_HEADER
/* FT_Get_Char_Index */
/* */
/* <Description> */
/* Returns the glyph index of a given character code. This function */
/* Return the glyph index of a given character code. This function */
/* uses a charmap object to do the translation. */
/* */
/* <Input> */
@ -3095,7 +3095,7 @@ FT_BEGIN_HEADER
/* FT_Get_Name_Index */
/* */
/* <Description> */
/* Returns the glyph index of a given glyph name. This function uses */
/* Return the glyph index of a given glyph name. This function uses */
/* driver specific objects to do the translation. */
/* */
/* <Input> */
@ -3294,7 +3294,7 @@ FT_BEGIN_HEADER
/* FT_Vector_Transform */
/* */
/* <Description> */
/* Transforms a single vector through a 2x2 matrix. */
/* Transform a single vector through a 2x2 matrix. */
/* */
/* <InOut> */
/* vector :: The target vector to transform. */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003 by */
/* Copyright 1996-2001, 2002, 2003, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -130,7 +130,7 @@ FT_BEGIN_HEADER
/* scaling done in the base layer suffices. */
/* */
/* select_size :: A handle to a function used to select a new */
/* fixed size. It is used only when */
/* fixed size. It is used only if */
/* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */
/* to 0 if the scaling done in the base layer */
/* suffices. */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -131,7 +131,7 @@ FT_BEGIN_HEADER
/* TT_Load_SFNT_HeaderRec_Func */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
/* Load the header of a SFNT font file. Supports collections. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@ -169,7 +169,7 @@ FT_BEGIN_HEADER
/* TT_Load_Directory_Func */
/* */
/* <Description> */
/* Loads the table directory into a face object. */
/* Load the table directory into a face object. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@ -198,7 +198,7 @@ FT_BEGIN_HEADER
/* TT_Load_Any_Func */
/* */
/* <Description> */
/* Loads any font table into client memory. */
/* Load any font table into client memory. */
/* */
/* <Input> */
/* face :: The face object to look for. */
@ -246,7 +246,7 @@ FT_BEGIN_HEADER
/* TT_Find_SBit_Image_Func */
/* */
/* <Description> */
/* Checks whether an embedded bitmap (an `sbit') exists for a given */
/* Check whether an embedded bitmap (an `sbit') exists for a given */
/* glyph, at a given strike. */
/* */
/* <Input> */
@ -283,7 +283,7 @@ FT_BEGIN_HEADER
/* TT_Load_SBit_Metrics_Func */
/* */
/* <Description> */
/* Gets the big metrics for a given embedded bitmap. */
/* Get the big metrics for a given embedded bitmap. */
/* */
/* <Input> */
/* stream :: The input stream. */
@ -316,7 +316,7 @@ FT_BEGIN_HEADER
/* TT_Load_SBit_Image_Func */
/* */
/* <Description> */
/* Loads a given glyph sbit image from the font resource. This also */
/* Load a given glyph sbit image from the font resource. This also */
/* returns its metrics. */
/* */
/* <Input> */
@ -365,7 +365,7 @@ FT_BEGIN_HEADER
/* TT_Set_SBit_Strike_Func */
/* */
/* <Description> */
/* Selects an sbit strike for a given size request. */
/* Select an sbit strike for a given size request. */
/* */
/* <Input> */
/* face :: The target face object. */
@ -391,7 +391,7 @@ FT_BEGIN_HEADER
/* TT_Load_Strike_Metrics_Func */
/* */
/* <Description> */
/* Loads the metrics of a given strike. */
/* Load the metrics of a given strike. */
/* */
/* <Input> */
/* face :: The target face object. */
@ -417,7 +417,7 @@ FT_BEGIN_HEADER
/* TT_Get_PS_Name_Func */
/* */
/* <Description> */
/* Gets the PostScript glyph name of a glyph. */
/* Get the PostScript glyph name of a glyph. */
/* */
/* <Input> */
/* idx :: The glyph index. */
@ -442,7 +442,7 @@ FT_BEGIN_HEADER
/* TT_Load_Metrics_Func */
/* */
/* <Description> */
/* Loads the horizontal or vertical header in a face object. */
/* Load the horizontal or vertical header in a face object. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@ -466,7 +466,7 @@ FT_BEGIN_HEADER
/* TT_Load_Table_Func */
/* */
/* <Description> */
/* Loads a given TrueType table. */
/* Load a given TrueType table. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
@ -491,7 +491,7 @@ FT_BEGIN_HEADER
/* TT_Free_Table_Func */
/* */
/* <Description> */
/* Frees a given TrueType table. */
/* Free a given TrueType table. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */

Просмотреть файл

@ -1980,7 +1980,7 @@
return FT_Err_Unimplemented_Feature;
if ( req->horiResolution )
w = ( req->width * req->horiResolution + 36 ) / 72;
w = ( req->width * req->horiResolution + 36 ) / 72;
else
w = req->width;
@ -2000,7 +2000,7 @@
continue;
if ( w == face->available_sizes[i].x_ppem ||
ignore_width )
ignore_width )
{
if ( index )
*index = (FT_ULong)i;
@ -2069,8 +2069,8 @@
}
else
{
metrics->x_scale = 0x10000;
metrics->y_scale = 0x10000;
metrics->x_scale = 0x10000L;
metrics->y_scale = 0x10000L;
metrics->ascender = bsize->y_ppem;
metrics->descender = 0;
metrics->height = bsize->height << 6;
@ -2114,24 +2114,28 @@
case FT_SIZE_REQUEST_TYPE_NOMINAL:
w = h = face->units_per_EM;
break;
case FT_SIZE_REQUEST_TYPE_REAL_DIM:
w = h = face->ascender - face->descender;
break;
case FT_SIZE_REQUEST_TYPE_CELL:
w = face->max_advance_width;
h = face->ascender - face->descender;
break;
case FT_SIZE_REQUEST_TYPE_BBOX:
w = face->bbox.xMax - face->bbox.xMin;
h = face->bbox.yMax - face->bbox.yMin;
break;
default:
return FT_Err_Unimplemented_Feature;
break;
}
if ( req->horiResolution )
scaled_w = ( req->width * req->horiResolution + 36 ) / 72;
scaled_w = ( req->width * req->horiResolution + 36 ) / 72;
else
scaled_w = req->width;

Просмотреть файл

@ -2,7 +2,7 @@
FreeType font driver for bdf files
Copyright (C) 2001, 2002, 2003, 2004, 2005 by
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -587,9 +587,9 @@ THE SOFTWARE.
{
bdf_font_t* bdffont = ( (BDF_Face)size->face )->bdffont;
FT_UNUSED( index );
size->metrics.ascender = bdffont->font_ascent << 6;
size->metrics.descender = -bdffont->font_descent << 6;
size->metrics.max_advance = bdffont->bbx.width << 6;

Просмотреть файл

@ -1,6 +1,6 @@
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
* Copyright 2001, 2002, 2003, 2004, 2005 Francesco Zappa Nardelli
* Copyright 2001, 2002, 2003, 2004, 2005, 2006 Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@ -1064,8 +1064,8 @@
_BDF_BBX | \
_BDF_BITMAP )
#define _BDF_GLYPH_WIDTH_CHECK 0x40000000L
#define _BDF_GLYPH_HEIGHT_CHECK 0x80000000L
#define _BDF_GLYPH_WIDTH_CHECK 0x40000000UL
#define _BDF_GLYPH_HEIGHT_CHECK 0x80000000UL
/* Auto correction messages. */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* OpenType font driver implementation (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -2420,7 +2420,7 @@
FT_Stream stream = cff_face->root.stream;
if ( size->strike_index != 0xFFFFFFFFU &&
if ( size->strike_index != 0xFFFFFFFFUL &&
sfnt->load_sbits &&
( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
{

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -159,7 +159,7 @@
cffsize->internal = (FT_Size_Internal)(void*)globals;
}
size->strike_index = 0xFFFFFFFFU;
size->strike_index = 0xFFFFFFFFUL;
return error;
}
@ -171,8 +171,12 @@
{
CFF_Size cffsize = (CFF_Size)size;
PSH_Globals_Funcs funcs;
#ifndef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_UNUSED( req );
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
#else
if ( FT_HAS_FIXED_SIZES( size->face ) )
{
@ -183,20 +187,16 @@
FT_Error error;
if ( !( error = sfnt->set_sbit_strike( cffface,
req,
&index ) ) &&
!( error = sfnt->load_strike_metrics( cffface,
index,
metrics ) ) )
if ( !( error = sfnt->set_sbit_strike(
cffface, req, &index ) ) &&
!( error = sfnt->load_strike_metrics(
cffface, index, metrics ) ) )
cffsize->strike_index = index;
else
cffsize->strike_index = 0xFFFFFFFFU;
cffsize->strike_index = 0xFFFFFFFFUL;
}
#endif
FT_UNUSED( req );
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
funcs = cff_size_get_globals_funcs( cffsize );
@ -234,7 +234,7 @@
error = sfnt->load_strike_metrics( cffface, index, metrics );
if ( error )
cffsize->strike_index = 0xFFFFFFFFU;
cffsize->strike_index = 0xFFFFFFFFUL;
else
cffsize->strike_index = index;

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -54,7 +54,7 @@ FT_BEGIN_HEADER
typedef struct CFF_SizeRec_
{
FT_SizeRec root;
FT_ULong strike_index; /* 0xFFFFFFFFU to indicate invalid */
FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
} CFF_SizeRec, *CFF_Size;

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* CID objects manager (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -158,9 +158,9 @@
{
PSH_Globals_Funcs funcs;
FT_UNUSED( req );
funcs = cid_size_get_globals_funcs( (CID_Size)size );
if ( funcs )

Просмотреть файл

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

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* CID driver interface (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
Copyright (C) 2000, 2001, 2002, 2003 by
Copyright (C) 2000, 2001, 2002, 2003, 2006 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -171,12 +171,12 @@ FT_BEGIN_HEADER
#define PCF_FILE_VERSION ( ( 'p' << 24 ) | \
( 'c' << 16 ) | \
( 'f' << 8 ) | 1 )
#define PCF_FORMAT_MASK 0xFFFFFF00L
#define PCF_FORMAT_MASK 0xFFFFFF00UL
#define PCF_DEFAULT_FORMAT 0x00000000L
#define PCF_INKBOUNDS 0x00000200L
#define PCF_ACCEL_W_INKBOUNDS 0x00000100L
#define PCF_COMPRESSED_METRICS 0x00000100L
#define PCF_DEFAULT_FORMAT 0x00000000UL
#define PCF_INKBOUNDS 0x00000200UL
#define PCF_ACCEL_W_INKBOUNDS 0x00000100UL
#define PCF_COMPRESSED_METRICS 0x00000100UL
#define PCF_FORMAT_MATCH( a, b ) \
( ( (a) & PCF_FORMAT_MASK ) == ( (b) & PCF_FORMAT_MASK ) )

Просмотреть файл

@ -2,7 +2,7 @@
FreeType font driver for pcf files
Copyright (C) 2000, 2001, 2002, 2003, 2004 by
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -366,11 +366,11 @@ THE SOFTWARE.
PCF_Size_Select( FT_Size size,
FT_ULong index )
{
PCF_Face face = (PCF_Face)size->face;
PCF_Face face = (PCF_Face)size->face;
FT_UNUSED( index );
size->metrics.ascender = face->accel.fontAscent << 6;
size->metrics.descender = -face->accel.fontDescent << 6;
#if 0

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
/* Copyright 2002, 2003, 2004 by */
/* Copyright 2002, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
/* Copyright 2002, 2003, 2004, 2005 by */
/* Copyright 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

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

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

Просмотреть файл

@ -5,7 +5,7 @@
/* TrueType and OpenType embedded bitmap support (body). */
/* This is a heap-optimized version. */
/* */
/* Copyright 2005 by */
/* Copyright 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -219,7 +219,7 @@
FT_ULong strike_index,
FT_Size_Metrics* metrics )
{
FT_Byte* strike;
FT_Byte* strike;
if ( strike_index >= (FT_ULong)face->num_sbit_strikes )

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* TrueType font driver implementation (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -142,7 +142,11 @@
TT_Size ttsize = (TT_Size)size;
FT_Error error = TT_Err_Ok;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
#ifndef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
FT_UNUSED( req );
#else
if ( FT_HAS_FIXED_SIZES( size->face ) )
{
@ -150,18 +154,17 @@
FT_Size_Metrics* metrics = &size->metrics;
FT_ULong index;
if ( !( error = sfnt->set_sbit_strike( ttface,
req,
&index ) ) &&
!( error = sfnt->load_strike_metrics( ttface,
index,
metrics ) ) )
if ( !( error = sfnt->set_sbit_strike(
ttface, req, &index ) ) &&
!( error = sfnt->load_strike_metrics(
ttface, index, metrics ) ) )
ttsize->strike_index = index;
else
ttsize->strike_index = 0xFFFFFFFFU;
ttsize->strike_index = 0xFFFFFFFFUL;
}
#endif
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
if ( FT_IS_SCALABLE( size->face ) )
error = tt_size_reset( ttsize );
@ -188,7 +191,7 @@
error = sfnt->load_strike_metrics( ttface, index, metrics );
if ( error )
ttsize->strike_index = 0xFFFFFFFFU;
ttsize->strike_index = 0xFFFFFFFFUL;
else
ttsize->strike_index = index;

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -2007,7 +2007,7 @@
/* */
/* XXX: The convention should be emphasized in */
/* the documents because it can be confusing. */
if ( size->strike_index != 0xFFFFFFFFU &&
if ( size->strike_index != 0xFFFFFFFFUL &&
( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
{
error = load_sbit_image( size, glyph, glyph_index, load_flags );

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* Objects manager (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -66,7 +66,7 @@
/* tt_glyphzone_done */
/* */
/* <Description> */
/* Deallocates a glyph zone. */
/* Deallocate a glyph zone. */
/* */
/* <Input> */
/* zone :: A pointer to the target glyph zone. */
@ -97,7 +97,7 @@
/* tt_glyphzone_new */
/* */
/* <Description> */
/* Allocates a new glyph zone. */
/* Allocate a new glyph zone. */
/* */
/* <Input> */
/* memory :: A handle to the current memory object. */
@ -148,7 +148,7 @@
/* tt_face_init */
/* */
/* <Description> */
/* Initializes a given TrueType face object. */
/* Initialize a given TrueType face object. */
/* */
/* <Input> */
/* stream :: The source font stream. */
@ -276,7 +276,7 @@
/* tt_face_done */
/* */
/* <Description> */
/* Finalizes a given face object. */
/* Finalize a given face object. */
/* */
/* <Input> */
/* face :: A pointer to the face object to destroy. */
@ -483,7 +483,7 @@
/* tt_size_init */
/* */
/* <Description> */
/* Initializes a new TrueType size object. */
/* Initialize a new TrueType size object. */
/* */
/* <InOut> */
/* size :: A handle to the size object. */
@ -585,7 +585,7 @@
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
size->ttmetrics.valid = FALSE;
size->strike_index = 0xFFFFFFFFU;
size->strike_index = 0xFFFFFFFFUL;
return error;
}
@ -652,7 +652,7 @@
/* tt_size_reset */
/* */
/* <Description> */
/* Resets a TrueType size when resolutions and character dimensions */
/* Reset a TrueType size when resolutions and character dimensions */
/* have been changed. */
/* */
/* <Input> */
@ -678,10 +678,10 @@
if ( metrics->x_ppem < 1 || metrics->y_ppem < 1 )
return TT_Err_Invalid_PPem;
/* This bit flag, when set, indicates that the ppems must be */
/* rounded to integer. Nearly all TrueType fonts have this bit */
/* set, as hinting won't work really well otherwise. */
/* */
/* This bit flag, if set, indicates that the ppems must be */
/* rounded to integers. Nearly all TrueType fonts have this bit */
/* set, as hinting won't work really well otherwise. */
/* */
if ( face->header.Flags & 8 )
{
metrics->x_scale = FT_DivFix( metrics->x_ppem << 6,
@ -765,7 +765,7 @@
/* tt_driver_init */
/* */
/* <Description> */
/* Initializes a given TrueType driver object. */
/* Initialize a given TrueType driver object. */
/* */
/* <Input> */
/* driver :: A handle to the target driver object. */
@ -801,7 +801,7 @@
/* tt_driver_done */
/* */
/* <Description> */
/* Finalizes a given TrueType driver. */
/* Finalize a given TrueType driver. */
/* */
/* <Input> */
/* driver :: A handle to the target TrueType driver. */
@ -832,7 +832,7 @@
/* tt_slot_init */
/* */
/* <Description> */
/* Initializes a new slot object. */
/* Initialize a new slot object. */
/* */
/* <InOut> */
/* slot :: A handle to the slot object. */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* Objects manager (specification). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -322,7 +322,7 @@ FT_BEGIN_HEADER
TT_Size_Metrics ttmetrics;
FT_ULong strike_index; /* 0xFFFFFFFFU to indicate invalid */
FT_ULong strike_index; /* 0xFFFFFFFF to indicate invalid */
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* TrueType glyph data/program tables loader (body). */
/* */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -83,7 +83,7 @@
if ( face->header.Index_To_Loc_Format != 0 )
{
if ( table_len >= 0x40000 )
if ( table_len >= 0x40000L )
{
FT_TRACE2(( "table too large!\n" ));
error = TT_Err_Invalid_Table;
@ -93,7 +93,7 @@
}
else
{
if ( table_len >= 0x20000 )
if ( table_len >= 0x20000L )
{
FT_TRACE2(( "table too large!\n" ));
error = TT_Err_Invalid_Table;

Просмотреть файл

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

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -335,8 +335,8 @@
mmvar->axis[i].def = ( mmvar->axis[i].minimum +
mmvar->axis[i].maximum ) / 2;
/* Does not apply. But this value is in range */
mmvar->axis[i].strid = 0xFFFFFFFFLU; /* Does not apply */
mmvar->axis[i].tag = 0xFFFFFFFFLU; /* Does not apply */
mmvar->axis[i].strid = 0xFFFFFFFFUL; /* Does not apply */
mmvar->axis[i].tag = 0xFFFFFFFFUL; /* Does not apply */
if ( ft_strcmp( mmvar->axis[i].name, "Weight" ) == 0 )
mmvar->axis[i].tag = FT_MAKE_TAG( 'w', 'g', 'h', 't' );

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* High-level Type 42 driver interface (body). */
/* */
/* Copyright 2002, 2003, 2004 by Roberto Alameda. */
/* Copyright 2002, 2003, 2004, 2006 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (body). */
/* */
/* Copyright 2002, 2003, 2004, 2005 by Roberto Alameda. */
/* Copyright 2002, 2003, 2004, 2005, 2006 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@ -493,7 +493,7 @@
T42_Size_Request( T42_Size size,
FT_Size_Request req )
{
T42_Face face = (T42_Face)size->root.face;
T42_Face face = (T42_Face)size->root.face;
FT_Activate_Size( size->ttsize );
@ -506,7 +506,7 @@
T42_Size_Select( T42_Size size,
FT_ULong index )
{
T42_Face face = (T42_Face)size->root.face;
T42_Face face = (T42_Face)size->root.face;
FT_Activate_Size( size->ttsize );

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (specification). */
/* */
/* Copyright 2002, 2003 by Roberto Alameda. */
/* Copyright 2002, 2003, 2006 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */

Просмотреть файл

@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -592,6 +592,7 @@
FT_Face face = size->face;
FT_Error error;
error = FT_Match_Size( face, req, 1, NULL );
if ( error )