1999-12-17 00:11:37 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* tttypes.h */
|
|
|
|
/* */
|
|
|
|
/* Basic SFNT/TrueType type definitions and interface (specification */
|
|
|
|
/* only). */
|
|
|
|
/* */
|
2013-01-28 13:56:23 +01:00
|
|
|
/* Copyright 1996-2002, 2004-2008, 2012-2013 by */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* 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-12-01 00:12:33 +01:00
|
|
|
#ifndef __TTTYPES_H__
|
|
|
|
#define __TTTYPES_H__
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-12-09 01:45:38 +01:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_TRUETYPE_TABLES_H
|
|
|
|
#include FT_INTERNAL_OBJECTS_H
|
|
|
|
|
* src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.
2004-04-24 George Williams <gww@silcom.com>
Add support for Apple's distortable font technology (in GX fonts).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.
* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.
* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.
* include/freetype/internal/fttrace.h: Add `ttgxvar'.
* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.
* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.
* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.
* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.
* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.
* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.
* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 22:15:11 +02:00
|
|
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
|
|
|
#include FT_MULTIPLE_MASTERS_H
|
|
|
|
#endif
|
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TTC_HeaderRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* TrueType collection header. This table contains the offsets of */
|
|
|
|
/* the font headers of each distinct TrueType face in the file. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* tag :: Must be `ttc ' to indicate a TrueType collection. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* version :: The version number. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* count :: The number of faces in the collection. The */
|
|
|
|
/* specification says this should be an unsigned long, but */
|
|
|
|
/* we use a signed long since we need the value -1 for */
|
|
|
|
/* specific purposes. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* offsets :: The offsets of the font headers, one per face. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TTC_HeaderRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_ULong tag;
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Fixed version;
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_Long count;
|
|
|
|
FT_ULong* offsets;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TTC_HeaderRec;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2000-05-29 22:37:41 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* SFNT_HeaderRec */
|
2000-05-29 22:37:41 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* SFNT file format header. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* format_tag :: The font format tag. */
|
|
|
|
/* */
|
|
|
|
/* num_tables :: The number of tables in file. */
|
|
|
|
/* */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* search_range :: Must be `16 * (max power of 2 <= num_tables)'. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* entry_selector :: Must be log2 of `search_range / 16'. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* range_shift :: Must be `num_tables * 16 - search_range'. */
|
2000-05-29 22:37:41 +02:00
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct SFNT_HeaderRec_
|
2000-05-29 22:37:41 +02:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_ULong format_tag;
|
|
|
|
FT_UShort num_tables;
|
|
|
|
FT_UShort search_range;
|
|
|
|
FT_UShort entry_selector;
|
|
|
|
FT_UShort range_shift;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2002-07-12 01:41:14 +02:00
|
|
|
FT_ULong offset; /* not in file */
|
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} SFNT_HeaderRec, *SFNT_Header;
|
2000-05-29 22:37:41 +02:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_TableRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This structure describes a given table of a TrueType font. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* Tag :: A four-bytes tag describing the table. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* CheckSum :: The table checksum. This value can be ignored. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* Offset :: The offset of the table from the start of the TrueType */
|
|
|
|
/* font in its resource. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* Length :: The table length (in bytes). */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_TableRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_ULong Tag; /* table type */
|
|
|
|
FT_ULong CheckSum; /* table checksum */
|
|
|
|
FT_ULong Offset; /* table file offset */
|
|
|
|
FT_ULong Length; /* table length */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_TableRec, *TT_Table;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
2013-08-29 17:53:40 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* WOFF_HeaderRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* WOFF file format header. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* See */
|
|
|
|
/* */
|
|
|
|
/* http://www.w3.org/TR/WOFF/#WOFFHeader */
|
|
|
|
/* */
|
|
|
|
typedef struct WOFF_HeaderRec_
|
|
|
|
{
|
|
|
|
FT_ULong signature;
|
|
|
|
FT_ULong flavor;
|
|
|
|
FT_ULong length;
|
|
|
|
FT_UShort num_tables;
|
|
|
|
FT_UShort reserved;
|
|
|
|
FT_ULong totalSfntSize;
|
|
|
|
FT_UShort majorVersion;
|
|
|
|
FT_UShort minorVersion;
|
|
|
|
FT_ULong metaOffset;
|
|
|
|
FT_ULong metaLength;
|
|
|
|
FT_ULong metaOrigLength;
|
|
|
|
FT_ULong privOffset;
|
|
|
|
FT_ULong privLength;
|
|
|
|
|
|
|
|
} WOFF_HeaderRec, *WOFF_Header;
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* WOFF_TableRec */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* This structure describes a given table of a WOFF font. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* Tag :: A four-bytes tag describing the table. */
|
|
|
|
/* */
|
|
|
|
/* Offset :: The offset of the table from the start of the WOFF */
|
|
|
|
/* font in its resource. */
|
|
|
|
/* */
|
|
|
|
/* CompLength :: Compressed table length (in bytes). */
|
|
|
|
/* */
|
|
|
|
/* OrigLength :: Unompressed table length (in bytes). */
|
|
|
|
/* */
|
|
|
|
/* CheckSum :: The table checksum. This value can be ignored. */
|
|
|
|
/* */
|
2013-08-29 21:03:05 +02:00
|
|
|
/* OrigOffset :: The uncompressed table file offset. This value gets */
|
|
|
|
/* computed while constructing the (uncompressed) SFNT */
|
|
|
|
/* header. It is not contained in the WOFF file. */
|
|
|
|
/* */
|
2013-08-29 17:53:40 +02:00
|
|
|
typedef struct WOFF_TableRec_
|
|
|
|
{
|
|
|
|
FT_ULong Tag; /* table ID */
|
|
|
|
FT_ULong Offset; /* table file offset */
|
|
|
|
FT_ULong CompLength; /* compressed table length */
|
|
|
|
FT_ULong OrigLength; /* uncompressed table length */
|
|
|
|
FT_ULong CheckSum; /* uncompressed checksum */
|
|
|
|
|
|
|
|
FT_ULong OrigOffset; /* uncompressed table file offset */
|
|
|
|
/* (not in the WOFF file) */
|
|
|
|
} WOFF_TableRec, *WOFF_Table;
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_LongMetricsRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure modeling the long metrics of the `hmtx' and `vmtx' */
|
|
|
|
/* TrueType tables. The values are expressed in font units. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* advance :: The advance width or height for the glyph. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* bearing :: The left-side or top-side bearing for the glyph. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_LongMetricsRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_UShort advance;
|
|
|
|
FT_Short bearing;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_LongMetricsRec, *TT_LongMetrics;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* <Type> */
|
|
|
|
/* TT_ShortMetrics */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple type to model the short metrics of the `hmtx' and `vmtx' */
|
|
|
|
/* tables. */
|
|
|
|
/* */
|
2000-06-16 21:34:52 +02:00
|
|
|
typedef FT_Short TT_ShortMetrics;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_NameEntryRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure modeling TrueType name records. Name records are used */
|
|
|
|
/* to store important strings like family name, style name, */
|
|
|
|
/* copyright, etc. in _localized_ versions (i.e., language, encoding, */
|
|
|
|
/* etc). */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* platformID :: The ID of the name's encoding platform. */
|
|
|
|
/* */
|
|
|
|
/* encodingID :: The platform-specific ID for the name's encoding. */
|
|
|
|
/* */
|
|
|
|
/* languageID :: The platform-specific ID for the name's language. */
|
|
|
|
/* */
|
|
|
|
/* nameID :: The ID specifying what kind of name this is. */
|
|
|
|
/* */
|
|
|
|
/* stringLength :: The length of the string in bytes. */
|
|
|
|
/* */
|
|
|
|
/* stringOffset :: The offset to the string in the `name' table. */
|
|
|
|
/* */
|
|
|
|
/* string :: A pointer to the string's bytes. Note that these */
|
|
|
|
/* are usually UTF-16 encoded characters. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_NameEntryRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_UShort platformID;
|
|
|
|
FT_UShort encodingID;
|
|
|
|
FT_UShort languageID;
|
|
|
|
FT_UShort nameID;
|
|
|
|
FT_UShort stringLength;
|
2002-05-28 01:52:01 +02:00
|
|
|
FT_ULong stringOffset;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
/* this last field is not defined in the spec */
|
|
|
|
/* but used by the FreeType engine */
|
|
|
|
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Byte* string;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_NameEntryRec, *TT_NameEntry;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_NameTableRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure modeling the TrueType name table. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* format :: The format of the name table. */
|
|
|
|
/* */
|
|
|
|
/* numNameRecords :: The number of names in table. */
|
|
|
|
/* */
|
|
|
|
/* storageOffset :: The offset of the name table in the `name' */
|
|
|
|
/* TrueType table. */
|
|
|
|
/* */
|
|
|
|
/* names :: An array of name records. */
|
|
|
|
/* */
|
2002-05-28 01:52:01 +02:00
|
|
|
/* stream :: the file's input stream. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_NameTableRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2002-03-14 12:26:29 +01:00
|
|
|
FT_UShort format;
|
2002-05-28 01:52:01 +02:00
|
|
|
FT_UInt numNameRecords;
|
|
|
|
FT_UInt storageOffset;
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_NameEntryRec* names;
|
2002-05-28 01:52:01 +02:00
|
|
|
FT_Stream stream;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_NameTableRec, *TT_NameTable;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_GaspRangeRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A tiny structure used to model a gasp range according to the */
|
|
|
|
/* TrueType specification. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* maxPPEM :: The maximum ppem value to which `gaspFlag' applies. */
|
|
|
|
/* */
|
|
|
|
/* gaspFlag :: A flag describing the grid-fitting and anti-aliasing */
|
|
|
|
/* modes to be used. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_GaspRangeRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_UShort maxPPEM;
|
|
|
|
FT_UShort gaspFlag;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_GaspRangeRec, *TT_GaspRange;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
#define TT_GASP_GRIDFIT 0x01
|
|
|
|
#define TT_GASP_DOGRAY 0x02
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_GaspRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure modeling the TrueType `gasp' table used to specify */
|
|
|
|
/* grid-fitting and anti-aliasing behaviour. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* version :: The version number. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* numRanges :: The number of gasp ranges in table. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* gaspRanges :: An array of gasp ranges. */
|
|
|
|
/* */
|
|
|
|
typedef struct TT_Gasp_
|
|
|
|
{
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_UShort version;
|
|
|
|
FT_UShort numRanges;
|
|
|
|
TT_GaspRange gaspRanges;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_GaspRec;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2005-03-01 03:13:50 +01:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
2000-07-19 08:25:56 +02:00
|
|
|
/*** EMBEDDED BITMAPS SUPPORT ***/
|
1999-12-17 00:11:37 +01:00
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_SBit_MetricsRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to hold the big metrics of a given glyph bitmap */
|
|
|
|
/* in a TrueType or OpenType font. These are usually found in the */
|
2000-11-07 00:07:51 +01:00
|
|
|
/* `EBDT' (Microsoft) or `bloc' (Apple) table. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* height :: The glyph height in pixels. */
|
|
|
|
/* */
|
|
|
|
/* width :: The glyph width in pixels. */
|
|
|
|
/* */
|
|
|
|
/* horiBearingX :: The horizontal left bearing. */
|
|
|
|
/* */
|
|
|
|
/* horiBearingY :: The horizontal top bearing. */
|
|
|
|
/* */
|
|
|
|
/* horiAdvance :: The horizontal advance. */
|
|
|
|
/* */
|
|
|
|
/* vertBearingX :: The vertical left bearing. */
|
|
|
|
/* */
|
|
|
|
/* vertBearingY :: The vertical top bearing. */
|
|
|
|
/* */
|
|
|
|
/* vertAdvance :: The vertical advance. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_SBit_MetricsRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2013-07-18 13:13:12 +02:00
|
|
|
FT_UShort height;
|
|
|
|
FT_UShort width;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2013-07-18 13:13:12 +02:00
|
|
|
FT_Short horiBearingX;
|
|
|
|
FT_Short horiBearingY;
|
|
|
|
FT_UShort horiAdvance;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2013-07-18 13:13:12 +02:00
|
|
|
FT_Short vertBearingX;
|
|
|
|
FT_Short vertBearingY;
|
|
|
|
FT_UShort vertAdvance;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_MetricsRec, *TT_SBit_Metrics;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_SBit_SmallMetricsRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to hold the small metrics of a given glyph bitmap */
|
|
|
|
/* in a TrueType or OpenType font. These are usually found in the */
|
|
|
|
/* `EBDT' (Microsoft) or the `bdat' (Apple) table. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* height :: The glyph height in pixels. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* width :: The glyph width in pixels. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* bearingX :: The left-side bearing. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* bearingY :: The top-side bearing. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* advance :: The advance width or height. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
typedef struct TT_SBit_Small_Metrics_
|
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Byte height;
|
|
|
|
FT_Byte width;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Char bearingX;
|
|
|
|
FT_Char bearingY;
|
|
|
|
FT_Byte advance;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_SBit_LineMetricsRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used to describe the text line metrics of a given */
|
|
|
|
/* bitmap strike, for either a horizontal or vertical layout. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* ascender :: The ascender in pixels. */
|
|
|
|
/* */
|
|
|
|
/* descender :: The descender in pixels. */
|
|
|
|
/* */
|
|
|
|
/* max_width :: The maximum glyph width in pixels. */
|
|
|
|
/* */
|
|
|
|
/* caret_slope_enumerator :: Rise of the caret slope, typically set */
|
|
|
|
/* to 1 for non-italic fonts. */
|
|
|
|
/* */
|
|
|
|
/* caret_slope_denominator :: Rise of the caret slope, typically set */
|
|
|
|
/* to 0 for non-italic fonts. */
|
|
|
|
/* */
|
|
|
|
/* caret_offset :: Offset in pixels to move the caret for */
|
|
|
|
/* proper positioning. */
|
|
|
|
/* */
|
|
|
|
/* min_origin_SB :: Minimum of horiBearingX (resp. */
|
|
|
|
/* vertBearingY). */
|
|
|
|
/* min_advance_SB :: Minimum of */
|
|
|
|
/* */
|
|
|
|
/* horizontal advance - */
|
|
|
|
/* ( horiBearingX + width ) */
|
|
|
|
/* */
|
|
|
|
/* resp. */
|
|
|
|
/* */
|
|
|
|
/* vertical advance - */
|
|
|
|
/* ( vertBearingY + height ) */
|
|
|
|
/* */
|
|
|
|
/* max_before_BL :: Maximum of horiBearingY (resp. */
|
|
|
|
/* vertBearingY). */
|
|
|
|
/* */
|
|
|
|
/* min_after_BL :: Minimum of */
|
|
|
|
/* */
|
|
|
|
/* horiBearingY - height */
|
|
|
|
/* */
|
|
|
|
/* resp. */
|
|
|
|
/* */
|
|
|
|
/* vertBearingX - width */
|
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* pads :: Unused (to make the size of the record */
|
|
|
|
/* a multiple of 32 bits. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_SBit_LineMetricsRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Char ascender;
|
|
|
|
FT_Char descender;
|
|
|
|
FT_Byte max_width;
|
|
|
|
FT_Char caret_slope_numerator;
|
|
|
|
FT_Char caret_slope_denominator;
|
|
|
|
FT_Char caret_offset;
|
|
|
|
FT_Char min_origin_SB;
|
|
|
|
FT_Char min_advance_SB;
|
|
|
|
FT_Char max_before_BL;
|
|
|
|
FT_Char min_after_BL;
|
|
|
|
FT_Char pads[2];
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_SBit_RangeRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A TrueType/OpenType subIndexTable as defined in the `EBLC' */
|
|
|
|
/* (Microsoft) or `bloc' (Apple) tables. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* first_glyph :: The first glyph index in the range. */
|
|
|
|
/* */
|
|
|
|
/* last_glyph :: The last glyph index in the range. */
|
|
|
|
/* */
|
|
|
|
/* index_format :: The format of index table. Valid values are 1 */
|
|
|
|
/* to 5. */
|
|
|
|
/* */
|
|
|
|
/* image_format :: The format of `EBDT' image data. */
|
|
|
|
/* */
|
|
|
|
/* image_offset :: The offset to image data in `EBDT'. */
|
|
|
|
/* */
|
|
|
|
/* image_size :: For index formats 2 and 5. This is the size in */
|
|
|
|
/* bytes of each glyph bitmap. */
|
|
|
|
/* */
|
|
|
|
/* big_metrics :: For index formats 2 and 5. This is the big */
|
|
|
|
/* metrics for each glyph bitmap. */
|
|
|
|
/* */
|
|
|
|
/* num_glyphs :: For index formats 4 and 5. This is the number of */
|
|
|
|
/* glyphs in the code array. */
|
|
|
|
/* */
|
|
|
|
/* glyph_offsets :: For index formats 1 and 3. */
|
|
|
|
/* */
|
|
|
|
/* glyph_codes :: For index formats 4 and 5. */
|
|
|
|
/* */
|
|
|
|
/* table_offset :: The offset of the index table in the `EBLC' */
|
|
|
|
/* table. Only used during strike loading. */
|
|
|
|
/* */
|
2008-05-29 00:17:28 +02:00
|
|
|
typedef struct TT_SBit_RangeRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_UShort first_glyph;
|
|
|
|
FT_UShort last_glyph;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_UShort index_format;
|
|
|
|
FT_UShort image_format;
|
|
|
|
FT_ULong image_offset;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong image_size;
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_SBit_MetricsRec metrics;
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong num_glyphs;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong* glyph_offsets;
|
|
|
|
FT_UShort* glyph_codes;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong table_offset;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_RangeRec, *TT_SBit_Range;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* TT_SBit_StrikeRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used describe a given bitmap strike in the `EBLC' */
|
|
|
|
/* (Microsoft) or `bloc' (Apple) tables. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* num_index_ranges :: The number of index ranges. */
|
|
|
|
/* */
|
|
|
|
/* index_ranges :: An array of glyph index ranges. */
|
|
|
|
/* */
|
2000-11-07 07:30:29 +01:00
|
|
|
/* color_ref :: Unused. `color_ref' is put in for future */
|
2000-11-07 00:07:51 +01:00
|
|
|
/* enhancements, but these fields are already */
|
2000-11-07 07:30:29 +01:00
|
|
|
/* in use by other platforms (e.g. Newton). */
|
2000-11-07 00:07:51 +01:00
|
|
|
/* For details, please see */
|
2000-11-07 07:30:29 +01:00
|
|
|
/* */
|
|
|
|
/* http://fonts.apple.com/ */
|
|
|
|
/* TTRefMan/RM06/Chap6bloc.html */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* hori :: The line metrics for horizontal layouts. */
|
|
|
|
/* */
|
|
|
|
/* vert :: The line metrics for vertical layouts. */
|
|
|
|
/* */
|
|
|
|
/* start_glyph :: The lowest glyph index for this strike. */
|
|
|
|
/* */
|
|
|
|
/* end_glyph :: The highest glyph index for this strike. */
|
|
|
|
/* */
|
|
|
|
/* x_ppem :: The number of horizontal pixels per EM. */
|
|
|
|
/* */
|
|
|
|
/* y_ppem :: The number of vertical pixels per EM. */
|
|
|
|
/* */
|
|
|
|
/* bit_depth :: The bit depth. Valid values are 1, 2, 4, */
|
|
|
|
/* and 8. */
|
|
|
|
/* */
|
2000-11-07 07:30:29 +01:00
|
|
|
/* flags :: Is this a vertical or horizontal strike? For */
|
|
|
|
/* details, please see */
|
|
|
|
/* */
|
|
|
|
/* http://fonts.apple.com/ */
|
|
|
|
/* TTRefMan/RM06/Chap6bloc.html */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_SBit_StrikeRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2002-03-14 12:26:29 +01:00
|
|
|
FT_Int num_ranges;
|
|
|
|
TT_SBit_Range sbit_ranges;
|
|
|
|
FT_ULong ranges_offset;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
FT_ULong color_ref;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_SBit_LineMetricsRec hori;
|
|
|
|
TT_SBit_LineMetricsRec vert;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
FT_UShort start_glyph;
|
|
|
|
FT_UShort end_glyph;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
FT_Byte x_ppem;
|
|
|
|
FT_Byte y_ppem;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
FT_Byte bit_depth;
|
|
|
|
FT_Char flags;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_StrikeRec, *TT_SBit_Strike;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_SBit_ComponentRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A simple structure to describe a compound sbit element. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* glyph_code :: The element's glyph index. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* x_offset :: The element's left bearing. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* y_offset :: The element's top bearing. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_SBit_ComponentRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_UShort glyph_code;
|
|
|
|
FT_Char x_offset;
|
|
|
|
FT_Char y_offset;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_ComponentRec, *TT_SBit_Component;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_SBit_ScaleRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A structure used describe a given bitmap scaling table, as defined */
|
|
|
|
/* in the `EBSC' table. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* hori :: The horizontal line metrics. */
|
|
|
|
/* */
|
|
|
|
/* vert :: The vertical line metrics. */
|
|
|
|
/* */
|
|
|
|
/* x_ppem :: The number of horizontal pixels per EM. */
|
|
|
|
/* */
|
|
|
|
/* y_ppem :: The number of vertical pixels per EM. */
|
|
|
|
/* */
|
|
|
|
/* x_ppem_substitute :: Substitution x_ppem value. */
|
|
|
|
/* */
|
|
|
|
/* y_ppem_substitute :: Substitution y_ppem value. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_SBit_ScaleRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_SBit_LineMetricsRec hori;
|
|
|
|
TT_SBit_LineMetricsRec vert;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_Byte x_ppem;
|
|
|
|
FT_Byte y_ppem;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_Byte x_ppem_substitute;
|
|
|
|
FT_Byte y_ppem_substitute;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_SBit_ScaleRec, *TT_SBit_Scale;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** POSTSCRIPT GLYPH NAMES SUPPORT ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_Post_20Rec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Postscript names sub-table, format 2.0. Stores the PS name of */
|
|
|
|
/* each glyph in the font face. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* num_glyphs :: The number of named glyphs in the table. */
|
|
|
|
/* */
|
|
|
|
/* num_names :: The number of PS names stored in the table. */
|
|
|
|
/* */
|
|
|
|
/* glyph_indices :: The indices of the glyphs in the names arrays. */
|
|
|
|
/* */
|
|
|
|
/* glyph_names :: The PS names not in Mac Encoding. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_Post_20Rec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_UShort num_glyphs;
|
|
|
|
FT_UShort num_names;
|
|
|
|
FT_UShort* glyph_indices;
|
|
|
|
FT_Char** glyph_names;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_Post_20Rec, *TT_Post_20;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_Post_25Rec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Postscript names sub-table, format 2.5. Stores the PS name of */
|
|
|
|
/* each glyph in the font face. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* num_glyphs :: The number of glyphs in the table. */
|
|
|
|
/* */
|
|
|
|
/* offsets :: An array of signed offsets in a normal Mac */
|
|
|
|
/* Postscript name encoding. */
|
|
|
|
/* */
|
|
|
|
typedef struct TT_Post_25_
|
|
|
|
{
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_UShort num_glyphs;
|
|
|
|
FT_Char* offsets;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_Post_25Rec, *TT_Post_25;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_Post_NamesRec */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Postscript names table, either format 2.0 or 2.5. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* loaded :: A flag to indicate whether the PS names are loaded. */
|
2000-05-17 01:44:38 +02:00
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* format_20 :: The sub-table used for format 2.0. */
|
|
|
|
/* */
|
|
|
|
/* format_25 :: The sub-table used for format 2.5. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_Post_NamesRec_
|
1999-12-17 00:11:37 +01:00
|
|
|
{
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_Bool loaded;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
union
|
|
|
|
{
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_Post_20Rec format_20;
|
|
|
|
TT_Post_25Rec format_25;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
} names;
|
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_Post_NamesRec, *TT_Post_Names;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
* src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.
2004-04-24 George Williams <gww@silcom.com>
Add support for Apple's distortable font technology (in GX fonts).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.
* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.
* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.
* include/freetype/internal/fttrace.h: Add `ttgxvar'.
* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.
* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.
* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.
* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.
* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.
* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.
* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 22:15:11 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** GX VARIATION TABLE SUPPORT ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
2004-04-27 22:25:33 +02:00
|
|
|
typedef struct GX_BlendRec_ *GX_Blend;
|
* src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.
2004-04-24 George Williams <gww@silcom.com>
Add support for Apple's distortable font technology (in GX fonts).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.
* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.
* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.
* include/freetype/internal/fttrace.h: Add `ttgxvar'.
* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.
* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.
* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.
* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.
* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.
* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.
* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 22:15:11 +02:00
|
|
|
#endif
|
|
|
|
|
* include/freetype/config/ftoption.h,
include/freetype/config/ftstdlib.h,
include/freetype/internal/tttypes.h,
src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
src/sfnt/ttbdf.h, src/sfnt/ttbdf.c, src/sfnt/sfobjs.c:
Added support for an embedded 'BDF ' table within SFNT-based
bitmap font files. This is used to store atoms & properties from
the original BDF fonts that were used to generate the font file.
the feature is controled by TT_CONFIG_OPTION_BDF within 'ftoption.h'
and is used to implement FT_Get_BDF_Property for these font files.
At the moment, this is still experimental, the BDF table format isn't
cast into stone yet.
2005-12-14 21:38:15 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
2005-12-20 13:01:58 +01:00
|
|
|
/*** EMBEDDED BDF PROPERTIES TABLE SUPPORT ***/
|
* include/freetype/config/ftoption.h,
include/freetype/config/ftstdlib.h,
include/freetype/internal/tttypes.h,
src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
src/sfnt/ttbdf.h, src/sfnt/ttbdf.c, src/sfnt/sfobjs.c:
Added support for an embedded 'BDF ' table within SFNT-based
bitmap font files. This is used to store atoms & properties from
the original BDF fonts that were used to generate the font file.
the feature is controled by TT_CONFIG_OPTION_BDF within 'ftoption.h'
and is used to implement FT_Get_BDF_Property for these font files.
At the moment, this is still experimental, the BDF table format isn't
cast into stone yet.
2005-12-14 21:38:15 +01:00
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2005-12-20 13:01:58 +01:00
|
|
|
/*
|
|
|
|
* These types are used to support a `BDF ' table that isn't part of the
|
|
|
|
* official TrueType specification. It is mainly used in SFNT-based
|
|
|
|
* bitmap fonts that were generated from a set of BDF fonts.
|
|
|
|
*
|
|
|
|
* The format of the table is as follows.
|
|
|
|
*
|
|
|
|
* USHORT version `BDF ' table version number, should be 0x0001.
|
|
|
|
* USHORT strikeCount Number of strikes (bitmap sizes) in this table.
|
2007-01-31 00:08:50 +01:00
|
|
|
* ULONG stringTable Offset (from start of BDF table) to string
|
2005-12-20 13:01:58 +01:00
|
|
|
* table.
|
|
|
|
*
|
|
|
|
* This is followed by an array of `strikeCount' descriptors, having the
|
|
|
|
* following format.
|
|
|
|
*
|
|
|
|
* USHORT ppem Vertical pixels per EM for this strike.
|
|
|
|
* USHORT numItems Number of items for this strike (properties and
|
|
|
|
* atoms). Maximum is 255.
|
|
|
|
*
|
|
|
|
* This array in turn is followed by `strikeCount' value sets. Each
|
|
|
|
* `value set' is an array of `numItems' items with the following format.
|
|
|
|
*
|
|
|
|
* ULONG item_name Offset in string table to item name.
|
|
|
|
* USHORT item_type The item type. Possible values are
|
|
|
|
* 0 => string (e.g., COMMENT)
|
|
|
|
* 1 => atom (e.g., FONT or even SIZE)
|
|
|
|
* 2 => int32
|
|
|
|
* 3 => uint32
|
|
|
|
* 0x10 => A flag to indicate a properties. This
|
|
|
|
* is ORed with the above values.
|
|
|
|
* ULONG item_value For strings => Offset into string table without
|
|
|
|
* the corresponding double quotes.
|
|
|
|
* For atoms => Offset into string table.
|
|
|
|
* For integers => Direct value.
|
|
|
|
*
|
|
|
|
* All strings in the string table consist of bytes and are
|
|
|
|
* zero-terminated.
|
|
|
|
*
|
|
|
|
*/
|
* include/freetype/config/ftoption.h,
include/freetype/config/ftstdlib.h,
include/freetype/internal/tttypes.h,
src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
src/sfnt/ttbdf.h, src/sfnt/ttbdf.c, src/sfnt/sfobjs.c:
Added support for an embedded 'BDF ' table within SFNT-based
bitmap font files. This is used to store atoms & properties from
the original BDF fonts that were used to generate the font file.
the feature is controled by TT_CONFIG_OPTION_BDF within 'ftoption.h'
and is used to implement FT_Get_BDF_Property for these font files.
At the moment, this is still experimental, the BDF table format isn't
cast into stone yet.
2005-12-14 21:38:15 +01:00
|
|
|
|
|
|
|
#ifdef TT_CONFIG_OPTION_BDF
|
|
|
|
|
2005-12-20 13:01:58 +01:00
|
|
|
typedef struct TT_BDFRec_
|
* include/freetype/config/ftoption.h,
include/freetype/config/ftstdlib.h,
include/freetype/internal/tttypes.h,
src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
src/sfnt/ttbdf.h, src/sfnt/ttbdf.c, src/sfnt/sfobjs.c:
Added support for an embedded 'BDF ' table within SFNT-based
bitmap font files. This is used to store atoms & properties from
the original BDF fonts that were used to generate the font file.
the feature is controled by TT_CONFIG_OPTION_BDF within 'ftoption.h'
and is used to implement FT_Get_BDF_Property for these font files.
At the moment, this is still experimental, the BDF table format isn't
cast into stone yet.
2005-12-14 21:38:15 +01:00
|
|
|
{
|
2005-12-20 13:01:58 +01:00
|
|
|
FT_Byte* table;
|
|
|
|
FT_Byte* table_end;
|
|
|
|
FT_Byte* strings;
|
2009-07-31 17:32:13 +02:00
|
|
|
FT_ULong strings_size;
|
2005-12-20 13:01:58 +01:00
|
|
|
FT_UInt num_strikes;
|
|
|
|
FT_Bool loaded;
|
* include/freetype/config/ftoption.h,
include/freetype/config/ftstdlib.h,
include/freetype/internal/tttypes.h,
src/sfnt/Jamfile, src/sfnt/rules.mk, src/sfnt/sfdriver.c,
src/sfnt/ttbdf.h, src/sfnt/ttbdf.c, src/sfnt/sfobjs.c:
Added support for an embedded 'BDF ' table within SFNT-based
bitmap font files. This is used to store atoms & properties from
the original BDF fonts that were used to generate the font file.
the feature is controled by TT_CONFIG_OPTION_BDF within 'ftoption.h'
and is used to implement FT_Get_BDF_Property for these font files.
At the moment, this is still experimental, the BDF table format isn't
cast into stone yet.
2005-12-14 21:38:15 +01:00
|
|
|
|
|
|
|
} TT_BDFRec, *TT_BDF;
|
|
|
|
|
|
|
|
#endif /* TT_CONFIG_OPTION_BDF */
|
* src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.
2004-04-24 George Williams <gww@silcom.com>
Add support for Apple's distortable font technology (in GX fonts).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.
* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.
* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.
* include/freetype/internal/fttrace.h: Add `ttgxvar'.
* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.
* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.
* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.
* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.
* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.
* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.
* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 22:15:11 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ORIGINAL TT_FACE CLASS DEFINITION ***/
|
|
|
|
/*** ***/
|
|
|
|
/*** ***/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
/*************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* This structure/class is defined here because it is common to the */
|
|
|
|
/* following formats: TTF, OpenType-TT, and OpenType-CFF. */
|
|
|
|
/* */
|
* include/freetype/internal/tttypes.h (TT_TableDirRec,
TT_CMapDirRec, TT_CMapDirEntryRec, TT_CMap0, TT_CMap2SubHeaderRec,
TT_CMap2Rec, TT_CMap4Segment, TT_CMap4Rec, TT_CMap6,
TT_CMapGroupRec, TT_CMap8_12Rec, TT_CMap10Rec, TT_CharMap_Func,
TT_CharNext_Func, TT_CMapTableRec, TT_CharMapRec): Removed.
Obsolete.
* src/cff/cffobjs.h (CFF_CharMapRec): Removed. Obsolete.
2003-12-16 08:12:40 +01:00
|
|
|
/* Note, however, that the classes TT_Size and TT_GlyphSlot are not */
|
|
|
|
/* shared between font drivers, and are thus defined in `ttobjs.h'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Type> */
|
|
|
|
/* TT_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A handle to a TrueType face/font object. A TT_Face encapsulates */
|
|
|
|
/* the resolution and scaling independent parts of a TrueType font */
|
|
|
|
/* resource. */
|
|
|
|
/* */
|
|
|
|
/* <Note> */
|
|
|
|
/* The TT_Face structure is also used as a `parent class' for the */
|
|
|
|
/* OpenType-CFF class (T2_Face). */
|
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
typedef struct TT_FaceRec_* TT_Face;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* a function type used for the truetype bytecode interpreter hooks */
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
|
|
|
(*TT_Interpreter)( void* exec_context );
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-06-25 06:49:19 +02:00
|
|
|
/* forward declaration */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_LoaderRec_* TT_Loader;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
2002-03-31 13:18:15 +02:00
|
|
|
/* TT_Loader_GotoTableFunc */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Seeks a stream to the start of a given TrueType table. */
|
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* face :: A handle to the target face object. */
|
|
|
|
/* */
|
|
|
|
/* tag :: A 4-byte tag used to name the table. */
|
|
|
|
/* */
|
|
|
|
/* stream :: The input stream. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Output> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* length :: The length of the table in bytes. Set to 0 if not */
|
|
|
|
/* needed. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* FreeType error code. 0 means success. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* The stream cursor must be at the font file's origin. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-31 13:18:15 +02:00
|
|
|
(*TT_Loader_GotoTableFunc)( TT_Face face,
|
|
|
|
FT_ULong tag,
|
|
|
|
FT_Stream stream,
|
|
|
|
FT_ULong* length );
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-06-25 06:49:19 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_Loader_StartGlyphFunc */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* Seeks a stream to the start of a given glyph element, and opens a */
|
|
|
|
/* frame for it. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* loader :: The current TrueType glyph loader object. */
|
|
|
|
/* */
|
|
|
|
/* glyph index :: The index of the glyph to access. */
|
|
|
|
/* */
|
|
|
|
/* offset :: The offset of the glyph according to the */
|
|
|
|
/* `locations' table. */
|
|
|
|
/* */
|
|
|
|
/* byte_count :: The size of the frame in bytes. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* FreeType error code. 0 means success. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Note> */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* This function is normally equivalent to FT_STREAM_SEEK(offset) */
|
|
|
|
/* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, */
|
|
|
|
/* but alternative formats (e.g. compressed ones) might use something */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* different. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-30 14:16:35 +01:00
|
|
|
(*TT_Loader_StartGlyphFunc)( TT_Loader loader,
|
|
|
|
FT_UInt glyph_index,
|
|
|
|
FT_ULong offset,
|
|
|
|
FT_UInt byte_count );
|
2000-07-19 08:25:56 +02:00
|
|
|
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-06-25 06:49:19 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_Loader_ReadGlyphFunc */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* Reads one glyph element (its header, a simple glyph, or a */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* composite) from the loader's current stream frame. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* loader :: The current TrueType glyph loader object. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Return> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* FreeType error code. 0 means success. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef FT_Error
|
2002-03-30 14:16:35 +01:00
|
|
|
(*TT_Loader_ReadGlyphFunc)( TT_Loader loader );
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
2000-06-25 06:49:19 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <FuncType> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_Loader_EndGlyphFunc */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* Closes the current loader stream frame for the glyph. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
|
|
|
/* <Input> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* loader :: The current TrueType glyph loader object. */
|
2000-06-25 06:49:19 +02:00
|
|
|
/* */
|
2001-06-28 19:49:10 +02:00
|
|
|
typedef void
|
2002-03-30 14:16:35 +01:00
|
|
|
(*TT_Loader_EndGlyphFunc)( TT_Loader loader );
|
2000-06-25 06:49:19 +02:00
|
|
|
|
|
|
|
|
2013-07-18 13:13:12 +02:00
|
|
|
typedef enum TT_SbitTableType_
|
|
|
|
{
|
|
|
|
TT_SBIT_TABLE_TYPE_NONE = 0,
|
|
|
|
TT_SBIT_TABLE_TYPE_EBLC, /* `EBLC' (Microsoft), */
|
2013-07-25 21:53:18 +02:00
|
|
|
/* `bloc' (Apple) */
|
|
|
|
TT_SBIT_TABLE_TYPE_CBLC, /* `CBLC' (Google) */
|
2013-07-18 13:13:12 +02:00
|
|
|
TT_SBIT_TABLE_TYPE_SBIX, /* `sbix' (Apple) */
|
|
|
|
|
|
|
|
/* do not remove */
|
|
|
|
TT_SBIT_TABLE_TYPE_MAX
|
|
|
|
|
|
|
|
} TT_SbitTableType;
|
|
|
|
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* TrueType Face Type */
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* TT_Face */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* The TrueType face class. These objects model the resolution and */
|
|
|
|
/* point-size independent data found in a TrueType font file. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* root :: The base FT_Face structure, managed by the */
|
|
|
|
/* base layer. */
|
|
|
|
/* */
|
|
|
|
/* ttc_header :: The TrueType collection header, used when */
|
|
|
|
/* the file is a `ttc' rather than a `ttf'. */
|
|
|
|
/* For ordinary font files, the field */
|
|
|
|
/* `ttc_header.count' is set to 0. */
|
|
|
|
/* */
|
|
|
|
/* format_tag :: The font format tag. */
|
|
|
|
/* */
|
|
|
|
/* num_tables :: The number of TrueType tables in this font */
|
|
|
|
/* file. */
|
|
|
|
/* */
|
|
|
|
/* dir_tables :: The directory of TrueType tables for this */
|
|
|
|
/* font file. */
|
|
|
|
/* */
|
|
|
|
/* header :: The font's font header (`head' table). */
|
|
|
|
/* Read on font opening. */
|
|
|
|
/* */
|
|
|
|
/* horizontal :: The font's horizontal header (`hhea' */
|
|
|
|
/* table). This field also contains the */
|
|
|
|
/* associated horizontal metrics table */
|
|
|
|
/* (`hmtx'). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* max_profile :: The font's maximum profile table. Read on */
|
|
|
|
/* font opening. Note that some maximum */
|
|
|
|
/* values cannot be taken directly from this */
|
|
|
|
/* table. We thus define additional fields */
|
|
|
|
/* below to hold the computed maxima. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* vertical_info :: A boolean which is set when the font file */
|
|
|
|
/* contains vertical metrics. If not, the */
|
|
|
|
/* value of the `vertical' field is */
|
|
|
|
/* undefined. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* vertical :: The font's vertical header (`vhea' table). */
|
|
|
|
/* This field also contains the associated */
|
|
|
|
/* vertical metrics table (`vmtx'), if found. */
|
|
|
|
/* IMPORTANT: The contents of this field is */
|
|
|
|
/* undefined if the `verticalInfo' field is */
|
|
|
|
/* unset. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* num_names :: The number of name records within this */
|
|
|
|
/* TrueType font. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* name_table :: The table of name records (`name'). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* os2 :: The font's OS/2 table (`OS/2'). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* postscript :: The font's PostScript table (`post' */
|
|
|
|
/* table). The PostScript glyph names are */
|
|
|
|
/* not loaded by the driver on face opening. */
|
|
|
|
/* See the `ttpost' module for more details. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* cmap_table :: Address of the face's `cmap' SFNT table */
|
2002-03-30 17:09:24 +01:00
|
|
|
/* in memory (it's an extracted frame). */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* cmap_size :: The size in bytes of the `cmap_table' */
|
|
|
|
/* described above. */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* goto_table :: A function called by each TrueType table */
|
|
|
|
/* loader to position a stream's cursor to */
|
|
|
|
/* the start of a given table according to */
|
|
|
|
/* its tag. It defaults to TT_Goto_Face but */
|
|
|
|
/* can be different for strange formats (e.g. */
|
|
|
|
/* Type 42). */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-30 17:09:24 +01:00
|
|
|
/* access_glyph_frame :: A function used to access the frame of a */
|
|
|
|
/* given glyph within the face's font file. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-30 17:09:24 +01:00
|
|
|
/* forget_glyph_frame :: A function used to forget the frame of a */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* given glyph when all data has been loaded. */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* */
|
2002-03-30 17:09:24 +01:00
|
|
|
/* read_glyph_header :: A function used to read a glyph header. */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* It must be called between an `access' and */
|
|
|
|
/* `forget'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-30 17:09:24 +01:00
|
|
|
/* read_simple_glyph :: A function used to read a simple glyph. */
|
|
|
|
/* It must be called after the header was */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* read, and before the `forget'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-30 17:09:24 +01:00
|
|
|
/* read_composite_glyph :: A function used to read a composite glyph. */
|
|
|
|
/* It must be called after the header was */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* read, and before the `forget'. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2003-09-30 07:39:35 +02:00
|
|
|
/* sfnt :: A pointer to the SFNT service. */
|
|
|
|
/* */
|
|
|
|
/* psnames :: A pointer to the PostScript names service. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* hdmx :: The face's horizontal device metrics */
|
|
|
|
/* (`hdmx' table). This table is optional in */
|
|
|
|
/* TrueType/OpenType fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* gasp :: The grid-fitting and scaling properties */
|
|
|
|
/* table (`gasp'). This table is optional in */
|
|
|
|
/* TrueType/OpenType fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* pclt :: The `pclt' SFNT table. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* num_sbit_scales :: The number of sbit scales for this font. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* sbit_scales :: Array of sbit scales embedded in this */
|
|
|
|
/* font. This table is optional in a */
|
|
|
|
/* TrueType/OpenType font. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* postscript_names :: A table used to store the Postscript names */
|
|
|
|
/* of the glyphs for this font. See the */
|
|
|
|
/* file `ttconfig.h' for comments on the */
|
|
|
|
/* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* num_locations :: The number of glyph locations in this */
|
|
|
|
/* TrueType file. This should be */
|
|
|
|
/* identical to the number of glyphs. */
|
|
|
|
/* Ignored for Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* glyph_locations :: An array of longs. These are offsets to */
|
|
|
|
/* glyph data within the `glyf' table. */
|
|
|
|
/* Ignored for Type 2 font faces. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2005-05-05 09:44:20 +02:00
|
|
|
/* glyf_len :: The length of the `glyf' table. Needed */
|
|
|
|
/* for malformed `loca' tables. */
|
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* font_program_size :: Size in bytecodes of the face's font */
|
|
|
|
/* program. 0 if none defined. Ignored for */
|
|
|
|
/* Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* font_program :: The face's font program (bytecode stream) */
|
|
|
|
/* executed at load time, also used during */
|
|
|
|
/* glyph rendering. Comes from the `fpgm' */
|
|
|
|
/* table. Ignored for Type 2 font fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* cvt_program_size :: The size in bytecodes of the face's cvt */
|
|
|
|
/* program. Ignored for Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* cvt_program :: The face's cvt program (bytecode stream) */
|
|
|
|
/* executed each time an instance/size is */
|
|
|
|
/* changed/reset. Comes from the `prep' */
|
|
|
|
/* table. Ignored for Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* cvt_size :: Size of the control value table (in */
|
|
|
|
/* entries). Ignored for Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* cvt :: The face's original control value table. */
|
|
|
|
/* Coordinates are expressed in unscaled font */
|
|
|
|
/* units. Comes from the `cvt ' table. */
|
|
|
|
/* Ignored for Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* num_kern_pairs :: The number of kerning pairs present in the */
|
|
|
|
/* font file. The engine only loads the */
|
|
|
|
/* first horizontal format 0 kern table it */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* finds in the font file. Ignored for */
|
|
|
|
/* Type 2 fonts. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* kern_table_index :: The index of the kerning table in the font */
|
2002-03-30 14:16:35 +01:00
|
|
|
/* kerning directory. Ignored for Type 2 */
|
|
|
|
/* fonts. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
|
|
|
/* interpreter :: A pointer to the TrueType bytecode */
|
|
|
|
/* interpreters field is also used to hook */
|
|
|
|
/* the debugger in `ttdebug'. */
|
|
|
|
/* */
|
2003-04-25 13:36:44 +02:00
|
|
|
/* unpatented_hinting :: If true, use only unpatented methods in */
|
|
|
|
/* the bytecode interpreter. */
|
|
|
|
/* */
|
* src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.
2004-04-24 George Williams <gww@silcom.com>
Add support for Apple's distortable font technology (in GX fonts).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.
* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.
* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.
* include/freetype/internal/fttrace.h: Add `ttgxvar'.
* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.
* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.
* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.
* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.
* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.
* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.
* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 22:15:11 +02:00
|
|
|
/* doblend :: A boolean which is set if the font should */
|
|
|
|
/* be blended (this is for GX var). */
|
|
|
|
/* */
|
|
|
|
/* blend :: Contains the data needed to control GX */
|
|
|
|
/* variation tables (rather like Multiple */
|
|
|
|
/* Master data). */
|
|
|
|
/* */
|
2002-03-30 17:46:23 +01:00
|
|
|
/* extra :: Reserved for third-party font drivers. */
|
1999-12-17 00:11:37 +01:00
|
|
|
/* */
|
* src/pcf/pcfdrivr.c: Revert change from 2004-04-17.
* src/pcf/pcfutil.c: Use FT_LOCAL_DEF.
* src/pcf/pcfutil.h: Include FT_CONFIG_CONFIG_H.
Use FT_BEGIN_HEADER and FT_END_HEADER.
Use FT_LOCAL.
2004-04-24 George Williams <gww@silcom.com>
Add support for Apple's distortable font technology (in GX fonts).
* devel/ftoption.h, include/freetype/config/ftoption.h
(TT_CONFIG_OPTION_GX_VAR_SUPPORT): New macro.
* include/freetype/ftmm.h (FT_Var_Axis, FT_Var_Named_Style,
FT_MM_Var): New structures.
(FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New function declarations.
* include/freetype/internal/services/svmm.h (FT_Get_MM_Var_Func,
FT_Set_Var_Design_Func): New typedefs.
Update MultiMasters service.
* include/freetype/internal/tttypes.h
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include FT_MULTIPLE_MASTERS_H.
(GX_Blend) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New typedef.
(TT_Face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: New members `doblend'
and `blend'.
* include/freetype/tttags.h (TTAG_avar, TTAG_cvar, TTAG_gvar): New
macros.
* include/freetype/internal/fttrace.h: Add `ttgxvar'.
* src/base/ftmm.c (FT_Get_MM_Var, FT_Set_Var_Design_Coordinates,
FT_Set_Var_Blend_Coordinates): New functions.
* src/sfnt/sfobjs.c (sfnt_load_face)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Set FT_FACE_FLAG_MULTIPLE_MASTERS
flag for GX var fonts.
* src/truetype/ttgxvar.c, src/truetype/ttgxvar.h: New files.
* src/truetype/truetype.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.c.
* src/truetype/ttdriver.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
FT_MULTIPLE_MASTERS_H, FT_SERVICE_MULTIPLE_MASTERS_H, and ttgxvar.h.
(tt_service_gx_multi_masters) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]:
New service.
(tt_services) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Updated.
* src/truetype/ttgload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(TT_Process_Simple_Glyph, load_truetype_glyph)
[TT_CONFIG_OPTION_GX_VAR_SUPPORT] :Support GX var fonts.
* src/truetype/ttobjs.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_done_face) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_done_blend.
* src/truetype/ttpload.c [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Include
ttgxvar.h.
(tt_face_load_cvt) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Call
tt_face_vary_cvt.
* src/truetype/rules.mk (TT_DRV_SRC): Add ttgxvar.c.
* src/type1/t1driver.c (t1_service_multi_masters): Add T1_Get_MM_Var
and T1_Set_Var_Design.
* src/type1/t1load.c (FT_INT_TO_FIXED, FT_FIXED_TO_INT): New macros.
(T1_Get_MM_Var, T1_Set_Var_Design): New functions.
* src/type1/t1load.h (T1_Get_MM_Var, T1_Set_Var_Design): New
function declarations.
2004-04-25 22:15:11 +02:00
|
|
|
/* postscript_name :: The PS name of the font. Used by the */
|
|
|
|
/* postscript name service. */
|
|
|
|
/* */
|
1999-12-17 00:11:37 +01:00
|
|
|
typedef struct TT_FaceRec_
|
|
|
|
{
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_FaceRec root;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
TTC_HeaderRec ttc_header;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong format_tag;
|
|
|
|
FT_UShort num_tables;
|
|
|
|
TT_Table dir_tables;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_Header header; /* TrueType header table */
|
|
|
|
TT_HoriHeader horizontal; /* TrueType horizontal header */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_MaxProfile max_profile;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_Bool vertical_info;
|
|
|
|
TT_VertHeader vertical; /* TT Vertical header, if present */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_UShort num_names; /* number of name records */
|
|
|
|
TT_NameTableRec name_table; /* name table */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_OS2 os2; /* TrueType OS/2 table */
|
|
|
|
TT_Postscript postscript; /* TrueType Postscript table */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2006-03-24 13:46:49 +01:00
|
|
|
FT_Byte* cmap_table; /* extracted `cmap' table */
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong cmap_size;
|
2002-03-01 03:26:22 +01:00
|
|
|
|
2002-03-31 13:18:15 +02:00
|
|
|
TT_Loader_GotoTableFunc goto_table;
|
2000-05-17 01:44:38 +02:00
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_Loader_StartGlyphFunc access_glyph_frame;
|
|
|
|
TT_Loader_EndGlyphFunc forget_glyph_frame;
|
|
|
|
TT_Loader_ReadGlyphFunc read_glyph_header;
|
|
|
|
TT_Loader_ReadGlyphFunc read_simple_glyph;
|
|
|
|
TT_Loader_ReadGlyphFunc read_composite_glyph;
|
2000-06-25 06:49:19 +02:00
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
/* a typeless pointer to the SFNT_Interface table used to load */
|
|
|
|
/* the basic TrueType tables in the face object */
|
2002-03-30 14:16:35 +01:00
|
|
|
void* sfnt;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
* include/freetype/internal/bdftypes.h: removed obsolete header
* include/freetype/internal/cfftypes.h, src/cff/cfftypes.h,
src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h,
include/freetype/internal/services/svbdf.h: moving "cfftypes.h" from
'include/freetype/internal' to 'src/cff' since no other modules needs
to known about these types
* include/freetype/internal/t42types.h,
include/freetype/internal/internal.h, src/type42/t42objs.h,
src/type42/t42drivr.c, src/type42/t42types.h: moving "t42types.h" from
'include/freetype/internal' to 'src/type42' since no other modules needs
to known about these types
* src/gzip/infblock.c: removing compiler warning
* include/freetype/internal/services/svpsinfo.h,
include/freetype/internal/ftserv.h, src/cff/cffdrivr.c,
src/cid/ciddrivr.c, src/type1/t1driver.c, src/type42/t42drivr.c,
src/base/fttype1.c: migrating to FT_SERVICE_ID_POSTSCRIPT_INFO defined
in "svpsinfo.h", removing some sad hacks.
2003-10-29 22:43:52 +01:00
|
|
|
/* a typeless pointer to the FT_Service_PsCMapsRec table used to */
|
2003-09-30 07:39:35 +02:00
|
|
|
/* handle glyph names <-> unicode & Mac values */
|
2002-03-30 14:16:35 +01:00
|
|
|
void* psnames;
|
2000-02-10 18:01:24 +01:00
|
|
|
|
2003-09-30 07:39:35 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
|
|
|
/* Optional TrueType/OpenType tables */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* grid-fitting and scaling table */
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_GaspRec gasp; /* the `gasp' table */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-05-18 18:18:05 +02:00
|
|
|
/* PCL 5 table */
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_PCLT pclt;
|
2000-05-18 18:18:05 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/* embedded bitmaps support */
|
2002-09-28 18:40:57 +02:00
|
|
|
FT_ULong num_sbit_scales;
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_SBit_Scale sbit_scales;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
/* postscript names table */
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_Post_NamesRec postscript_names;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
|
|
|
/* TrueType-specific fields (ignored by the OTF-Type2 driver) */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* the font program, if any */
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong font_program_size;
|
|
|
|
FT_Byte* font_program;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
/* the cvt program, if any */
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong cvt_program_size;
|
|
|
|
FT_Byte* cvt_program;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
/* the original, unscaled, control value table */
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_ULong cvt_size;
|
|
|
|
FT_Short* cvt;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
/* A pointer to the bytecode interpreter to use. This is also */
|
|
|
|
/* used to hook the debugger for the `ttdebug' utility. */
|
2002-03-30 14:16:35 +01:00
|
|
|
TT_Interpreter interpreter;
|
1999-12-17 00:11:37 +01:00
|
|
|
|
2003-08-18 00:09:14 +02:00
|
|
|
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
|
2003-04-25 13:36:44 +02:00
|
|
|
/* Use unpatented hinting only. */
|
2003-04-29 15:23:47 +02:00
|
|
|
FT_Bool unpatented_hinting;
|
2003-04-25 13:36:44 +02:00
|
|
|
#endif
|
2000-07-19 08:25:56 +02:00
|
|
|
|
2000-05-27 00:13:17 +02:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
|
|
|
/* Other tables or fields. This is used by derivative formats like */
|
|
|
|
/* OpenType. */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
2002-03-30 14:16:35 +01:00
|
|
|
FT_Generic extra;
|
2000-05-27 00:13:17 +02:00
|
|
|
|
* include/freetype/ftmm.h, include/freetype/ftmodule.h,
include/freetype/tttables.h, include/freetype/config/ftconfig.h,
include/freetype/internal/ftobjs.h,
include/freetype/internal/ftserv.h,
include/freetype/internal/internal.h,
include/freetype/internal/sfnt.h,
include/freetype/internal/tttypes.h,
include/freetype/internal/services/bdf.h,
include/freetype/internal/services/glyfdict.h,
include/freetype/internal/services/multmast.h,
include/freetype/internal/services/postname.h,
include/freetype/internal/services/sfnt.h,
include/freetype/internal/services/xf86name.h,
src/base/ftbdf.c, src/base/ftmm.c, src/base/ftobjs.c,
src/base/ftxf86.c, src/bdf/bdfdrivr.c, src/cff/cffdrivr.c,
src/cid/cidriver.c, src/pcf/pcfdrivr.c, src/sfnt/sfdriver.c,
src/truetype/ttdriver.c, src/type1/t1driver.c, src/type42/t42drivr.c:
heavy internal modifications to introduce the concept of
"module services". This is the first step towards a massive
simplification of the engine's internals, in order to
get rid of various numbers of hacks.
Note that this changes will break source & binary compatibility
for authors of external font drivers.
Maybe 2.1.6 will be called 2.2.0 after all :-)
2003-09-11 21:51:54 +02:00
|
|
|
const char* postscript_name;
|
|
|
|
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
FT_ULong glyf_len;
|
|
|
|
|
|
|
|
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
|
|
|
|
FT_Bool doblend;
|
|
|
|
GX_Blend blend;
|
|
|
|
#endif
|
|
|
|
|
2006-02-17 09:07:09 +01:00
|
|
|
/* since version 2.2 */
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
|
|
|
|
FT_Byte* horz_metrics;
|
|
|
|
FT_ULong horz_metrics_size;
|
|
|
|
|
|
|
|
FT_Byte* vert_metrics;
|
|
|
|
FT_ULong vert_metrics_size;
|
|
|
|
|
2012-01-16 18:00:24 +01:00
|
|
|
FT_ULong num_locations; /* in broken TTF, gid > 0xFFFF */
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
FT_Byte* glyph_locations;
|
|
|
|
|
|
|
|
FT_Byte* hdmx_table;
|
|
|
|
FT_ULong hdmx_table_size;
|
|
|
|
FT_UInt hdmx_record_count;
|
|
|
|
FT_ULong hdmx_record_size;
|
|
|
|
FT_Byte* hdmx_record_sizes;
|
|
|
|
|
|
|
|
FT_Byte* sbit_table;
|
|
|
|
FT_ULong sbit_table_size;
|
2013-07-18 13:13:12 +02:00
|
|
|
TT_SbitTableType sbit_table_type;
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
FT_UInt sbit_num_strikes;
|
|
|
|
|
|
|
|
FT_Byte* kern_table;
|
|
|
|
FT_ULong kern_table_size;
|
|
|
|
FT_UInt num_kern_tables;
|
|
|
|
FT_UInt32 kern_avail_bits;
|
|
|
|
FT_UInt32 kern_order_bits;
|
|
|
|
|
|
|
|
#ifdef TT_CONFIG_OPTION_BDF
|
|
|
|
TT_BDFRec bdf;
|
|
|
|
#endif /* TT_CONFIG_OPTION_BDF */
|
|
|
|
|
2007-01-10 15:18:15 +01:00
|
|
|
/* since 2.3.0 */
|
2007-01-05 15:47:08 +01:00
|
|
|
FT_ULong horz_metrics_offset;
|
|
|
|
FT_ULong vert_metrics_offset;
|
|
|
|
|
2013-01-26 19:29:52 +01:00
|
|
|
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
|
2013-01-28 13:56:23 +01:00
|
|
|
/* since 2.4.12 */
|
|
|
|
FT_ULong sph_found_func_flags; /* special functions found */
|
|
|
|
/* for this face */
|
2013-01-26 19:29:52 +01:00
|
|
|
FT_Bool sph_compatibility_mode;
|
|
|
|
#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
|
|
|
|
|
1999-12-17 00:11:37 +01:00
|
|
|
} TT_FaceRec;
|
|
|
|
|
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
2002-03-14 12:26:29 +01:00
|
|
|
/* TT_GlyphZoneRec */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A glyph zone is used to load, scale and hint glyph outline */
|
|
|
|
/* coordinates. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
|
|
|
/* memory :: A handle to the memory manager. */
|
|
|
|
/* */
|
2012-03-11 13:48:25 +01:00
|
|
|
/* max_points :: The maximum size in points of the zone. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
2007-01-29 15:49:59 +01:00
|
|
|
/* max_contours :: Max size in links contours of the zone. */
|
2000-07-19 08:25:56 +02:00
|
|
|
/* */
|
|
|
|
/* n_points :: The current number of points in the zone. */
|
|
|
|
/* */
|
|
|
|
/* n_contours :: The current number of contours in the zone. */
|
|
|
|
/* */
|
|
|
|
/* org :: The original glyph coordinates (font */
|
|
|
|
/* units/scaled). */
|
|
|
|
/* */
|
|
|
|
/* cur :: The current glyph coordinates (scaled/hinted). */
|
|
|
|
/* */
|
|
|
|
/* tags :: The point control tags. */
|
|
|
|
/* */
|
|
|
|
/* contours :: The contours end points. */
|
|
|
|
/* */
|
2006-06-25 08:27:27 +02:00
|
|
|
/* first_point :: Offset of the current subglyph's first point. */
|
|
|
|
/* */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_GlyphZoneRec_
|
2000-06-23 13:36:51 +02:00
|
|
|
{
|
|
|
|
FT_Memory memory;
|
|
|
|
FT_UShort max_points;
|
|
|
|
FT_UShort max_contours;
|
2006-06-25 08:27:27 +02:00
|
|
|
FT_UShort n_points; /* number of points in zone */
|
|
|
|
FT_Short n_contours; /* number of contours */
|
|
|
|
|
|
|
|
FT_Vector* org; /* original point coordinates */
|
|
|
|
FT_Vector* cur; /* current point coordinates */
|
2006-08-16 18:50:55 +02:00
|
|
|
FT_Vector* orus; /* original (unscaled) point coordinates */
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2006-06-25 08:27:27 +02:00
|
|
|
FT_Byte* tags; /* current touch flags */
|
|
|
|
FT_UShort* contours; /* contour end points */
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2006-06-25 08:27:27 +02:00
|
|
|
FT_UShort first_point; /* offset of first (#0) point */
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_GlyphZoneRec, *TT_GlyphZone;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
/* handle to execution context */
|
2000-06-23 13:36:51 +02:00
|
|
|
typedef struct TT_ExecContextRec_* TT_ExecContext;
|
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
/* glyph loader structure */
|
2002-03-14 12:26:29 +01:00
|
|
|
typedef struct TT_LoaderRec_
|
2000-06-23 13:36:51 +02:00
|
|
|
{
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_Face face;
|
|
|
|
FT_Size size;
|
|
|
|
FT_GlyphSlot glyph;
|
2002-02-24 03:59:24 +01:00
|
|
|
FT_GlyphLoader gloader;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_ULong load_flags;
|
|
|
|
FT_UInt glyph_index;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_Stream stream;
|
|
|
|
FT_Int byte_len;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_Short n_contours;
|
|
|
|
FT_BBox bbox;
|
|
|
|
FT_Int left_bearing;
|
|
|
|
FT_Int advance;
|
2001-06-08 15:29:36 +02:00
|
|
|
FT_Int linear;
|
|
|
|
FT_Bool linear_def;
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_Vector pp1;
|
|
|
|
FT_Vector pp2;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
FT_ULong glyf_offset;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
|
|
|
/* the zone where we load our glyphs */
|
2002-03-14 12:26:29 +01:00
|
|
|
TT_GlyphZoneRec base;
|
|
|
|
TT_GlyphZoneRec zone;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
2000-07-19 08:25:56 +02:00
|
|
|
TT_ExecContext exec;
|
|
|
|
FT_Byte* instructions;
|
|
|
|
FT_ULong ins_pos;
|
2000-10-31 21:42:18 +01:00
|
|
|
|
2000-06-25 06:49:19 +02:00
|
|
|
/* for possible extensibility in other formats */
|
2000-07-19 08:25:56 +02:00
|
|
|
void* other;
|
2002-05-28 01:52:01 +02:00
|
|
|
|
2006-02-17 09:07:09 +01:00
|
|
|
/* since version 2.1.8 */
|
* builds/amiga/src/base/ftsystem.c, devel/ftoption.h
include/freetype/ftcache.h, include/freetype/ftoutln.h,
include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h,
include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h,
include/freetype/internal/ftdriver.h,
include/freetype/internal/ftmemory.h,
include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h,
include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h,
include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h,
src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c,
src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c,
src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c,
src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c,
src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c,
src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c,
src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c:
massive changes to the internals to respect the internal object layouts
and exported functions of FreeType 2.1.7. Note that the cache sub-system
cannot be fully retrofitted, unfortunately.
2006-02-16 23:45:31 +01:00
|
|
|
FT_Int top_bearing;
|
|
|
|
FT_Int vadvance;
|
|
|
|
FT_Vector pp3;
|
|
|
|
FT_Vector pp4;
|
|
|
|
|
* include/freetype/internal/tttypes.h, src/autofit/afangles.c,
src/autofit/afcjk.c, src/autofit/afhints.c, src/autofit/aflatin.c,
src/autofit/aftypes.h, src/base/ftcalc.c, src/base/ftoutln.c,
src/gzip/ftgzip.c, src/psaux/psconv.c, src/truetype/ttgload.c,
src/type1/t1gload.c:
this is a major patch used to drastically improve the performance
of loading glyphs. This both speeds up loading the glypn vector
themselves and the auto-fitter.
note that we've started using inline assembler with GCC to
implement FT_MulFix, given that this function is so damn
important for the engine's performance.
the resulting speed-up is about 25%.
2006-05-17 15:34:21 +02:00
|
|
|
/* since version 2.2.1 */
|
|
|
|
FT_Byte* cursor;
|
|
|
|
FT_Byte* limit;
|
|
|
|
|
2002-03-14 12:26:29 +01:00
|
|
|
} TT_LoaderRec;
|
2000-06-23 13:36:51 +02:00
|
|
|
|
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
FT_END_HEADER
|
2000-08-01 15:17:04 +02:00
|
|
|
|
2000-12-01 00:12:33 +01:00
|
|
|
#endif /* __TTTYPES_H__ */
|
1999-12-17 00:11:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|