freetype.h | freetype.h | |||
---|---|---|---|---|
/************************************************************************** */ | /************************************************************************** */ | |||
/* */ | /* */ | |||
/* freetype.h */ | /* freetype.h */ | |||
/* */ | /* */ | |||
/* FreeType high-level API and common types (specification only). */ | /* FreeType high-level API and common types (specification only). */ | |||
/* */ | /* */ | |||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, | /* Copyright 1996-2011 by | |||
*/ | */ | |||
/* 2010 by | ||||
*/ | ||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | |||
/* */ | /* */ | |||
/* This file is part of the FreeType project, and may only be used, */ | /* This file is part of the FreeType project, and may only be used, */ | |||
/* modified, and distributed under the terms of the FreeType project */ | /* modified, and distributed under the terms of the FreeType project */ | |||
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | |||
/* this file you indicate that you have read the license and */ | /* this file you indicate that you have read the license and */ | |||
/* understand and accept it fully. */ | /* understand and accept it fully. */ | |||
/* */ | /* */ | |||
/************************************************************************** */ | /************************************************************************** */ | |||
skipping to change at line 220 | skipping to change at line 219 | |||
/* horiBearingY :: */ | /* horiBearingY :: */ | |||
/* Top side bearing for horizontal layout. */ | /* Top side bearing for horizontal layout. */ | |||
/* */ | /* */ | |||
/* horiAdvance :: */ | /* horiAdvance :: */ | |||
/* Advance width for horizontal layout. */ | /* Advance width for horizontal layout. */ | |||
/* */ | /* */ | |||
/* vertBearingX :: */ | /* vertBearingX :: */ | |||
/* Left side bearing for vertical layout. */ | /* Left side bearing for vertical layout. */ | |||
/* */ | /* */ | |||
/* vertBearingY :: */ | /* vertBearingY :: */ | |||
/* Top side bearing for vertical layout. | /* Top side bearing for vertical layout. Larger positive values | |||
*/ | */ | |||
/* mean further below the vertical glyph origin. | ||||
*/ | ||||
/* */ | /* */ | |||
/* vertAdvance :: */ | /* vertAdvance :: */ | |||
/* Advance height for vertical layout. | /* Advance height for vertical layout. Positive values mean the | |||
*/ | */ | |||
/* glyph has a positive advance downward. | ||||
*/ | ||||
/* */ | /* */ | |||
/* <Note> */ | /* <Note> */ | |||
/* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ | /* If not disabled with @FT_LOAD_NO_HINTING, the values represent */ | |||
/* dimensions of the hinted glyph (in case hinting is applicable). */ | /* dimensions of the hinted glyph (in case hinting is applicable). */ | |||
/* */ | /* */ | |||
typedef struct FT_Glyph_Metrics_ | typedef struct FT_Glyph_Metrics_ | |||
{ | { | |||
FT_Pos width; | FT_Pos width; | |||
FT_Pos height; | FT_Pos height; | |||
skipping to change at line 1034 | skipping to change at line 1035 | |||
/* */ | /* */ | |||
/* FT_FACE_FLAG_TRICKY :: */ | /* FT_FACE_FLAG_TRICKY :: */ | |||
/* Set if the font is `tricky', this is, it always needs the */ | /* Set if the font is `tricky', this is, it always needs the */ | |||
/* font format's native hinting engine to get a reasonable result. */ | /* font format's native hinting engine to get a reasonable result. */ | |||
/* A typical example is the Chinese font `mingli.ttf' which uses */ | /* A typical example is the Chinese font `mingli.ttf' which uses */ | |||
/* TrueType bytecode instructions to move and scale all of its */ | /* TrueType bytecode instructions to move and scale all of its */ | |||
/* subglyphs. */ | /* subglyphs. */ | |||
/* */ | /* */ | |||
/* It is not possible to autohint such fonts using */ | /* It is not possible to autohint such fonts using */ | |||
/* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ | /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ | |||
/* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */ | /* @FT_LOAD_NO_HINTING. You have to set both @FT_LOAD_NO_HINTING */ | |||
/* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ | /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ | |||
/* probably never want this except for demonstration purposes. */ | /* probably never want this except for demonstration purposes. */ | |||
/* */ | /* */ | |||
/* Currently, there are six TrueType fonts in the list of tricky */ | /* Currently, there are six TrueType fonts in the list of tricky */ | |||
/* fonts; they are hard-coded in file `ttobjs.c'. */ | /* fonts; they are hard-coded in file `ttobjs.c'. */ | |||
/* */ | /* */ | |||
#define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) | #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) | |||
#define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) | #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) | |||
#define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) | #define FT_FACE_FLAG_FIXED_WIDTH ( 1L << 2 ) | |||
#define FT_FACE_FLAG_SFNT ( 1L << 3 ) | #define FT_FACE_FLAG_SFNT ( 1L << 3 ) | |||
skipping to change at line 1900 | skipping to change at line 1901 | |||
/* if the font format is recognized, or non-zero otherwise; */ | /* if the font format is recognized, or non-zero otherwise; */ | |||
/* the function returns a more or less empty face handle in `*aface' */ | /* the function returns a more or less empty face handle in `*aface' */ | |||
/* (if `aface' isn't NULL). The only useful field in this special */ | /* (if `aface' isn't NULL). The only useful field in this special */ | |||
/* case is `face->num_faces' which gives the number of faces within */ | /* case is `face->num_faces' which gives the number of faces within */ | |||
/* the font file. After examination, the returned @FT_Face structure */ | /* the font file. After examination, the returned @FT_Face structure */ | |||
/* should be deallocated with a call to @FT_Done_Face. */ | /* should be deallocated with a call to @FT_Done_Face. */ | |||
/* */ | /* */ | |||
/* Each new face object created with this function also owns a */ | /* Each new face object created with this function also owns a */ | |||
/* default @FT_Size object, accessible as `face->size'. */ | /* default @FT_Size object, accessible as `face->size'. */ | |||
/* */ | /* */ | |||
/* See the discussion of reference counters in the description of | ||||
*/ | ||||
/* @FT_Reference_Face. | ||||
*/ | ||||
/* | ||||
*/ | ||||
FT_EXPORT( FT_Error ) | FT_EXPORT( FT_Error ) | |||
FT_Open_Face( FT_Library library, | FT_Open_Face( FT_Library library, | |||
const FT_Open_Args* args, | const FT_Open_Args* args, | |||
FT_Long face_index, | FT_Long face_index, | |||
FT_Face *aface ); | FT_Face *aface ); | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* <Function> */ | /* <Function> */ | |||
/* FT_Attach_File */ | /* FT_Attach_File */ | |||
skipping to change at line 1964 | skipping to change at line 1968 | |||
/* when invoking this function. Most drivers simply do not implement */ | /* when invoking this function. Most drivers simply do not implement */ | |||
/* file attachments. */ | /* file attachments. */ | |||
/* */ | /* */ | |||
FT_EXPORT( FT_Error ) | FT_EXPORT( FT_Error ) | |||
FT_Attach_Stream( FT_Face face, | FT_Attach_Stream( FT_Face face, | |||
FT_Open_Args* parameters ); | FT_Open_Args* parameters ); | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* <Function> */ | /* <Function> */ | |||
/* FT_Reference_Face | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Description> | ||||
*/ | ||||
/* A counter gets initialized to~1 at the time an @FT_Face structure | ||||
*/ | ||||
/* is created. This function increments the counter. @FT_Done_Face | ||||
*/ | ||||
/* then only destroys a face if the counter is~1, otherwise it simply | ||||
*/ | ||||
/* decrements the counter. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* This function helps in managing life-cycles of structures which | ||||
*/ | ||||
/* reference @FT_Face objects. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Input> | ||||
*/ | ||||
/* face :: A handle to a target face object. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Return> | ||||
*/ | ||||
/* FreeType error code. 0~means success. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Since> | ||||
*/ | ||||
/* 2.4.2 | ||||
*/ | ||||
/* | ||||
*/ | ||||
FT_EXPORT( FT_Error ) | ||||
FT_Reference_Face( FT_Face face ); | ||||
/************************************************************************ | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Function> | ||||
*/ | ||||
/* FT_Done_Face */ | /* FT_Done_Face */ | |||
/* */ | /* */ | |||
/* <Description> */ | /* <Description> */ | |||
/* Discard a given face object, as well as all of its child slots and */ | /* Discard a given face object, as well as all of its child slots and */ | |||
/* sizes. */ | /* sizes. */ | |||
/* */ | /* */ | |||
/* <Input> */ | /* <Input> */ | |||
/* face :: A handle to a target face object. */ | /* face :: A handle to a target face object. */ | |||
/* */ | /* */ | |||
/* <Return> */ | /* <Return> */ | |||
/* FreeType error code. 0~means success. */ | /* FreeType error code. 0~means success. */ | |||
/* */ | /* */ | |||
/* <Note> | ||||
*/ | ||||
/* See the discussion of reference counters in the description of | ||||
*/ | ||||
/* @FT_Reference_Face. | ||||
*/ | ||||
/* | ||||
*/ | ||||
FT_EXPORT( FT_Error ) | FT_EXPORT( FT_Error ) | |||
FT_Done_Face( FT_Face face ); | FT_Done_Face( FT_Face face ); | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* <Function> */ | /* <Function> */ | |||
/* FT_Select_Size */ | /* FT_Select_Size */ | |||
/* */ | /* */ | |||
/* <Description> */ | /* <Description> */ | |||
/* Select a bitmap strike. */ | /* Select a bitmap strike. */ | |||
skipping to change at line 2346 | skipping to change at line 2380 | |||
* Indicates that the font driver should crop the loaded bitmap glyph | * Indicates that the font driver should crop the loaded bitmap glyph | |||
* (i.e., remove all space around its black bits). Not all drivers | * (i.e., remove all space around its black bits). Not all drivers | |||
* implement this. | * implement this. | |||
* | * | |||
* FT_LOAD_PEDANTIC :: | * FT_LOAD_PEDANTIC :: | |||
* Indicates that the font driver should perform pedantic verificatio ns | * Indicates that the font driver should perform pedantic verificatio ns | |||
* during glyph loading. This is mostly used to detect broken glyphs | * during glyph loading. This is mostly used to detect broken glyphs | |||
* in fonts. By default, FreeType tries to handle broken fonts also. | * in fonts. By default, FreeType tries to handle broken fonts also. | |||
* | * | |||
* FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: | * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: | |||
* Indicates that the font driver should ignore the global advance | * Ignored. Deprecated. | |||
* width defined in the font. By default, that value is used as the | ||||
* advance width for all glyphs when the face has | ||||
* @FT_FACE_FLAG_FIXED_WIDTH set. | ||||
* | ||||
* This flag exists for historical reasons (to support buggy CJK | ||||
* fonts). | ||||
* | * | |||
* FT_LOAD_NO_RECURSE :: | * FT_LOAD_NO_RECURSE :: | |||
* This flag is only used internally. It merely indicates that the | * This flag is only used internally. It merely indicates that the | |||
* font driver should not load composite glyphs recursively. Instead , | * font driver should not load composite glyphs recursively. Instead , | |||
* it should set the `num_subglyph' and `subglyphs' values of the | * it should set the `num_subglyph' and `subglyphs' values of the | |||
* glyph slot accordingly, and set `glyph->format' to | * glyph slot accordingly, and set `glyph->format' to | |||
* @FT_GLYPH_FORMAT_COMPOSITE. | * @FT_GLYPH_FORMAT_COMPOSITE. | |||
* | * | |||
* The description of sub-glyphs is not available to client | * The description of sub-glyphs is not available to client | |||
* applications for now. | * applications for now. | |||
skipping to change at line 2915 | skipping to change at line 2943 | |||
* | * | |||
* @description: | * @description: | |||
* Retrieve index of a given charmap. | * Retrieve index of a given charmap. | |||
* | * | |||
* @input: | * @input: | |||
* charmap :: | * charmap :: | |||
* A handle to a charmap. | * A handle to a charmap. | |||
* | * | |||
* @return: | * @return: | |||
* The index into the array of character maps within the face to which | * The index into the array of character maps within the face to which | |||
* `charmap' belongs. | * `charmap' belongs. If an error occurs, -1 is returned. | |||
* | * | |||
*/ | */ | |||
FT_EXPORT( FT_Int ) | FT_EXPORT( FT_Int ) | |||
FT_Get_Charmap_Index( FT_CharMap charmap ); | FT_Get_Charmap_Index( FT_CharMap charmap ); | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* <Function> */ | /* <Function> */ | |||
/* FT_Get_Char_Index */ | /* FT_Get_Char_Index */ | |||
/* */ | /* */ | |||
skipping to change at line 3667 | skipping to change at line 3695 | |||
* FREETYPE_MINOR :: The minor version number. | * FREETYPE_MINOR :: The minor version number. | |||
* FREETYPE_PATCH :: The patch level. | * FREETYPE_PATCH :: The patch level. | |||
* | * | |||
* @note: | * @note: | |||
* The version number of FreeType if built as a dynamic link library | * The version number of FreeType if built as a dynamic link library | |||
* with the `libtool' package is _not_ controlled by these three | * with the `libtool' package is _not_ controlled by these three | |||
* macros. | * macros. | |||
* | * | |||
*/ | */ | |||
#define FREETYPE_MAJOR 2 | #define FREETYPE_MAJOR 2 | |||
#define FREETYPE_MINOR 3 | #define FREETYPE_MINOR 4 | |||
#define FREETYPE_PATCH 12 | #define FREETYPE_PATCH 5 | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* <Function> */ | /* <Function> */ | |||
/* FT_Library_Version */ | /* FT_Library_Version */ | |||
/* */ | /* */ | |||
/* <Description> */ | /* <Description> */ | |||
/* Return the version of the FreeType library being used. This is */ | /* Return the version of the FreeType library being used. This is */ | |||
/* useful when dynamically linking to the library, since one cannot */ | /* useful when dynamically linking to the library, since one cannot */ | |||
/* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ | /* use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and */ | |||
skipping to change at line 3726 | skipping to change at line 3754 | |||
/* Note that this function parses *all* glyph instructions in the */ | /* Note that this function parses *all* glyph instructions in the */ | |||
/* font file, which may be slow. */ | /* font file, which may be slow. */ | |||
/* */ | /* */ | |||
/* <Input> */ | /* <Input> */ | |||
/* face :: A face handle. */ | /* face :: A face handle. */ | |||
/* */ | /* */ | |||
/* <Return> */ | /* <Return> */ | |||
/* 1~if this is a TrueType font that uses one of the patented */ | /* 1~if this is a TrueType font that uses one of the patented */ | |||
/* opcodes, 0~otherwise. */ | /* opcodes, 0~otherwise. */ | |||
/* */ | /* */ | |||
/* <Note> | ||||
*/ | ||||
/* Since May 2010, TrueType hinting is no longer patented. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Since> */ | /* <Since> */ | |||
/* 2.3.5 */ | /* 2.3.5 */ | |||
/* */ | /* */ | |||
FT_EXPORT( FT_Bool ) | FT_EXPORT( FT_Bool ) | |||
FT_Face_CheckTrueTypePatents( FT_Face face ); | FT_Face_CheckTrueTypePatents( FT_Face face ); | |||
/************************************************************************ */ | /************************************************************************ */ | |||
/* */ | /* */ | |||
/* <Function> */ | /* <Function> */ | |||
/* FT_Face_SetUnpatentedHinting */ | /* FT_Face_SetUnpatentedHinting */ | |||
skipping to change at line 3752 | skipping to change at line 3783 | |||
/* <Input> */ | /* <Input> */ | |||
/* face :: A face handle. */ | /* face :: A face handle. */ | |||
/* */ | /* */ | |||
/* value :: New boolean setting. */ | /* value :: New boolean setting. */ | |||
/* */ | /* */ | |||
/* <Return> */ | /* <Return> */ | |||
/* The old setting value. This will always be false if this is not */ | /* The old setting value. This will always be false if this is not */ | |||
/* an SFNT font, or if the unpatented hinter is not compiled in this */ | /* an SFNT font, or if the unpatented hinter is not compiled in this */ | |||
/* instance of the library. */ | /* instance of the library. */ | |||
/* */ | /* */ | |||
/* <Note> | ||||
*/ | ||||
/* Since May 2010, TrueType hinting is no longer patented. | ||||
*/ | ||||
/* | ||||
*/ | ||||
/* <Since> */ | /* <Since> */ | |||
/* 2.3.5 */ | /* 2.3.5 */ | |||
/* */ | /* */ | |||
FT_EXPORT( FT_Bool ) | FT_EXPORT( FT_Bool ) | |||
FT_Face_SetUnpatentedHinting( FT_Face face, | FT_Face_SetUnpatentedHinting( FT_Face face, | |||
FT_Bool value ); | FT_Bool value ); | |||
/* */ | /* */ | |||
FT_END_HEADER | FT_END_HEADER | |||
End of changes. 12 change blocks. | ||||
19 lines changed or deleted | 90 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |