2000-07-19 04:59:31 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* t1types.h */
|
|
|
|
/* */
|
|
|
|
/* Basic Type1/Type2 type definitions and interface (specification */
|
|
|
|
/* only). */
|
|
|
|
/* */
|
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
#ifndef T1TYPES_H
|
|
|
|
#define T1TYPES_H
|
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
|
2000-05-11 20:23:52 +02:00
|
|
|
#include <freetype/t1tables.h>
|
|
|
|
#include <freetype/internal/psnames.h>
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* T1_Encoding */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure modeling a custom encoding */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* num_chars :: The number of character codes in the encoding. */
|
|
|
|
/* Usually 256. */
|
|
|
|
/* */
|
|
|
|
/* code_first :: The lowest valid character code in the encoding. */
|
|
|
|
/* */
|
|
|
|
/* code_last :: The highest valid character code in the encoding. */
|
|
|
|
/* */
|
|
|
|
/* char_index :: An array of corresponding glyph indices. */
|
|
|
|
/* */
|
|
|
|
/* char_name :: An array of corresponding glyph names. */
|
|
|
|
/* */
|
|
|
|
typedef struct T1_Encoding_
|
2000-01-27 14:56:02 +01:00
|
|
|
{
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_Int num_chars;
|
|
|
|
FT_Int code_first;
|
|
|
|
FT_Int code_last;
|
2000-01-27 14:56:02 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_UShort* char_index;
|
|
|
|
FT_String** char_name;
|
2000-01-27 14:56:02 +01:00
|
|
|
|
|
|
|
} T1_Encoding;
|
|
|
|
|
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
typedef enum T1_EncodingType_
|
2000-01-27 14:56:02 +01:00
|
|
|
{
|
2000-08-29 18:50:01 +02:00
|
|
|
t1_encoding_none = 0,
|
|
|
|
t1_encoding_array,
|
|
|
|
t1_encoding_standard,
|
|
|
|
t1_encoding_expert
|
2000-01-27 14:56:02 +01:00
|
|
|
|
|
|
|
} T1_EncodingType;
|
|
|
|
|
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
typedef struct T1_Font_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-07-19 04:59:31 +02:00
|
|
|
/* font info dictionary */
|
|
|
|
T1_FontInfo font_info;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
/* private dictionary */
|
|
|
|
T1_Private private_dict;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
/* top-level dictionary */
|
|
|
|
FT_String* font_name;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-01-27 14:56:02 +01:00
|
|
|
T1_EncodingType encoding_type;
|
|
|
|
T1_Encoding encoding;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_Byte* subrs_block;
|
|
|
|
FT_Byte* charstrings_block;
|
|
|
|
FT_Byte* glyph_names_block;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_Int num_subrs;
|
|
|
|
FT_Byte** subrs;
|
|
|
|
FT_Int* subrs_len;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_Int num_glyphs;
|
|
|
|
FT_String** glyph_names; /* array of glyph names */
|
|
|
|
FT_Byte** charstrings; /* array of glyph charstrings */
|
|
|
|
FT_Int* charstrings_len;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_Byte paint_type;
|
|
|
|
FT_Byte font_type;
|
|
|
|
FT_Matrix font_matrix;
|
2000-08-17 03:09:06 +02:00
|
|
|
FT_Vector font_offset;
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_BBox font_bbox;
|
|
|
|
FT_Long font_id;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_Int stroke_width;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2000-01-27 14:56:02 +01:00
|
|
|
} T1_Font;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
typedef struct CID_Subrs_
|
2000-06-01 05:27:48 +02:00
|
|
|
{
|
|
|
|
FT_UInt num_subrs;
|
|
|
|
FT_Byte** code;
|
|
|
|
|
|
|
|
} CID_Subrs;
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ORIGINAL T1_FACE CLASS DEFINITION ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* This structure/class is defined here because it is common to the */
|
|
|
|
/* following formats: TTF, OpenType-TT, and OpenType-CFF. */
|
|
|
|
/* */
|
|
|
|
/* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
|
|
|
|
/* are not shared between font drivers, and are thus defined normally in */
|
|
|
|
/* `ttobjs.h'. */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
typedef struct T1_FaceRec_* T1_Face;
|
2000-06-01 05:27:48 +02:00
|
|
|
typedef struct CID_FaceRec_* CID_Face;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
typedef struct T1_FaceRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_FaceRec root;
|
|
|
|
T1_Font type1;
|
|
|
|
void* psnames;
|
2000-08-23 00:36:33 +02:00
|
|
|
void* psaux;
|
2000-07-19 04:59:31 +02:00
|
|
|
void* afm_data;
|
|
|
|
FT_CharMapRec charmaprecs[2];
|
|
|
|
FT_CharMap charmaps[2];
|
|
|
|
PS_Unicodes unicode_map;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
/* support for Multiple Masters fonts */
|
|
|
|
T1_Blend* blend;
|
2000-05-24 23:12:02 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} T1_FaceRec;
|
|
|
|
|
|
|
|
|
2000-07-19 04:59:31 +02:00
|
|
|
typedef struct CID_FaceRec_
|
2000-06-01 05:27:48 +02:00
|
|
|
{
|
2000-07-19 04:59:31 +02:00
|
|
|
FT_FaceRec root;
|
|
|
|
void* psnames;
|
2000-08-24 00:47:44 +02:00
|
|
|
void* psaux;
|
2000-07-19 04:59:31 +02:00
|
|
|
CID_Info cid;
|
|
|
|
void* afm_data;
|
|
|
|
CID_Subrs* subrs;
|
2000-06-01 05:27:48 +02:00
|
|
|
|
|
|
|
} CID_FaceRec;
|
|
|
|
|
2000-06-27 07:58:22 +02:00
|
|
|
|
2000-08-01 15:17:04 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
#endif /* T1TYPES_H */
|
2000-06-27 07:58:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|