2000-07-19 19:13:03 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftnames.h */
|
|
|
|
/* */
|
|
|
|
/* Simple interface to access SFNT name tables (which are used */
|
2000-10-17 05:38:43 +02:00
|
|
|
/* to hold font names, copyright info, notices, etc.) (specification). */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
/* This is _not_ used to retrieve glyph names! */
|
2000-07-19 19:13:03 +02:00
|
|
|
/* */
|
|
|
|
/* Copyright 1996-2000 by */
|
|
|
|
/* 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 08:57:41 +02:00
|
|
|
|
2000-07-19 19:13:03 +02:00
|
|
|
#ifndef FTNAMES_H
|
|
|
|
#define FTNAMES_H
|
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
|
2000-07-19 19:13:03 +02:00
|
|
|
#include <freetype/freetype.h>
|
|
|
|
|
2000-07-20 08:57:41 +02:00
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-10-17 05:38:43 +02: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'. */
|
|
|
|
/* */
|
|
|
|
/* string :: The `name' string. Note that this string is in */
|
|
|
|
/* Pascal convention, i.e., the string hasn't a final */
|
|
|
|
/* null byte. */
|
|
|
|
/* */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
2000-07-20 08:57:41 +02:00
|
|
|
typedef struct FT_SfntName_
|
2000-07-19 19:13:03 +02:00
|
|
|
{
|
|
|
|
FT_UShort platform_id;
|
|
|
|
FT_UShort encoding_id;
|
|
|
|
FT_UShort language_id;
|
|
|
|
FT_UShort name_id;
|
2000-10-24 07:44:59 +02:00
|
|
|
|
2000-10-17 05:38:43 +02:00
|
|
|
FT_Byte* string; /* this string is *not* null-terminated! */
|
2000-07-19 19:13:03 +02:00
|
|
|
FT_UInt string_len; /* in bytes */
|
2000-10-24 07:44:59 +02:00
|
|
|
|
2000-07-19 19:13:03 +02:00
|
|
|
} FT_SfntName;
|
|
|
|
|
|
|
|
|
2000-10-17 05:38:43 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Sfnt_Name_Count */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Retrieves the number of name strings in the SFNT `name' table. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-11-07 18:21:11 +01:00
|
|
|
/* face :: A handle to the source face. */
|
2000-10-17 05:38:43 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* The number of strings in the `name' table. */
|
|
|
|
/* */
|
2000-11-04 02:55:49 +01:00
|
|
|
FT_EXPORT( FT_UInt ) FT_Get_Sfnt_Name_Count( FT_Face face );
|
2000-10-17 05:38:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Function> */
|
|
|
|
/* FT_Get_Sfnt_Name */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Retrieves a string of the SFNT `name' table for a given index. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
|
|
|
/* face :: A handle to the source face. */
|
|
|
|
/* */
|
|
|
|
/* index :: The index of the `name' string. */
|
|
|
|
/* */
|
|
|
|
/* <Output> */
|
|
|
|
/* aname :: The indexed FT_SfntName structure. */
|
|
|
|
/* */
|
|
|
|
/* <Return> */
|
|
|
|
/* FreeType error code. 0 means success. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* The `string' array returned in the `aname' structure is not */
|
|
|
|
/* null-terminated. */
|
|
|
|
/* */
|
|
|
|
/* Use FT_Get_Sfnt_Name_Count() to get the total number of available */
|
|
|
|
/* `name' table entries, then do a loop until you get the right */
|
|
|
|
/* platform, encoding, and name ID. */
|
|
|
|
/* */
|
2000-11-04 02:55:49 +01:00
|
|
|
FT_EXPORT( FT_Error ) FT_Get_Sfnt_Name( FT_Face face,
|
|
|
|
FT_UInt index,
|
2000-11-06 05:33:56 +01:00
|
|
|
FT_SfntName *aname );
|
2000-10-24 07:44:59 +02:00
|
|
|
|
2000-07-19 19:13:03 +02:00
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-07-19 19:13:03 +02:00
|
|
|
#endif /* FTNAMES_H */
|
2000-07-20 08:57:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|