nuclear@0: /***************************************************************************/ nuclear@0: /* */ nuclear@0: /* ftsnames.h */ nuclear@0: /* */ nuclear@0: /* Simple interface to access SFNT name tables (which are used */ nuclear@0: /* to hold font names, copyright info, notices, etc.) (specification). */ nuclear@0: /* */ nuclear@0: /* This is _not_ used to retrieve glyph names! */ nuclear@0: /* */ nuclear@0: /* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */ nuclear@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ nuclear@0: /* */ nuclear@0: /* This file is part of the FreeType project, and may only be used, */ nuclear@0: /* modified, and distributed under the terms of the FreeType project */ nuclear@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ nuclear@0: /* this file you indicate that you have read the license and */ nuclear@0: /* understand and accept it fully. */ nuclear@0: /* */ nuclear@0: /***************************************************************************/ nuclear@0: nuclear@0: nuclear@0: #ifndef __FT_SFNT_NAMES_H__ nuclear@0: #define __FT_SFNT_NAMES_H__ nuclear@0: nuclear@0: nuclear@0: #include nuclear@0: #include FT_FREETYPE_H nuclear@0: nuclear@0: #ifdef FREETYPE_H nuclear@0: #error "freetype.h of FreeType 1 has been loaded!" nuclear@0: #error "Please fix the directory search order for header files" nuclear@0: #error "so that freetype.h of FreeType 2 is found first." nuclear@0: #endif nuclear@0: nuclear@0: nuclear@0: FT_BEGIN_HEADER nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /*
*/ nuclear@0: /* sfnt_names */ nuclear@0: /* */ nuclear@0: /* */ nuclear@0: /* SFNT Names */ nuclear@0: /* */ nuclear@0: /* <Abstract> */ nuclear@0: /* Access the names embedded in TrueType and OpenType files. */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* The TrueType and OpenType specifications allow the inclusion of */ nuclear@0: /* a special `names table' in font files. This table contains */ nuclear@0: /* textual (and internationalized) information regarding the font, */ nuclear@0: /* like family name, copyright, version, etc. */ nuclear@0: /* */ nuclear@0: /* The definitions below are used to access them if available. */ nuclear@0: /* */ nuclear@0: /* Note that this has nothing to do with glyph names! */ nuclear@0: /* */ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* FT_SfntName */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to model an SFNT `name' table entry. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* platform_id :: The platform ID for `string'. */ nuclear@0: /* */ nuclear@0: /* encoding_id :: The encoding ID for `string'. */ nuclear@0: /* */ nuclear@0: /* language_id :: The language ID for `string'. */ nuclear@0: /* */ nuclear@0: /* name_id :: An identifier for `string'. */ nuclear@0: /* */ nuclear@0: /* string :: The `name' string. Note that its format differs */ nuclear@0: /* depending on the (platform,encoding) pair. It can */ nuclear@0: /* be a Pascal String, a UTF-16 one, etc. */ nuclear@0: /* */ nuclear@0: /* Generally speaking, the string is not */ nuclear@0: /* zero-terminated. Please refer to the TrueType */ nuclear@0: /* specification for details. */ nuclear@0: /* */ nuclear@0: /* string_len :: The length of `string' in bytes. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* Possible values for `platform_id', `encoding_id', `language_id', */ nuclear@0: /* and `name_id' are given in the file `ttnameid.h'. For details */ nuclear@0: /* please refer to the TrueType or OpenType specification. */ nuclear@0: /* */ nuclear@0: /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ nuclear@0: /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ nuclear@0: /* */ nuclear@0: typedef struct FT_SfntName_ nuclear@0: { nuclear@0: FT_UShort platform_id; nuclear@0: FT_UShort encoding_id; nuclear@0: FT_UShort language_id; nuclear@0: FT_UShort name_id; nuclear@0: nuclear@0: FT_Byte* string; /* this string is *not* null-terminated! */ nuclear@0: FT_UInt string_len; /* in bytes */ nuclear@0: nuclear@0: } FT_SfntName; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FT_Get_Sfnt_Name_Count */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Retrieve the number of name strings in the SFNT `name' table. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* face :: A handle to the source face. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* The number of strings in the `name' table. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_UInt ) nuclear@0: FT_Get_Sfnt_Name_Count( FT_Face face ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FT_Get_Sfnt_Name */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Retrieve a string of the SFNT `name' table for a given index. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* face :: A handle to the source face. */ nuclear@0: /* */ nuclear@0: /* idx :: The index of the `name' string. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* aname :: The indexed @FT_SfntName structure. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The `string' array returned in the `aname' structure is not */ nuclear@0: /* null-terminated. The application should deallocate it if it is no */ nuclear@0: /* longer in use. */ nuclear@0: /* */ nuclear@0: /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ nuclear@0: /* `name' table entries, then do a loop until you get the right */ nuclear@0: /* platform, encoding, and name ID. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FT_Get_Sfnt_Name( FT_Face face, nuclear@0: FT_UInt idx, nuclear@0: FT_SfntName *aname ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************** nuclear@0: * nuclear@0: * @constant: nuclear@0: * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY nuclear@0: * nuclear@0: * @description: nuclear@0: * A constant used as the tag of @FT_Parameter structures to make nuclear@0: * FT_Open_Face() ignore preferred family subfamily names in `name' nuclear@0: * table since OpenType version 1.4. For backwards compatibility with nuclear@0: * legacy systems which has 4-face-per-family restriction. nuclear@0: * nuclear@0: */ nuclear@0: #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) nuclear@0: nuclear@0: nuclear@0: /*************************************************************************** nuclear@0: * nuclear@0: * @constant: nuclear@0: * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY nuclear@0: * nuclear@0: * @description: nuclear@0: * A constant used as the tag of @FT_Parameter structures to make nuclear@0: * FT_Open_Face() ignore preferred subfamily names in `name' table since nuclear@0: * OpenType version 1.4. For backwards compatibility with legacy nuclear@0: * systems which has 4-face-per-family restriction. nuclear@0: * nuclear@0: */ nuclear@0: #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: nuclear@0: FT_END_HEADER nuclear@0: nuclear@0: #endif /* __FT_SFNT_NAMES_H__ */ nuclear@0: nuclear@0: nuclear@0: /* END */