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