vrshoot

annotate libs/ft2static/freetype/ftsnames.h @ 1:e7ca128b8713

looks nice :)
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 00:35:22 +0200
parents
children
rev   line source
nuclear@0 1 /***************************************************************************/
nuclear@0 2 /* */
nuclear@0 3 /* ftsnames.h */
nuclear@0 4 /* */
nuclear@0 5 /* Simple interface to access SFNT name tables (which are used */
nuclear@0 6 /* to hold font names, copyright info, notices, etc.) (specification). */
nuclear@0 7 /* */
nuclear@0 8 /* This is _not_ used to retrieve glyph names! */
nuclear@0 9 /* */
nuclear@0 10 /* Copyright 1996-2001, 2002, 2003, 2006, 2009, 2010 by */
nuclear@0 11 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
nuclear@0 12 /* */
nuclear@0 13 /* This file is part of the FreeType project, and may only be used, */
nuclear@0 14 /* modified, and distributed under the terms of the FreeType project */
nuclear@0 15 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
nuclear@0 16 /* this file you indicate that you have read the license and */
nuclear@0 17 /* understand and accept it fully. */
nuclear@0 18 /* */
nuclear@0 19 /***************************************************************************/
nuclear@0 20
nuclear@0 21
nuclear@0 22 #ifndef __FT_SFNT_NAMES_H__
nuclear@0 23 #define __FT_SFNT_NAMES_H__
nuclear@0 24
nuclear@0 25
nuclear@0 26 #include <ft2build.h>
nuclear@0 27 #include FT_FREETYPE_H
nuclear@0 28
nuclear@0 29 #ifdef FREETYPE_H
nuclear@0 30 #error "freetype.h of FreeType 1 has been loaded!"
nuclear@0 31 #error "Please fix the directory search order for header files"
nuclear@0 32 #error "so that freetype.h of FreeType 2 is found first."
nuclear@0 33 #endif
nuclear@0 34
nuclear@0 35
nuclear@0 36 FT_BEGIN_HEADER
nuclear@0 37
nuclear@0 38
nuclear@0 39 /*************************************************************************/
nuclear@0 40 /* */
nuclear@0 41 /* <Section> */
nuclear@0 42 /* sfnt_names */
nuclear@0 43 /* */
nuclear@0 44 /* <Title> */
nuclear@0 45 /* SFNT Names */
nuclear@0 46 /* */
nuclear@0 47 /* <Abstract> */
nuclear@0 48 /* Access the names embedded in TrueType and OpenType files. */
nuclear@0 49 /* */
nuclear@0 50 /* <Description> */
nuclear@0 51 /* The TrueType and OpenType specifications allow the inclusion of */
nuclear@0 52 /* a special `names table' in font files. This table contains */
nuclear@0 53 /* textual (and internationalized) information regarding the font, */
nuclear@0 54 /* like family name, copyright, version, etc. */
nuclear@0 55 /* */
nuclear@0 56 /* The definitions below are used to access them if available. */
nuclear@0 57 /* */
nuclear@0 58 /* Note that this has nothing to do with glyph names! */
nuclear@0 59 /* */
nuclear@0 60 /*************************************************************************/
nuclear@0 61
nuclear@0 62
nuclear@0 63 /*************************************************************************/
nuclear@0 64 /* */
nuclear@0 65 /* <Struct> */
nuclear@0 66 /* FT_SfntName */
nuclear@0 67 /* */
nuclear@0 68 /* <Description> */
nuclear@0 69 /* A structure used to model an SFNT `name' table entry. */
nuclear@0 70 /* */
nuclear@0 71 /* <Fields> */
nuclear@0 72 /* platform_id :: The platform ID for `string'. */
nuclear@0 73 /* */
nuclear@0 74 /* encoding_id :: The encoding ID for `string'. */
nuclear@0 75 /* */
nuclear@0 76 /* language_id :: The language ID for `string'. */
nuclear@0 77 /* */
nuclear@0 78 /* name_id :: An identifier for `string'. */
nuclear@0 79 /* */
nuclear@0 80 /* string :: The `name' string. Note that its format differs */
nuclear@0 81 /* depending on the (platform,encoding) pair. It can */
nuclear@0 82 /* be a Pascal String, a UTF-16 one, etc. */
nuclear@0 83 /* */
nuclear@0 84 /* Generally speaking, the string is not */
nuclear@0 85 /* zero-terminated. Please refer to the TrueType */
nuclear@0 86 /* specification for details. */
nuclear@0 87 /* */
nuclear@0 88 /* string_len :: The length of `string' in bytes. */
nuclear@0 89 /* */
nuclear@0 90 /* <Note> */
nuclear@0 91 /* Possible values for `platform_id', `encoding_id', `language_id', */
nuclear@0 92 /* and `name_id' are given in the file `ttnameid.h'. For details */
nuclear@0 93 /* please refer to the TrueType or OpenType specification. */
nuclear@0 94 /* */
nuclear@0 95 /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */
nuclear@0 96 /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */
nuclear@0 97 /* */
nuclear@0 98 typedef struct FT_SfntName_
nuclear@0 99 {
nuclear@0 100 FT_UShort platform_id;
nuclear@0 101 FT_UShort encoding_id;
nuclear@0 102 FT_UShort language_id;
nuclear@0 103 FT_UShort name_id;
nuclear@0 104
nuclear@0 105 FT_Byte* string; /* this string is *not* null-terminated! */
nuclear@0 106 FT_UInt string_len; /* in bytes */
nuclear@0 107
nuclear@0 108 } FT_SfntName;
nuclear@0 109
nuclear@0 110
nuclear@0 111 /*************************************************************************/
nuclear@0 112 /* */
nuclear@0 113 /* <Function> */
nuclear@0 114 /* FT_Get_Sfnt_Name_Count */
nuclear@0 115 /* */
nuclear@0 116 /* <Description> */
nuclear@0 117 /* Retrieve the number of name strings in the SFNT `name' table. */
nuclear@0 118 /* */
nuclear@0 119 /* <Input> */
nuclear@0 120 /* face :: A handle to the source face. */
nuclear@0 121 /* */
nuclear@0 122 /* <Return> */
nuclear@0 123 /* The number of strings in the `name' table. */
nuclear@0 124 /* */
nuclear@0 125 FT_EXPORT( FT_UInt )
nuclear@0 126 FT_Get_Sfnt_Name_Count( FT_Face face );
nuclear@0 127
nuclear@0 128
nuclear@0 129 /*************************************************************************/
nuclear@0 130 /* */
nuclear@0 131 /* <Function> */
nuclear@0 132 /* FT_Get_Sfnt_Name */
nuclear@0 133 /* */
nuclear@0 134 /* <Description> */
nuclear@0 135 /* Retrieve a string of the SFNT `name' table for a given index. */
nuclear@0 136 /* */
nuclear@0 137 /* <Input> */
nuclear@0 138 /* face :: A handle to the source face. */
nuclear@0 139 /* */
nuclear@0 140 /* idx :: The index of the `name' string. */
nuclear@0 141 /* */
nuclear@0 142 /* <Output> */
nuclear@0 143 /* aname :: The indexed @FT_SfntName structure. */
nuclear@0 144 /* */
nuclear@0 145 /* <Return> */
nuclear@0 146 /* FreeType error code. 0~means success. */
nuclear@0 147 /* */
nuclear@0 148 /* <Note> */
nuclear@0 149 /* The `string' array returned in the `aname' structure is not */
nuclear@0 150 /* null-terminated. The application should deallocate it if it is no */
nuclear@0 151 /* longer in use. */
nuclear@0 152 /* */
nuclear@0 153 /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */
nuclear@0 154 /* `name' table entries, then do a loop until you get the right */
nuclear@0 155 /* platform, encoding, and name ID. */
nuclear@0 156 /* */
nuclear@0 157 FT_EXPORT( FT_Error )
nuclear@0 158 FT_Get_Sfnt_Name( FT_Face face,
nuclear@0 159 FT_UInt idx,
nuclear@0 160 FT_SfntName *aname );
nuclear@0 161
nuclear@0 162
nuclear@0 163 /***************************************************************************
nuclear@0 164 *
nuclear@0 165 * @constant:
nuclear@0 166 * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY
nuclear@0 167 *
nuclear@0 168 * @description:
nuclear@0 169 * A constant used as the tag of @FT_Parameter structures to make
nuclear@0 170 * FT_Open_Face() ignore preferred family subfamily names in `name'
nuclear@0 171 * table since OpenType version 1.4. For backwards compatibility with
nuclear@0 172 * legacy systems which has 4-face-per-family restriction.
nuclear@0 173 *
nuclear@0 174 */
nuclear@0 175 #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
nuclear@0 176
nuclear@0 177
nuclear@0 178 /***************************************************************************
nuclear@0 179 *
nuclear@0 180 * @constant:
nuclear@0 181 * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY
nuclear@0 182 *
nuclear@0 183 * @description:
nuclear@0 184 * A constant used as the tag of @FT_Parameter structures to make
nuclear@0 185 * FT_Open_Face() ignore preferred subfamily names in `name' table since
nuclear@0 186 * OpenType version 1.4. For backwards compatibility with legacy
nuclear@0 187 * systems which has 4-face-per-family restriction.
nuclear@0 188 *
nuclear@0 189 */
nuclear@0 190 #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' )
nuclear@0 191
nuclear@0 192 /* */
nuclear@0 193
nuclear@0 194
nuclear@0 195 FT_END_HEADER
nuclear@0 196
nuclear@0 197 #endif /* __FT_SFNT_NAMES_H__ */
nuclear@0 198
nuclear@0 199
nuclear@0 200 /* END */