2002-05-22 07:41:06 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* ftbdf.h */
|
|
|
|
/* */
|
|
|
|
/* FreeType API for accessing BDF-specific strings (specification). */
|
|
|
|
/* */
|
2003-04-22 09:49:24 +02:00
|
|
|
/* Copyright 2002, 2003 by */
|
2002-05-22 07:41:06 +02: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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __FTBDF_H__
|
|
|
|
#define __FTBDF_H__
|
2002-05-21 22:50:53 +02:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
|
|
|
|
2002-05-22 07:41:06 +02:00
|
|
|
|
2002-05-21 22:50:53 +02:00
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2002-05-22 07:41:06 +02:00
|
|
|
|
2002-05-28 22:14:28 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Section> */
|
|
|
|
/* bdf_fonts */
|
|
|
|
/* */
|
|
|
|
/* <Title> */
|
|
|
|
/* BDF Fonts */
|
|
|
|
/* */
|
|
|
|
/* <Abstract> */
|
|
|
|
/* BDF-specific APIs */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This section contains the declaration of BDF-specific functions. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
2003-01-22 23:45:28 +01:00
|
|
|
/**********************************************************************
|
|
|
|
*
|
|
|
|
* @enum:
|
|
|
|
* FT_PropertyType
|
|
|
|
*
|
|
|
|
* @description:
|
2003-04-22 09:49:24 +02:00
|
|
|
* A list of BDF property types.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* @values:
|
|
|
|
* BDF_PROPERTY_TYPE_NONE ::
|
2003-04-22 09:49:24 +02:00
|
|
|
* Value 0 is used to indicate a missing property.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* BDF_PROPERTY_TYPE_ATOM ::
|
2003-04-22 09:49:24 +02:00
|
|
|
* Property is a string atom.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* BDF_PROPERTY_TYPE_INTEGER ::
|
2003-04-22 09:49:24 +02:00
|
|
|
* Property is a 32-bit signed integer.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* BDF_PROPERTY_TYPE_CARDINAL ::
|
2003-04-22 09:49:24 +02:00
|
|
|
* Property is a 32-bit unsigned integer.
|
2003-01-22 23:45:28 +01:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
BDF_PROPERTY_TYPE_NONE = 0,
|
|
|
|
BDF_PROPERTY_TYPE_ATOM = 1,
|
|
|
|
BDF_PROPERTY_TYPE_INTEGER = 2,
|
|
|
|
BDF_PROPERTY_TYPE_CARDINAL = 3
|
|
|
|
|
|
|
|
} BDF_PropertyType;
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
*
|
2003-04-22 09:49:24 +02:00
|
|
|
* @type:
|
|
|
|
* BDF_Property
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* @description:
|
2003-04-22 09:49:24 +02:00
|
|
|
* A handle to a @BDF_PropertyRec structure to model a given
|
|
|
|
* BDF/PCF property.
|
2003-01-22 23:45:28 +01:00
|
|
|
*/
|
2003-04-22 09:49:24 +02:00
|
|
|
typedef struct BDF_PropertyRec_* BDF_Property;
|
|
|
|
|
2003-01-22 23:45:28 +01:00
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
*
|
2003-04-22 09:49:24 +02:00
|
|
|
* @struct:
|
|
|
|
* BDF_PropertyRec
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* @description:
|
2003-04-22 09:49:24 +02:00
|
|
|
* This structure models a given BDF/PCF property.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
2003-04-22 09:49:24 +02:00
|
|
|
* @fields:
|
|
|
|
* type :: The property type.
|
|
|
|
*
|
|
|
|
* u.atom :: The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
|
|
|
|
* u.integer :: A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
|
|
|
|
* u.cardinal :: An unsigned integer, if type is
|
|
|
|
* @BDF_PROPERTY_TYPE_CARDINAL.
|
2003-01-22 23:45:28 +01:00
|
|
|
*/
|
2003-04-22 09:49:24 +02:00
|
|
|
typedef struct BDF_PropertyRec_
|
2003-01-22 23:45:28 +01:00
|
|
|
{
|
2003-04-22 09:49:24 +02:00
|
|
|
BDF_PropertyType type;
|
2003-01-22 23:45:28 +01:00
|
|
|
union {
|
2003-04-22 09:49:24 +02:00
|
|
|
const char* atom;
|
|
|
|
FT_Int32 integer;
|
|
|
|
FT_UInt32 cardinal;
|
2003-01-22 23:45:28 +01:00
|
|
|
|
|
|
|
} u;
|
|
|
|
|
|
|
|
} BDF_PropertyRec;
|
|
|
|
|
|
|
|
|
2002-05-28 22:14:28 +02:00
|
|
|
/**********************************************************************
|
|
|
|
*
|
2002-05-29 00:38:05 +02:00
|
|
|
* @function:
|
|
|
|
* FT_Get_BDF_Charset_ID
|
2002-05-28 22:14:28 +02:00
|
|
|
*
|
|
|
|
* @description:
|
2002-05-29 00:38:05 +02:00
|
|
|
* Retrieves a BDF font character set identity, according to
|
|
|
|
* the BDF specification.
|
2002-05-28 22:14:28 +02:00
|
|
|
*
|
|
|
|
* @input:
|
2002-05-29 00:38:05 +02:00
|
|
|
* face ::
|
2003-04-22 09:49:24 +02:00
|
|
|
* A handle to the input face.
|
2002-05-28 22:14:28 +02:00
|
|
|
*
|
|
|
|
* @output:
|
2002-05-29 00:38:05 +02:00
|
|
|
* acharset_encoding ::
|
|
|
|
* Charset encoding, as a C string, owned by the face.
|
|
|
|
*
|
|
|
|
* acharset_registry ::
|
|
|
|
* Charset registry, as a C string, owned by the face.
|
2002-05-28 22:14:28 +02:00
|
|
|
*
|
|
|
|
* @return:
|
2003-04-22 09:49:24 +02:00
|
|
|
* FreeType error code. 0 means success.
|
2002-05-28 22:14:28 +02:00
|
|
|
*
|
|
|
|
* @note:
|
2002-05-29 00:38:05 +02:00
|
|
|
* This function only works with BDF faces, returning an error otherwise.
|
2002-05-28 22:14:28 +02:00
|
|
|
*/
|
2002-05-21 22:50:53 +02:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_BDF_Charset_ID( FT_Face face,
|
|
|
|
const char* *acharset_encoding,
|
|
|
|
const char* *acharset_registry );
|
|
|
|
|
2003-04-22 09:49:24 +02:00
|
|
|
|
2003-01-22 23:45:28 +01:00
|
|
|
/**********************************************************************
|
|
|
|
*
|
|
|
|
* @function:
|
|
|
|
* FT_Get_BDF_Property
|
|
|
|
*
|
|
|
|
* @description:
|
2003-04-22 09:49:24 +02:00
|
|
|
* Retrieves a BDF property from a BDF or PCF font file.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* @input:
|
2003-04-22 09:49:24 +02:00
|
|
|
* face :: A handle to the input face.
|
|
|
|
*
|
|
|
|
* name :: The property name.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* @output:
|
2003-04-22 09:49:24 +02:00
|
|
|
* aproperty :: The property.
|
2003-01-22 23:45:28 +01:00
|
|
|
*
|
|
|
|
* @return:
|
|
|
|
* FreeType error code. 0 means success.
|
|
|
|
*
|
|
|
|
* @note:
|
2003-04-22 09:49:24 +02:00
|
|
|
* This function works with BDF _and_ PCF fonts. It returns an error
|
|
|
|
* otherwise. It also returns an error if the property is not in the
|
2003-01-22 23:45:28 +01:00
|
|
|
* font.
|
|
|
|
*
|
2003-04-22 09:49:24 +02:00
|
|
|
* In case of error, "aproperty->type" is always set to
|
|
|
|
* @BDF_PROPERTY_TYPE_NONE.
|
2003-01-22 23:45:28 +01:00
|
|
|
*/
|
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Get_BDF_Property( FT_Face face,
|
|
|
|
const char* prop_name,
|
|
|
|
BDF_PropertyRec *aproperty );
|
|
|
|
|
2002-05-28 22:14:28 +02:00
|
|
|
/* */
|
|
|
|
|
2002-05-21 22:50:53 +02:00
|
|
|
FT_END_HEADER
|
|
|
|
|
2002-05-22 07:41:06 +02:00
|
|
|
#endif /* __FTBDF_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|