Al-Qurtas-Islamic-bank-The-.../include/freetype/ftbdf.h

190 lines
5.9 KiB
C
Raw Normal View History

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