diff options
Diffstat (limited to 'Build/source/texk/ttfdump/include')
-rw-r--r-- | Build/source/texk/ttfdump/include/gcache.h | 24 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/gpos.h | 234 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/gstate.h | 86 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/gsub.h | 134 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/loadtable.h | 137 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/os2_P.h | 197 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/otftables.h | 368 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/protos.h | 18 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/stack.h | 9 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/tables.h | 686 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/ttc.h | 24 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/ttf.h | 173 | ||||
-rw-r--r-- | Build/source/texk/ttfdump/include/ttfutil.h | 67 |
13 files changed, 0 insertions, 2157 deletions
diff --git a/Build/source/texk/ttfdump/include/gcache.h b/Build/source/texk/ttfdump/include/gcache.h deleted file mode 100644 index e8785e306bd..00000000000 --- a/Build/source/texk/ttfdump/include/gcache.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __TTF_GCACHE_H -#define __TTF_GCACHE_H - -#include "tables.h" - -/* $Id: gcache.h,v 1.2 1998/07/06 06:07:01 werner Exp $ */ - -typedef struct _gcache -{ - ULONG offset; /* offset of the glyph; this is the key - * for sorting/searching with the glyph - * cache */ - struct _gcache *prev, *next; /* pointer to previous and next element on - * the LRU list */ - struct _gcache *left, *right; /* pointer to left and right subtree on - * the binary search tree */ - GLYF glyf; /* the actual place to hold the glyph data */ -} -GlyphCache, *GlyphCachePtr; - -#endif /* __TTF_GCACHE_H */ - - -/* end of gcache.h */ diff --git a/Build/source/texk/ttfdump/include/gpos.h b/Build/source/texk/ttfdump/include/gpos.h deleted file mode 100644 index 4f1e72d970a..00000000000 --- a/Build/source/texk/ttfdump/include/gpos.h +++ /dev/null @@ -1,234 +0,0 @@ -/* gpos.h -- define data structures for Glyph Positioning Table - */ - -#ifndef __TTF_GPOS_H -#define __TTF_GPOS_H - -/* ValueFormat Bits */ -#define ValueFormat_XPlacement 0x0001 << 0 -#define ValueFormat_YPlacement 0x0001 << 1 -#define ValueFormat_XAdvance 0x0001 << 2 -#define ValueFormat_YAdvance 0x0001 << 3 -#define ValueFormat_AllDesign 0x000f -#define ValueFormat_XPlaDevice 0x0010 << 0 -#define ValueFormat_YPlaDevice 0x0010 << 1 -#define ValueFormat_XAdvDevice 0x0010 << 2 -#define ValueFormat_YAdvDevice 0x0010 << 3 -#define ValueFormat_AllDevice 0x00f0 -#define ValueFormat_Reserved 0xff00 - -/* Positioning LookupType Values */ -#define PosLookup_SingleAdjustment 1 -#define PosLookup_PairAdjustment 2 -#define PosLookup_CursiveAttachment 3 -#define PosLookup_MarkToBaseAttachment 4 -#define PosLookup_MarkToLigatureAttachment 5 -#define PosLookup_MarkToMarkAttachment 6 -#define PosLookup_ContextPositioning 7 -#define PosLookup_ChainedContextPositioning 8 -#define PosLookup_ExtensionPositioning 9 -#define PosLookup_Max 9 - -typedef struct -{ - SHORT valDesign[4]; - union - { - USHORT offset; - DevicePtr device; - } - valDevice[4]; -} -ValueRecord, *ValueRecordPtr; - -typedef struct -{ - USHORT anchorFormat; /* = 1 */ - SHORT xCoordinate; - SHORT yCoordinate; -} -Anchor1, *Anchor1Ptr; - -typedef struct -{ - USHORT anchorFormat; /* = 2 */ - SHORT xCoordinate; - SHORT yCoordinate; - USHORT anchorPoint; -} -Anchor2, *Anchor2Ptr; - -typedef struct -{ - USHORT anchorFormat; /* = 3 */ - SHORT xCoordinate; - SHORT yCoordinate; - DevicePtr xDevice; - DevicePtr yDevice; -} -Anchor3, *Anchor3Ptr; - -typedef union -{ - Anchor1Ptr anchor1; - Anchor2Ptr anchor2; - Anchor3Ptr anchor3; -} -AnchorPtr; - -typedef struct -{ - USHORT class; - AnchorPtr markAnchor; -} -MarkRecord, *MarkRecordPtr; - -typedef struct -{ - USHORT lookupType; /* = 1 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT valueFormat; - ValueRecordPtr value; -} -Pos11, *Pos11Ptr; - -typedef struct -{ - USHORT lookupType; /* = 1 */ - USHORT lookupFormat; /* = 2 */ - CoveragePtr coverage; - USHORT valueFormat; - USHORT valueCount; - ValueRecordPtr *value; /* length = valueCount */ -} -Pos12, *Pos12Ptr; - -typedef struct -{ - USHORT secondGlyph; - ValueRecordPtr value1; - ValueRecordPtr value2; -} -PairValueRecord, *PairValueRecordPtr; - -typedef struct -{ - USHORT pairValueCount; - PairValueRecordPtr pairValue; /* length = pairValueCount */ -} -PairSet, *PairSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 2 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT valueFormat1; - USHORT valueFormat2; - USHORT pairSetCount; - PairSetPtr pairSet; /* length = pairSetCount */ -} -Pos21, *Pos21Ptr; - -typedef struct -{ - USHORT lookupType; /* = 2 */ - USHORT lookupFormat; /* = 2 */ - CoveragePtr coverage; - USHORT valueFormat1; - USHORT valueFormat2; - ClassDefPtr classDef1; - ClassDefPtr classDef2; - USHORT class1Count; - USHORT class2Count; - ValueRecordPtr *values; /* length = 2 * class1Count * class2Count */ -} -Pos22, *Pos22Ptr; - -typedef struct -{ - USHORT lookupType; /* = 3 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT entryExitCount; - AnchorPtr *entryExit; /* length = 2 * entryExitCount */ -} -Pos31, *Pos31Ptr; - -typedef struct -{ - USHORT lookupType; /* = 4 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr markCoverage; - CoveragePtr baseCoverage; - USHORT markCount; - USHORT baseCount; - USHORT classCount; - MarkRecordPtr markArray; /* length = markCount */ - AnchorPtr *baseArray; /* length = baseCount * classCount */ -} -Pos41, *Pos41Ptr; - -typedef struct -{ - USHORT componentCount; - AnchorPtr *componentRecord; /* length = componentCount * classCount */ -} -LigatureAttach, *LigatureAttachPtr; - -typedef struct -{ - USHORT lookupType; /* = 5 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr markCoverage; - CoveragePtr ligatureCoverage; - USHORT markCount; - USHORT ligatureCount; - USHORT classCount; - MarkRecordPtr markArray; /* length = markCount */ - LigatureAttachPtr ligatureArray; /* length = ligatureCount */ -} -Pos51, *Pos51Ptr; - -typedef struct -{ - USHORT lookupType; /* = 6 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr mark1Coverage; - CoveragePtr mark2Coverage; - USHORT mark1Count; - USHORT mark2Count; - USHORT classCount; - MarkRecordPtr mark1Array; /* length = mark1Count */ - AnchorPtr *mark2Array; /* length = mark2Count * classCount */ -} -Pos61, *Pos61Ptr; - -#define Pos71Ptr OtfCtx1Ptr -#define Pos72Ptr OtfCtx2Ptr -#define Pos73Ptr OtfCtx3Ptr -#define Pos81Ptr OtfChn1Ptr -#define Pos82Ptr OtfChn2Ptr -#define Pos83Ptr OtfChn3Ptr - -typedef union -{ - Pos11Ptr pos11; - Pos12Ptr pos12; - Pos21Ptr pos21; - Pos22Ptr pos22; - Pos31Ptr pos31; - Pos41Ptr pos41; - Pos51Ptr pos51; - Pos61Ptr pos61; - Pos71Ptr pos71; - Pos72Ptr pos72; - Pos73Ptr pos73; - Pos81Ptr pos81; - Pos82Ptr pos82; - Pos83Ptr pos83; -} -PosLookupPtr; - -#endif /* __TTF_GPOS_H */ diff --git a/Build/source/texk/ttfdump/include/gstate.h b/Build/source/texk/ttfdump/include/gstate.h deleted file mode 100644 index b1ed1f840d7..00000000000 --- a/Build/source/texk/ttfdump/include/gstate.h +++ /dev/null @@ -1,86 +0,0 @@ -/* gstate.h -- define data structures for Graphics State, graphics states are - * mananged by font instructions. - * Copyright (C) 1996 Li-Da Lho, All right reserved. - */ - -#ifndef __TTF_GSTATE_H -#define __TTF_GSTATE_H - -/* $Id: gstate.h,v 1.2 1998/07/06 06:07:01 werner Exp $ */ - -/* unit vectors used for directional purposes */ -#define F2Dot14_ONE 1<<14 -#define F2Dot14_EPSILON 1 - -#define F26Dot6_ONE 1L<<26 -#define F26Dot6_EPSILON 1L - -typedef struct -{ - F2Dot14 x; - F2Dot14 y; -} -TTFUnitVector; - -/* Unit vectors pointing into x and y direction */ -#define UnitX {F2Dot14_ONE,0} -#define UnitY {0,F2Dot14_ONE} - -/* vectors used as positional vectors */ -typedef struct -{ - F26Dot6 x; - F26Dot6 y; -} -TTFVector; - -/* the types of the following fields are not well defined in the True Type - * Font specification. - * We can define them as we like. - */ -typedef struct -{ - /* boolean values */ - BYTE auto_flip; - - BYTE scan_control; - USHORT instruction_control; - SHORT round_state; - - F26Dot6 control_value_cut_in; - F26Dot6 minimum_distance; - F26Dot6 single_width_cut_in; - FWord single_width_value; - - ULONG delta_base; - ULONG delta_shift; - - /* unit vectors */ - TTFUnitVector dual_projection_vector; - TTFUnitVector freedom_vector; - TTFUnitVector projection_vector; - - /* reference points */ - ULONG rp0; - ULONG rp1; - ULONG rp2; - - /* zone pointers: take only 0 or 1 as values */ - ULONG zp0; - ULONG zp1; - ULONG zp2; - - SHORT gep0; - SHORT gep1; - SHORT gep2; - - ULONG loop; -} -GraphicsState; - -#define GS_DEFAULT - -#endif /* __TTF_GSTATE_H */ - - -/* end of gstate.h */ diff --git a/Build/source/texk/ttfdump/include/gsub.h b/Build/source/texk/ttfdump/include/gsub.h deleted file mode 100644 index 725d60e8cde..00000000000 --- a/Build/source/texk/ttfdump/include/gsub.h +++ /dev/null @@ -1,134 +0,0 @@ -/* gsub.h -- define data structures for Glyph Substitution Table - */ - -#ifndef __TTF_GSUB_H -#define __TTF_GSUB_H - -/* Substitution LookupType Values */ -#define SubLookup_Single 1 -#define SubLookup_Multiple 2 -#define SubLookup_Alternate 3 -#define SubLookup_Ligature 4 -#define SubLookup_Context 5 -#define SubLookup_ChainingContext 6 -#define SubLookup_ExtensionSubstitution 7 -#define SubLookup_ReverseChainingContextSingle 8 -#define SubLookup_Max 8 - -typedef struct -{ - USHORT lookupType; /* = 1 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - SHORT deltaGlyphID; -} -Sub11, *Sub11Ptr; - -typedef struct -{ - USHORT lookupType; /* = 1 */ - USHORT lookupFormat; /* = 2 */ - CoveragePtr coverage; - USHORT glyphCount; - USHORT *substitute; /* length = glyphCount */ -} -Sub12, *Sub12Ptr; - -typedef struct -{ - USHORT glyphCount; - USHORT *substitute; /* length = glyphCount */ -} -Sequence, *SequencePtr; - -typedef struct -{ - USHORT lookupType; /* = 2 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT sequenceCount; - SequencePtr sequence; /* length = sequenceCount */ -} -Sub21, *Sub21Ptr; - -typedef struct -{ - USHORT glyphCount; - USHORT *alternate; /* length = glyphCount */ -} -AlternateSet, *AlternateSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 3 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT alternateSetCount; - AlternateSetPtr alternateSet; /* length = alternateSetCount */ -} -Sub31, *Sub31Ptr; - -typedef struct -{ - USHORT ligGlyph; - USHORT compCount; - USHORT *component; /* length = compCount - 1 */ -} -Ligature, *LigaturePtr; - -typedef struct -{ - USHORT ligatureCount; - LigaturePtr ligature; /* length = ligatureCount */ -} -LigatureSet, *LigatureSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 4 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT ligSetCount; - LigatureSetPtr ligatureSet; /* length = ligSetCount */ -} -Sub41, *Sub41Ptr; - -#define Sub51Ptr OtfCtx1Ptr -#define Sub52Ptr OtfCtx2Ptr -#define Sub53Ptr OtfCtx3Ptr -#define Sub61Ptr OtfChn1Ptr -#define Sub62Ptr OtfChn2Ptr -#define Sub63Ptr OtfChn3Ptr - -typedef struct -{ - USHORT lookupType; /* = 8 */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT backtrackGlyphCount; - CoveragePtr *backtrack; /* length = backtrackGlyphCount */ - USHORT lookaheadGlyphCount; - CoveragePtr *lookahead; /* length = lookaheadGlyphCount */ - USHORT glyphCount; - USHORT *substitute; /* length = glyphCount */ -} -Sub81, *Sub81Ptr; - -typedef union -{ - Sub11Ptr sub11; - Sub12Ptr sub12; - Sub21Ptr sub21; - Sub31Ptr sub31; - Sub41Ptr sub41; - Sub51Ptr sub51; - Sub52Ptr sub52; - Sub53Ptr sub53; - Sub61Ptr sub61; - Sub62Ptr sub62; - Sub63Ptr sub63; - Sub81Ptr sub81; -} -SubLookupPtr; - -#endif /* __TTF_SUB_H */ diff --git a/Build/source/texk/ttfdump/include/loadtable.h b/Build/source/texk/ttfdump/include/loadtable.h deleted file mode 100644 index f44c12dc69c..00000000000 --- a/Build/source/texk/ttfdump/include/loadtable.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef __TTF_LOADTABLE_H -#define __TTF_LOADTABLE_H - -#include "tables.h" - -/* $Id: loadtable.h,v 1.2 1998/07/06 06:07:01 werner Exp $ */ - -void ttfLoadRequiredTables(TTFontPtr font); -void ttfFreeRequiredTables(TTFontPtr font); -void ttfLoadOptionalTables(TTFontPtr font); -void ttfFreeOptionalTables(TTFontPtr font); -void ttfLoadOpenTypeTables(TTFontPtr font); -void ttfFreeOpenTypeTables(TTFontPtr font); - -void ttfInitTableDir(TTFontPtr font, ULONG offset); -void ttfPrintTableDir(FILE *fp, TableDirPtr p); -void ttfFreeTableDir(TableDirPtr p); -TableDirPtr ttfLookUpTableDir(ULONG tag, TTFontPtr font); - -void ttfInitCMAP(TTFontPtr font); -void ttfPrintCMAP(FILE *fp, CMAPPtr cmap); -USHORT ttfLookUpCMAP(MapPtr map, USHORT cc); -void ttfFreeCMAP(CMAPPtr cmap); - -void ttfInitGLYF(TTFontPtr font); -void ttfLoadGLYF(FILE *fp, GLYFPtr glyf, ULONG offset); -void ttfPrintGLYF(FILE *fp, GLYFPtr glyf); -void ttfFreeGLYF(GLYFPtr glyf); -GLYFPtr ttfLoadGlyphIndex(TTFont * font, USHORT idx); -GLYFPtr ttfLoadGlyphCode(TTFont * fnt, USHORT cc); - -void ttfInitGlyphCache(TTFontPtr font); -void ttfCleanUpGlyphCache(TTFontPtr font); -GLYFPtr ttfLoadGlyphCached(TTFontPtr font, ULONG offset); - -void ttfInitHEAD(TTFontPtr font); -void ttfPrintHEAD(FILE *, HEADPtr head); -void ttfFreeHEAD(HEADPtr head); - -void ttfInitHHEA(TTFontPtr font); -void ttfPrintHHEA(FILE *fp, HHEAPtr hhea); -void ttfFreeHHEA(HHEAPtr hhea); - -void ttfInitHMTX(TTFontPtr font); -void ttfPrintHMTX(FILE *fp, HMTXPtr hmtx); -void ttfFreeHMTX(HMTXPtr hmtx); - -void ttfInitLOCA(TTFontPtr font); -void ttfPrintLOCA(FILE *fp, LOCAPtr loca); -void ttfFreeLOCA(LOCAPtr loca); -ULONG ttfLookUpGlyfLOCA(LOCAPtr loca, USHORT idx); - -void ttfInitMAXP(TTFontPtr font); -void ttfPrintMAXP(FILE *fp, MAXPPtr maxp); -void ttfFreeMAXP(MAXPPtr maxp); - -void ttfInitNAME(TTFontPtr font); -void ttfPrintNAME(FILE *fp, NAMEPtr name); -void ttfFreeNAME(NAMEPtr name); - -void ttfInitPOST(TTFontPtr fot); -void ttfPrintPOST(FILE *fp, POSTPtr post); -void ttfFreePOST(POSTPtr post); - -void ttfInitOS2(TTFontPtr font); -void ttfPrintOS2(FILE *fp, OS_2Ptr os2); -void ttfFreeOS2(OS_2Ptr os2); - -void ttfInitCVT(TTFontPtr font); -void ttfPrintCVT(FILE *fp, FWord * cvt, USHORT cvtLength); -void ttfFreeCVT(FWord * cvt); - -void ttfInitFPGM(TTFontPtr font); -void ttfPrintFPGM(FILE *fp, BYTE * fpgm, USHORT length); -void ttfFreeFPGM(BYTE * fpgm); - -void ttfInitGASP(TTFontPtr font); -void ttfPrintGASP(FILE *fp, GASPPtr gasp); -void ttfFreeGASP(GASPPtr gasp); - -void ttfInitHDMX(TTFontPtr font); -void ttfPrintHDMX(FILE *fp, HDMXPtr hdmx); -void ttfFreeHDMX(HDMXPtr hdmx); - -void ttfInitPREP(TTFontPtr font); -void ttfPrintPREP(FILE *fp, BYTE * prep, USHORT length); -void ttfFreePREP(BYTE * prep); - -void ttfInitLTSH(TTFontPtr font); -void ttfPrintLTSH(FILE *fp, LTSHPtr ltsh); -void ttfFreeLTSH(LTSHPtr ltsh); - -void ttfInitVDMX(TTFontPtr font); -void ttfPrintVDMX(FILE *fp, VDMXPtr vdmx); -void ttfFreeVDMX(VDMXPtr vdmx); - -ScriptListPtr otfMakeScriptList(FILE *fp, ULONG offset); -void otfPrintScriptList(FILE *fp, ScriptListPtr scriptList); -void otfFreeScriptList(ScriptListPtr scriptList); - -FeatureListPtr otfMakeFeatureList(FILE *fp, ULONG offset); -void otfPrintFeatureList(FILE *fp, FeatureListPtr featureList); -void otfFreeFeatureList(FeatureListPtr featureList); - -LookupListPtr otfMakeLookupList(FILE *fp, ULONG offset, MakeLookupFunc makeLookup); -void otfPrintLookupList(FILE *fp, LookupListPtr lookupList, PrintLookupFunc printLookup); -void otfFreeLookupList(LookupListPtr lookupList, FreeLookupFunc freeLookup); - -CoveragePtr otfMakeCoverage(FILE *fp, ULONG offset); -void otfPrintCoverage(FILE *fp, CoveragePtr coverage); -void otfFreeCoverage(CoveragePtr coverage); - -ClassDefPtr otfMakeClassDef(FILE *fp, ULONG offset); -void otfPrintClassDef(FILE *fp, ClassDefPtr classDef); -void otfFreeClassDef(ClassDefPtr classDef); - -DevicePtr otfMakeDevice(FILE *fp, ULONG offset); -void otfPrintDevice(FILE *fp, DevicePtr device); - -void ttfInitGPOS(TTFontPtr font); -void ttfPrintGPOS(FILE *fp, GPOSPtr gpos); -void ttfFreeGPOS(GPOSPtr gpos); - -void ttfInitGSUB(TTFontPtr font); -void ttfPrintGSUB(FILE *fp, GSUBPtr gsub); -void ttfFreeGSUB(GSUBPtr gsub); - -void ttfInitGraphicsState(TTFontPtr font); -void ttfInitStack(TTFontPtr font); -void ttfInitStorageArea(TTFontPtr font); - -void ttfPrintInstructions(FILE *fp, BYTE * ins); - -#endif /* __TTF_LOADTABLE_H */ - - -/* end of loadtable.h */ diff --git a/Build/source/texk/ttfdump/include/os2_P.h b/Build/source/texk/ttfdump/include/os2_P.h deleted file mode 100644 index c6295aa8220..00000000000 --- a/Build/source/texk/ttfdump/include/os2_P.h +++ /dev/null @@ -1,197 +0,0 @@ -/* Private header file for os2.c */ -#ifdef __TTF_OS2 -#ifndef __TTF_OS2_H -#define __TTF_OS2_H - -static const char *WeightClassName[] = -{ - "Thin", /* Ultra-light */ - "Extra-light", - "Light", - "Normal", /* Semi-light */ - "Medium", - "Semi-bold", - "Bold", - "Extra-Bold", - "Black" /* Ultra-bold */ -}; - -static const char *WidthClassName[] = -{ - "Ultra-condensed", - "Extra-condensed", - "Condensed", - "Semi-condensed", - "Medium", - "Semi-expanded", - "Expanded", - "Extra-expanded", - "Ultra-expanded" -}; - -static const char *PanoseFamily[] = -{ - "Any", - "No Fit", - "Text and Display", - "Script", - "Decorative", - "Pictorial" -}; - -static const char *PanoseSerif[] = -{ - "Any", - "No Fit", - "Cove", - "Obtuse Cove", - "Square Cove", - "Obtuse Square Cove", - "Square", - "Thin", - "Bone", - "Exaggerated", - "Triangle", - "Normal Sans", - "Obtuse Sans", - "Perp Sans", - "Flared", - "Rounded" -}; - -static const char *PanoseWeight[] = -{ - "Any", - "No Fit", - "Very Light", - "Ligth", - "Thin", - "Book", - "Medium", - "Demi", - "Bold", - "Heavy", - "Black", - "Nord", -}; - -static const char *PanoseProportion[] = -{ - "Any", - "No Fit", - "Old Style", - "Modern", - "Even Width", - "Expanded", - "Condensed", - "Very Expanded", - "Very Condensed", - "Monospaced" -}; - -static const char *PanoseContrast[] = -{ - "Any", - "No Fit", - "None", - "Very Low", - "Low", - "Medium Low", - "Medium", - "Medium High", - "High", - "Very High", -}; - -static const char *PanoseStroke[] = -{ - "Any", - "No Fit", - "Gradual/Diagonal", - "Gradual/Transitional", - "Gradual/Vertical", - "Gradual/Horizontal", - "Rapid/Vertical", - "Rapid/Horizontal", - "Rapid/Vertical" -}; - -static const char *PanoseArm[] = -{ - "Any", - "No Fit" - "Straight Arms/Horizontal", - "Straight Arms/Wedge", - "Straight Arms/Vertical", - "Straight Arms/Single Serif", - "Straight Arms/Double Serif", - "Non-Straight Arms/Horizontal", - "Non-Straight Arms/Wedge", - "Non-Straight Arms/Vertical", - "Non-Straight Arms/Single Serif", - "Non-Straight Arms/Double Serif" -}; - -static const char *PanoseLetterform[] = -{ - "Any", - "No Fit", - "Normal/Contact", - "Normal/Weighted", - "Normal/Boxed", - "Normal/Flttened", - "Normal/Rounded", - "Normal/Off Center", - "Normal/Square", - "Oblique/Contact", - "Oblique/Weighted", - "Oblique/Boxed", - "Oblique/Flattened", - "Oblique/Rounded", - "Oblique/Off Center", - "Oblique/Square" -}; - -static const char *PanoseMidline[] = -{ - "Any", - "No Fit", - "Standard/Trimmed", - "Standard/Pointed", - "Standard/Serifed", - "High/Trimmed", - "High/Pointed" - "High/Serifed", - "Constant/Trimmed", - "Constant/Pointed", - "Constant/Serifed", - "Low/Trimmed" - "Low/Pointed", - "Low/Serifed", -}; - -static const char *PanoseXHeight[] = -{ - "Any", - "No Fit", - "Constant/Small", - "Constant/Standard", - "Constant/Large", - "Ducking/Small", - "Ducking/Standard", - "Ducking/Large" -}; - -#define FS_FLAGS_ITALIC 0x01 -#define FS_FLAGS_UNDERSCORE 0x02 -#define FS_FLAGS_NEGATIVE 0x04 -#define FS_FLAGS_OUTLINED 0x08 -#define FS_FLAGS_STRIKEOUT 0x10 -#define FS_FLAGS_BOLD 0x20 -#define FS_FLAGS_REGULAR 0x40 - -#endif /* __TTF_OS2_H */ -#endif /* __TTF_OS2 */ - - -/* end of os2_P.h */ diff --git a/Build/source/texk/ttfdump/include/otftables.h b/Build/source/texk/ttfdump/include/otftables.h deleted file mode 100644 index 5a6cc54c57e..00000000000 --- a/Build/source/texk/ttfdump/include/otftables.h +++ /dev/null @@ -1,368 +0,0 @@ -/* otftables.h -- define data structures for various OpenType Tables - * See Also: OpenType Specification - */ - -#ifndef __TTF_OTFTABLES_H -#define __TTF_OTFTABLES_H - -typedef struct -{ - USHORT reqFeatureIndex; - USHORT featureCount; - USHORT *featureIndex; /* length = featureCount */ -} -LangSys, *LangSysPtr; - -typedef struct -{ - ULONG tag; - LangSysPtr langSys; -} -LangSysRecord, *LangSysRecordPtr; - -typedef struct -{ - ULONG tag; - LangSysPtr defaultLangSys; - USHORT langSysCount; - LangSysRecord *langSysRecord; /* length = langSysCount */ -} -ScriptRecord, *ScriptRecordPtr; - -typedef struct -{ - USHORT scriptCount; - ScriptRecord *scriptRecord; /* length = scriptCount */ -} -ScriptList, *ScriptListPtr; - -typedef struct -{ - ULONG tag; - USHORT featureParams; - USHORT lookupCount; - USHORT *lookupListIndex; /* length = lookupCount */ -} -FeatureRecord, *FeatureRecordPtr; - -typedef struct -{ - USHORT featureCount; - FeatureRecord *featureRecord; /* length = featureCount */ -} -FeatureList, *FeatureListPtr; - -typedef struct -{ - USHORT start; - USHORT end; - USHORT startCoverageIndex; -} -RangeRecord, *RangeRecordPtr; - -typedef struct -{ - USHORT coverageFormat; /* = 1 */ - USHORT glyphCount; - USHORT *glyphArray; /* length = glyphCount */ -} -Coverage1, *Coverage1Ptr; - -typedef struct -{ - USHORT coverageFormat; /* = 2 */ - USHORT rangeCount; - RangeRecordPtr rangeRecord; /* length = rangeCount */ -} -Coverage2, *Coverage2Ptr; - -typedef union -{ - USHORT *format; - Coverage1Ptr coverage1; - Coverage2Ptr coverage2; -} -CoveragePtr; - -typedef struct -{ - USHORT start; - USHORT end; - USHORT classValue; -} -ClassRangeRecord, *ClassRangeRecordPtr; - -typedef struct -{ - USHORT classFormat; /* = 1 */ - USHORT startGlyph; - USHORT glyphCount; - USHORT *classValueArray; /* length = glyphCount */ -} -ClassDef1, *ClassDef1Ptr; - -typedef struct -{ - USHORT classFormat; /* = 2 */ - USHORT classRangeCount; - ClassRangeRecordPtr classRangeRecord; /* length = classRangeCount */ -} -ClassDef2, *ClassDef2Ptr; - -typedef union -{ - USHORT *format; - ClassDef1Ptr classDef1; - ClassDef2Ptr classDef2; -} -ClassDefPtr; - -typedef struct -{ - USHORT startSize; - USHORT endSize; - USHORT deltaFormat; /* = 1, 2, or 3 */ - USHORT deltaValue[1]; /* variable size - * (endSize-startSize+1) entries - * 8, 4, or 2 entries per array element */ -} -Device, *DevicePtr; - -typedef struct -{ - USHORT sequenceIndex; - USHORT lookupListIndex; -} -OtfLookupRecord, *OtfLookupRecordPtr; - -typedef struct -{ - USHORT glyphCount; - USHORT otfCount; - USHORT *input; /* length = glyphCount - 1 */ - OtfLookupRecordPtr otf; /* length = otfCount */ -} -OtfRule, *OtfRulePtr; - -typedef struct -{ - USHORT otfRuleCount; - OtfRulePtr otfRule; /* length = otfRuleCount */ -} -OtfRuleSet, *OtfRuleSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 7 (GPOS) or 5 (GSUB) */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT otfRuleSetCount; - OtfRuleSetPtr otfRuleSet; /* length = otfRuleSetCount */ -} -OtfCtx1, *OtfCtx1Ptr; - -OtfCtx1Ptr makeOTFCtx1 (FILE *fp, ULONG offset); -void printOTFCtx1 (FILE *fp, OtfCtx1Ptr otf); -void freeOTFCtx1 (OtfCtx1Ptr otf); - -typedef struct -{ - USHORT glyphCount; - USHORT otfCount; - USHORT *class; /* length = glyphCount - 1 */ - OtfLookupRecordPtr otf; /* length = otfCount */ -} -OtfClassRule, *OtfClassRulePtr; - -typedef struct -{ - USHORT otfClassRuleCnt; - OtfClassRulePtr otfClassRule; /* length = otfClassRuleCnt */ -} -OtfClassSet, *OtfClassSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 7 (GPOS) or 5 (GSUB) */ - USHORT lookupFormat; /* = 2 */ - CoveragePtr coverage; - ClassDefPtr classDef; - USHORT otfClassSetCnt; - OtfClassSetPtr otfClassSet; /* length = otfClassSetCnt */ -} -OtfCtx2, *OtfCtx2Ptr; - -OtfCtx2Ptr makeOTFCtx2 (FILE *fp, ULONG offset); -void printOTFCtx2 (FILE *fp, OtfCtx2Ptr otf); -void freeOTFCtx2 (OtfCtx2Ptr otf); - -typedef struct -{ - USHORT lookupType; /* = 7 (GPOS) or 5 (GSUB) */ - USHORT lookupFormat; /* = 3 */ - USHORT glyphCount; - USHORT otfCount; - CoveragePtr *glyphs; /* length = glyphCount */ - OtfLookupRecordPtr otf; /* length = otfCount */ -} -OtfCtx3, *OtfCtx3Ptr; - -OtfCtx3Ptr makeOTFCtx3 (FILE *fp, ULONG offset); -void printOTFCtx3 (FILE *fp, OtfCtx3Ptr otf); -void freeOTFCtx3 (OtfCtx3Ptr otf); - -typedef struct -{ - USHORT backtrackGlyphCount; - USHORT *backtrack; /* length = backtrackGlyphCount */ - USHORT inputGlyphCount; - USHORT *input; /* length = inputGlyphCount - 1 */ - USHORT lookaheadGlyphCount; - USHORT *lookahead; /* length = lookaheadGlyphCount */ - USHORT otfCount; - OtfLookupRecordPtr otf; /* length = otfCount */ -} -ChainOtfRule, *ChainOtfRulePtr; - -typedef struct -{ - USHORT chainOtfRuleCount; - ChainOtfRulePtr chainOtfRule; /* length = chainOtfRuleCount */ -} -ChainOtfRuleSet, *ChainOtfRuleSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 8 (GPOS) or 6 (GSUB) */ - USHORT lookupFormat; /* = 1 */ - CoveragePtr coverage; - USHORT chainOtfRuleSetCount; - ChainOtfRuleSetPtr chainOtfRuleSet; /* length = chainOtfRuleSetCount */ -} -OtfChn1, *OtfChn1Ptr; - -OtfChn1Ptr makeOTFChn1 (FILE *fp, ULONG offset); -void printOTFChn1 (FILE *fp, OtfChn1Ptr otf); -void freeOTFChn1 (OtfChn1Ptr otf); - -typedef struct -{ - USHORT backtrackGlyphCount; - USHORT *backtrack; /* length = backtrackGlyphCount */ - USHORT inputGlyphCount; - USHORT *input; /* length = inputGlyphCount - 1 */ - USHORT lookaheadGlyphCount; - USHORT *lookahead; /* length = lookaheadGlyphCount */ - USHORT otfCount; - OtfLookupRecordPtr otf; /* length = otfCount */ -} -ChainOtfClassRule, *ChainOtfClassRulePtr; - -typedef struct -{ - USHORT chainOtfClassRuleCnt; - ChainOtfClassRulePtr chainOtfClassRule; /* length = chainOtfClassRuleCnt */ -} -ChainOtfClassSet, *ChainOtfClassSetPtr; - -typedef struct -{ - USHORT lookupType; /* = 8 (GPOS) or 6 (GSUB) */ - USHORT lookupFormat; /* = 2 */ - CoveragePtr coverage; - ClassDefPtr backtrackClassDef; - ClassDefPtr inputClassDef; - ClassDefPtr lookaheadClassDef; - USHORT chainOtfClassSetCnt; - ChainOtfClassSetPtr chainOtfClassSet; /* length = chainOtfClassSetCnt */ -} -OtfChn2, *OtfChn2Ptr; - -OtfChn2Ptr makeOTFChn2 (FILE *fp, ULONG offset); -void printOTFChn2 (FILE *fp, OtfChn2Ptr otf); -void freeOTFChn2 (OtfChn2Ptr otf); - -typedef struct -{ - USHORT lookupType; /* = 8 (GPOS) or 6 (GSUB) */ - USHORT lookupFormat; /* = 3 */ - USHORT backtrackGlyphCount; - CoveragePtr *backtrack; /* length = backtrackGlyphCount */ - USHORT inputGlyphCount; - CoveragePtr *input; /* length = inputGlyphCount */ - USHORT lookaheadGlyphCount; - CoveragePtr *lookahead; /* length = lookaheadGlyphCount */ - USHORT otfCount; - OtfLookupRecordPtr otf; /* length = otfCount */ -} -OtfChn3, *OtfChn3Ptr; - -OtfChn3Ptr makeOTFChn3 (FILE *fp, ULONG offset); -void printOTFChn3 (FILE *fp, OtfChn3Ptr otf); -void freeOTFChn3 (OtfChn3Ptr otf); - -#include "gpos.h" -#include "gsub.h" - -typedef struct -{ - USHORT lookupType; - USHORT lookupFormat; -} -OtfLookup, *OtfLookupPtr; - -typedef union -{ - OtfLookupPtr otf; - PosLookupPtr pos; - SubLookupPtr sub; -} -LookupPtr; - -typedef struct -{ - USHORT lookupFlag; - USHORT subTableCount; - USHORT markFilteringSet; - LookupPtr *lookup; /* length = subTableCount */ -} LookupRecord, *LookupRecordPtr; - -/* LookupFlag Bits */ -#define LookupFlag_RightToLeft 0x0001 -#define lookupFlag_IgnoreBaseGlyphs 0x0002 -#define lookupFlag_IgnoreLigatures 0x0004 -#define lookupFlag_IgnoreMarks 0x0008 -#define lookupFlag_UseMarkFilteringSet 0x0010 -#define lookupFlag_Reserved 0x00e0 -#define lookupFlag_MarkAttachmentType 0xff00 - -typedef struct -{ - USHORT lookupCount; - LookupRecord *lookupRecord; -} -LookupList, *LookupListPtr; - -typedef LookupPtr (MakeLookupFunc) (FILE *fp, USHORT lookupType, ULONG offset); -typedef void (PrintLookupFunc) (FILE *fp, LookupPtr lookup); -typedef void (FreeLookupFunc) (LookupPtr lookup); - -typedef struct -{ - Fixed version; - ScriptListPtr scriptList; - FeatureListPtr featureList; - LookupListPtr lookupList; -} -GPOS, *GPOSPtr; - -typedef struct -{ - Fixed version; - ScriptListPtr scriptList; - FeatureListPtr featureList; - LookupListPtr lookupList; -} -GSUB, *GSUBPtr; - -#endif /* __TTF_OTFTABLES_H */ diff --git a/Build/source/texk/ttfdump/include/protos.h b/Build/source/texk/ttfdump/include/protos.h deleted file mode 100644 index b1ccb2923d4..00000000000 --- a/Build/source/texk/ttfdump/include/protos.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __PROTOS_H -#define __PROTOS_H - -extern void ttfInitKERN(TTFontPtr); -extern void ttfInitPCLT(TTFontPtr); -extern void ttfInitVHEA(TTFontPtr); -extern void ttfInitVMTX(TTFontPtr); -extern void ttfFreeKERN(KERNPtr); -extern void ttfFreePCLT(PCLTPtr); -extern void ttfFreeVHEA(VHEAPtr); -extern void ttfFreeVMTX(VMTXPtr); -extern void ttfPrintKERN(FILE*, KERNPtr); -extern void ttfPrintPCLT(FILE*, PCLTPtr); -extern void ttfPrintVHEA(FILE*, VHEAPtr); -extern void ttfPrintVMTX(FILE*, VMTXPtr); -extern BYTE ttfGetBYTE(FILE*); - -#endif diff --git a/Build/source/texk/ttfdump/include/stack.h b/Build/source/texk/ttfdump/include/stack.h deleted file mode 100644 index 04e9bdc98ce..00000000000 --- a/Build/source/texk/ttfdump/include/stack.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __TTF_STACK_H -#define __TTF_STACK_H - -extern BYTE GetBYTE(VirtualMachine *); -extern SHORT GetSHORT(VirtualMachine *); -extern void Push(VirtualMachine *, LONG); -extern LONG Pop(VirtualMachine *); - -#endif /* __TTF_STACK_H */ diff --git a/Build/source/texk/ttfdump/include/tables.h b/Build/source/texk/ttfdump/include/tables.h deleted file mode 100644 index 027ac51b1c4..00000000000 --- a/Build/source/texk/ttfdump/include/tables.h +++ /dev/null @@ -1,686 +0,0 @@ -/* tables.h -- define data structures for various ttf file internal tables - * See Also: True Type Font Specification - */ - -#ifndef __TTF_TABLES_H -#define __TTF_TABLES_H - -/* $Id: tables.h,v 1.2 1998/07/06 06:07:01 werner Exp $ */ - -/* Offset Table: - * Into the beginning of a True Type font file - */ -typedef struct -{ - Fixed version; - USHORT numTables; - USHORT searchRange; - USHORT entrySelector; - USHORT rangeShift; -} -OffsetTable, *OffsetTablePtr; - -/* Table Directory: - * The directory to find each table in a True Type font file - */ -typedef struct -{ - ULONG tag; - ULONG checksum; - ULONG offset; - ULONG length; -} -TableDir, *TableDirPtr; - - -/* cmap: Character to Glyph Index Mapping Table - * There are nine kinds of cmap, format 0, 2, 4, 6, 8, 10, 12, - * 13, and 14. They are defined as follows - */ -typedef struct -{ - USHORT format; /* = 0 */ - USHORT length; - USHORT version; - BYTE glyphIndexArray[256]; -} -CMAP0; - -typedef struct -{ - USHORT firstCode; - USHORT entryCount; - SHORT idDelta; - USHORT idRangeOffset; -} -SubHeader, *SubHeaderPtr; - -typedef struct -{ - USHORT format; /* = 2 */ - USHORT length; - USHORT version; - USHORT subHeaderKeys[256]; - SubHeaderPtr subHeaders; - USHORT *glyphIndexArray; -} -CMAP2; - -typedef struct -{ - USHORT format; /* = 4 */ - USHORT length; - USHORT version; - USHORT segCountX2; - USHORT searchRange; - USHORT entrySelector; - USHORT rangeShift; - USHORT *endCount; - USHORT reservedPad; - USHORT *startCount; - USHORT *idDelta; - USHORT *idRangeOffset; - USHORT *glyphIndexArray; -} -CMAP4; - -typedef struct -{ - USHORT format; /* = 6 */ - USHORT length; - USHORT version; - USHORT firstCode; - USHORT entryCount; - USHORT *glyphIndexArray; -} -CMAP6; - -typedef struct -{ - ULONG startCharCode; - ULONG endCharCode; - ULONG startGlyphID; -} -CharGroup, *CharGroupPtr; - -typedef struct -{ - USHORT format; /* = 8 */ - ULONG length; - ULONG version; - BYTE is32[8192]; - ULONG nGroups; - CharGroupPtr charGroup; /* size = nGroups */ -} -CMAP8; - -typedef struct -{ - USHORT format; /* = 10 */ - ULONG length; - ULONG version; - ULONG startCharCode; - ULONG numChars; - USHORT *glyphs; -} -CMAP10; - -typedef struct -{ - USHORT format; /* = 12 */ - ULONG length; - ULONG version; - ULONG nGroups; - CharGroupPtr charGroup; /* size = nGroups */ -} -CMAP12; - -typedef struct -{ - USHORT format; /* = 13 */ - ULONG length; - ULONG version; - ULONG nGroups; - CharGroupPtr charGroup; /* size = nGroups */ -} -CMAP13; - -typedef struct -{ - int notYet; -} -VarSelRec, *VarSelRecPtr; - -typedef struct -{ - USHORT format; /* = 14 */ - ULONG length; - ULONG numVarSelRec; - VarSelRecPtr varSelRec; /* size = numVarSelRec */ -} -CMAP14; - -typedef union -{ - USHORT *format; - CMAP0 *cmap0; - CMAP2 *cmap2; - CMAP4 *cmap4; - CMAP6 *cmap6; - CMAP8 *cmap8; - CMAP10 *cmap10; - CMAP12 *cmap12; - CMAP13 *cmap13; - CMAP14 *cmap14; -} -MapPtr; - -/* Encoding: one for each encoding scheme */ -typedef struct -{ - /* encoding table */ - USHORT PlatformID; - USHORT EncodingID; - ULONG offset; - USHORT mapindex; - MapPtr map; -} -Encoding, *EncodingPtr; - -typedef struct -{ - ULONG offset; - MapPtr map; -} -SubTable, *SubTablePtr; - -typedef struct -{ - USHORT version; - USHORT numberOfEncodings; - USHORT numberOfMaps; - EncodingPtr encoding; /* size = numberOfEncodings */ - SubTablePtr subTable; /* size = numberOfMaps */ -} -CMAP, *CMAPPtr; - -/* glyf: Glyph Data table - * It is necessary to load "loca" table first to know where to load a specific - * glyph; the "loca" table itself depends on "head" and "maxp" tables - */ -typedef F2Dot14 SCALE; - -typedef struct -{ - F2Dot14 xscale; - F2Dot14 yscale; -} -VECTOR; - -typedef struct -{ - F2Dot14 xscale; - F2Dot14 scale01; - F2Dot14 scale10; - F2Dot14 yscale; -} -TENSOR; - -typedef struct -{ - SHORT args[2]; /* need reconsideration */ - union - { - SCALE scale; - VECTOR vector; - TENSOR tensor; - } - transform; -} -CompositeData; - -typedef struct _component -{ - USHORT flags; - USHORT glyphIndex; - CompositeData data; - struct _component *next, *previous; /* linked list used, no way to know - * how many components in advance */ -} -Component; - -typedef struct -{ - SHORT numberOfContours; - FWord xMin; - FWord yMin; - FWord xMax; - FWord yMax; - /* simple glyph data */ - USHORT *endPtsOfContours; /* size = numberOfContours */ - USHORT instructionLength; - BYTE *instructions; /* size = instructionLength */ - BYTE *flags; /* size = the total # of x,y - * coordinates, i.e. last number - * of endPtsOfContour */ - SHORT *xCoordinates; - SHORT *yCoordinates; - Component *comp; /* a pointer to a linked list of - * composite components */ -} -GLYF, *GLYFPtr; - -/* Flags for Coordinates */ -#define FLAGS_ON_CURVE 1 -#define FLAGS_X_SHORT_VECTOR 2 -#define FLAGS_Y_SHORT_VECTOR 4 -#define FLAGS_REPEAT 8 -#define FLAGS_X_SAME 0x10 -#define FLAGS_Y_SAME 0x20 - -/* Flags for Composite Glyph */ -#define ARG_1_AND_2_ARE_WORDS 0x001 -#define ARGS_ARE_XY_VALUES 0x002 -#define ROUND_XY_TO_GRID 0x004 -#define WE_HAVE_A_SCALE 0x008 -#define RESERVE 0x010 -#define NO_OVERLAP 0x010 -#define MORE_COMPONENT 0x020 -#define WE_HAVE_AN_X_AND_Y_SCALE 0x040 -#define WE_HAVE_A_TWO_BY_TWO 0x080 -#define WE_HAVE_INSTRUCTIONS 0x100 -#define USE_MY_METRICS 0x200 -#define OVERLAP_COMPOUND 0x400 /* from Apple's TTF specs */ - -typedef struct -{ - Fixed version; - Fixed fontRevision; - ULONG checkSumAdj; - ULONG magicNumber; - USHORT flags; - USHORT unitsPerEm; - ULONG created[2]; - ULONG modified[2]; - FWord xMin; - FWord yMin; - FWord xMax; - FWord yMax; - USHORT macStyle; - USHORT lowestRecPPEM; - SHORT fontDirectionHint; - SHORT indexToLocFormat; /* 0 => ushort, 1 => ulong */ - SHORT glyphDataFormat; -} -HEAD, *HEADPtr; - -#define FLAGS_Y_0 1 -#define FLAGS_X_0 2 -#define FLAGS_SIZE_DEP 4 -#define FLAGS_INT_PPEM 8 -#define FLAGS_ALT_WIDTH 0x10 -#define MAC_STYLE_BOLD 1 -#define MAC_STYLE_ITALIC 2 -#define FONT_DIR_MIX 0 -#define FONT_DIR_L2R 1 -#define FONT_DIR_L2R_NEUTRALS 2 -#define FONT_DIR_R2L -1 -#define FONT_DIR_R2L_NEUTRALS -2 -#define LOCA_OFFSET_SHORT 0 -#define LOCA_OFFSET_LONG 1 - -typedef struct -{ - Fixed version; - FWord Ascender; - FWord Descender; - FWord LineGap; - uFWord advanceWidthMax; - FWord minLeftSideBearing; - FWord minRightSideBearing; - FWord xMaxExtent; - SHORT caretSlopeRise; - SHORT caretSlopeRun; - SHORT reserved[5]; - SHORT metricDataFormat; - USHORT numberOfHMetrics; -} -HHEA, *HHEAPtr; - -/* for a new created HMTX, one have to fill numberofHMetrics manually for - * hhea */ -typedef struct -{ - uFWord advanceWidth; - FWord lsb; -} -longHorMetric; - -typedef struct -{ /* depends on hhea */ - USHORT numberOfHMetrics; /* defined in hhea */ - USHORT numberOfLSB; /* numGlyph - numberOfHMetrics */ - longHorMetric *hMetrics; - FWord *leftSideBearing; -} -HMTX, *HMTXPtr; - -/* for a newly created LOCA, one have to fill indexToLocFormat from head and - * numGlyphs from maxp manually */ -typedef struct -{ /* depends on head and maxp */ - SHORT indexToLocFormat; /* defined in head */ - USHORT numGlyphs; /* defined in maxp */ - ULONG *offset; -} -LOCA, *LOCAPtr; - -typedef struct -{ - Fixed version; - USHORT numGlyphs; - USHORT maxPoints; - USHORT maxContours; - USHORT maxCompositePoints; - USHORT maxCompositeContours; - USHORT maxZones; - USHORT maxTwilightPoints; - USHORT maxStorage; - USHORT maxFunctionDefs; - USHORT maxInstructionDefs; - USHORT maxStackElements; - USHORT maxSizeOfInstructions; - USHORT maxComponentElements; - USHORT maxComponentDepth; -} -MAXP, *MAXPPtr; - -typedef struct -{ - USHORT PlatformID; - USHORT EncodingID; - USHORT LanguageID; - USHORT NameID; - USHORT length; - USHORT offset; - char *data; -} -NameRecord, *NameRecordPtr; - -typedef struct -{ - USHORT format; - USHORT numberOfRecords; - USHORT offset; - NameRecordPtr NameRecords; -} -NAME, *NAMEPtr; - -typedef struct -{ - USHORT numGlyphs; /* Should be the same as numGlyphs defined in maxp */ - USHORT *glyphNameIndex; - CHAR **GlyphName; -} -Format20; - -typedef struct -{ - char *offset; -} -Format25; - -typedef struct -{ - Fixed format; - Fixed italicAngle; - FWord underlinePosition; - FWord underlineThickness; - ULONG isFixedPitch; - ULONG minMemType42; - ULONG maxMemType42; - ULONG minMemType1; - ULONG maxMemType1; - /* the elements below exist only for 2.0 and 2.5 format */ - union - { - Format20 *format20; - Format25 *format25; - } - name; -} -POST, *POSTPtr; - -typedef struct -{ - USHORT version; - SHORT xAvgCharWidth; - USHORT usWeightClass; - USHORT usWidthClass; - USHORT fsType; - SHORT ySubscriptXSize; - SHORT ySubscriptYSize; - SHORT ySubscriptXOffset; - SHORT ySubscriptYOffset; - SHORT ySuperscriptXSize; - SHORT ySuperscriptYSize; - SHORT ySuperscriptXOffset; - SHORT ySuperscriptYOffset; - SHORT yStrikeoutSize; - SHORT yStrikeoutPosition; - SHORT sFamilyClass; - CHAR panose[10]; - ULONG ulUnicodeRange1; - ULONG ulUnicodeRange2; - ULONG ulUnicodeRange3; - ULONG ulUnicodeRange4; - CHAR achVendID[5]; - USHORT fsSelection; - USHORT usFirstCharIndex; - USHORT usLastCharIndex; - SHORT sTypoAscender; - SHORT sTypoDescender; - SHORT sTypoLineGap; - USHORT usWinAscent; - USHORT usWinDescent; - /* only version 1 tables */ - ULONG ulCodePageRange1; - ULONG ulCodePageRange2; - /* only version 2 tables */ - SHORT sxHeight; - SHORT sCapHeight; - USHORT usDefaultChar; - USHORT usBreakChar; - USHORT usMaxContext; -} -OS_2, *OS_2Ptr; - -typedef struct -{ - USHORT rangeMaxPPEM; - USHORT rangeGaspBehavior; -} -GASPRANGE; - -typedef struct -{ - USHORT version; - USHORT numRanges; - GASPRANGE *gaspRange; /* length = numRanges */ -} -GASP, *GASPPtr; - -/* flags for gasp */ -#define GASP_GRIDFIT 0x0001 -#define GASP_DOGRAY 0x0002 - -typedef struct -{ - BYTE PixelSize; - BYTE MaxWidth; - BYTE *Width; /* length = numGlyphs */ -} -DeviceRecord; - -typedef struct -{ - USHORT numGlyphs; /* defined in maxp, artifitial */ - USHORT version; - SHORT numDevices; - LONG size; - DeviceRecord *Records; -} -HDMX, *HDMXPtr; - -typedef struct -{ - USHORT version; - USHORT length; - USHORT coverage; - union - { - struct - { - USHORT nPairs; - USHORT searchRange; - USHORT entrySelector; - USHORT rangeShift; - struct kernpair - { - USHORT left; - USHORT right; - FWord value; - } - *pairs; - } - kern0; - - struct - { - USHORT rowWidth; - USHORT leftClassTable; - USHORT rightClassTable; - USHORT array; - } - kern2; - } - kern; -} -KernSubtable; - -typedef struct -{ - USHORT version; - USHORT nTables; - KernSubtable *subtable; -} -KERN, *KERNPtr; - -typedef struct -{ - USHORT version; - USHORT numGlyphs; - BYTE *yPels; /* length = numGlyphs */ -} -LTSH, *LTSHPtr; - -typedef struct -{ - Fixed version; - ULONG FontNumber; - USHORT Pitch; - USHORT xHeight; - USHORT Style; - USHORT TypeFamily; - USHORT CapHeight; - USHORT SymbolSet; - CHAR Typeface[16]; - CHAR CharacterComplement[8]; - CHAR FileName[6]; - CHAR StrokeWeight; - CHAR WidthType; - BYTE SerifStyle; - BYTE reserved; -} -PCLT, *PCLTPtr; - -typedef struct -{ - BYTE CharSet; - BYTE xRatio; - BYTE yStartRatio; - BYTE yEndRatio; -} -Ratios; - -typedef struct -{ - USHORT yPelHeight; - SHORT yMax; - SHORT yMin; -} -vTable; - -typedef struct -{ - USHORT recs; - BYTE startsz; - BYTE endsz; - vTable *entry; -} -Vdmx; - -typedef struct -{ - USHORT version; - USHORT numRecs; - USHORT numRatios; - Ratios *ratRange; /* length = numRatios */ - USHORT *offset; /* length = numRatios */ - Vdmx *groups; -} -VDMX, *VDMXPtr; - -typedef struct -{ - Fixed version; - SHORT ascent; - SHORT descent; - SHORT lineGap; - SHORT advanceHeightMax; - SHORT minTopSideBearing; - SHORT minBottomSideBearing; - SHORT yMaxExtent; - SHORT caretSlopeRise; - SHORT caretSlopeRun; - SHORT caretOffset; - SHORT reserved[4]; - SHORT metricDataFormat; - USHORT numOfLongVerMetrics; -} -VHEA, *VHEAPtr; - -typedef struct -{ - uFWord advanceHeight; - FWord topSideBearing; -} -longVerMetric; - -typedef struct -{ - /* depends on vhea */ - USHORT numOfLongVerMetrics; /* defined in vhea */ - USHORT numOfTSB; /* numGlyph - numberOfHMetrics */ - longVerMetric *vMetrics; - FWord *topSideBearing; -} -VMTX, *VMTXPtr; - -/* Additional OpenType Tables */ -#include "otftables.h" - -#endif /* __TTF_TABLES_H */ - - -/* end of tables.h */ diff --git a/Build/source/texk/ttfdump/include/ttc.h b/Build/source/texk/ttfdump/include/ttc.h deleted file mode 100644 index 1dfce3a113c..00000000000 --- a/Build/source/texk/ttfdump/include/ttc.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __TTF_TTC_H -#define __TTF_TTC_H - -/* $Id: ttc.h,v 1.3 1998/07/06 06:07:01 werner Exp $ */ - -#include "ttf.h" - -typedef struct -{ - ULONG TTCTag; - Fixed version; - ULONG DirCount; - ULONG *offset; /* length = DirCount */ - TTFontPtr font; -} -TTCHeader, *TTCHeaderPtr; - -TTCHeaderPtr ttfLoadTTCHeader(char *filename); -void ttfFreeTTCFont(TTCHeaderPtr ttc); - -#endif /* __TTF_TTC_H */ - - -/* end of ttc.h */ diff --git a/Build/source/texk/ttfdump/include/ttf.h b/Build/source/texk/ttfdump/include/ttf.h deleted file mode 100644 index 3f60105bc5c..00000000000 --- a/Build/source/texk/ttfdump/include/ttf.h +++ /dev/null @@ -1,173 +0,0 @@ -/* ttf.h -- header file that defines the top level abstraction of a True Type font, as - * well as the usual typedefs in TTF spec. - * Copyright (C) 1996-1998 Li-Da Lho, All right reserved. - */ - -#ifndef __TTF_H -#define __TTF_H - -#include <stdio.h> - -/* $Id: ttf.h,v 1.3 1998/07/06 06:07:01 werner Exp $ */ - -typedef unsigned char BYTE; -typedef signed char CHAR; -typedef unsigned short USHORT; -typedef signed short SHORT; - - -#if SIZEOF_INT==4 -typedef unsigned int ULONG; -typedef signed int LONG; -#else -#error "Unsupported size of `int' type!" -#endif - -typedef ULONG Fixed; /* 16.16 fixed point number used for - * version information */ -typedef USHORT FUnit; -typedef SHORT FWord; /* pixel position in the unit of FUnit */ -typedef USHORT uFWord; -typedef SHORT F2Dot14; /* 2.14 fixed point number used for - * unit vectors */ -typedef LONG F26Dot6; /* 26.6 fixed point number to specify - * pixel positions */ - -BYTE ttfGetBYTE(FILE *fp); -CHAR ttfGetCHAR(FILE *fp); -USHORT ttfGetUSHORT(FILE *fp); -SHORT ttfGetSHORT(FILE *fp); -ULONG ttfGetULONG(FILE *fp); -LONG ttfGetLONG(FILE *fp); -Fixed ttfGetFixed(FILE *fp); -FUnit ttfGetFUnit(FILE *fp); -FWord ttfGetFWord(FILE *fp); -uFWord ttfGetuFWord(FILE *fp); -F2Dot14 ttfGetF2Dot14(FILE *fp); - -/* Read arrays. */ -void ttfReadUSHORT(USHORT *array, size_t nelem, FILE *fp); -void ttfReadULONG(ULONG *array, size_t nelem, FILE *fp); -void ttfReadFWord(FWord *array, size_t nelem, FILE *fp); - -/* Allocate and read arrays. */ -BYTE *ttfMakeBYTE(size_t nelem, FILE *fp); -USHORT *ttfMakeUSHORT(size_t nelem, FILE *fp); -SHORT *ttfMakeSHORT(size_t nelem, FILE *fp); -ULONG *ttfMakeULONG(size_t nelem, FILE *fp); -LONG *ttfMakeLONG(size_t nelem, FILE *fp); - -#include "tables.h" -#include "gcache.h" -#include "gstate.h" - -typedef struct -{ - BYTE opcode; - BYTE *iStream; -} -InstructionDef; - -typedef struct -{ - BYTE fun; - BYTE *iStream; -} -FunctionDef; - -typedef struct -{ - /* data for instructions */ - BYTE *iStream; /* instruction stream */ - USHORT ip; /* instruction pointer */ - USHORT insLength; /* instruction length */ - LONG *StorageArea; /* storage area */ - LONG *Stack; /* stack */ - USHORT sp; /* stack pointer */ - USHORT stklimit; /* stack limit */ - /* data about point size and resolution */ - ULONG ppem; /* pixel per em */ - ULONG xres; /* x resolution in dpi */ - ULONG yres; /* y resolution in dpi */ - F26Dot6 pointsize; /* the point size of the font */ - /* data for grahpics stat and cvt */ - F26Dot6 *cvt; /* Control value table, scaled form cvt in - * TTFont */ - GraphicsState gstate; /* graphics state used for instructions */ - GraphicsState gstate_init; /* initial graphics state after fpgm and cvt - * programs are executed */ -#if 0 - /* user definded instructions and functions */ - InstructionDef iDef; /* instruction definitions */ - FunctionDef fDef; /* function definitions */ -#endif - - int Error_State; /* error state indicate the error */ -} -VirtualMachine; - -typedef struct -{ - /* misc informations */ - FILE *fp; - char *ttfname; - int *refcount; /* how many instances of this font */ - Fixed version; - USHORT numTables; /* it seems not necessary to hold all the - * OffsetTables */ - ULONG glyphOffset; /* where the glyph table starts */ - TableDirPtr dir; /* Pointer to Table Directories */ - EncodingPtr encoding; /* `encoding' is the currently used encoding - * table */ - USHORT numCacheElements; /* number of glyph cache elements */ - - VirtualMachine vm; /* the virtual machine */ - - GlyphCachePtr gcache; /* pointer to glyph cache */ - - /* required tables */ - CMAPPtr cmap; - HEADPtr head; - HHEAPtr hhea; - HMTXPtr hmtx; - LOCAPtr loca; - MAXPPtr maxp; - NAMEPtr name; - POSTPtr post; - OS_2Ptr os2; - - /* optional tables */ - FWord *cvt; /* control value table, not scaled yet */ - USHORT cvtLength; /* number of FWords of CVT */ - BYTE *fpgm; /* font program */ - USHORT fpgmLength; /* number of bytes of fpgm */ - BYTE *prep; /* cvt program */ - USHORT prepLength; /* number of bytes of prep */ - - /* those optional tables seem not to be necessary for a True Type font - * server */ - GASPPtr gasp; - HDMXPtr hdmx; - KERNPtr kern; - LTSHPtr ltsh; - PCLTPtr pclt; - VDMXPtr vdmx; - VHEAPtr vhea; - VMTXPtr vmtx; - - /* Additional OpenType Tables */ - GPOSPtr gpos; - GSUBPtr gsub; -} -TTFont, *TTFontPtr; - -TTFontPtr ttfInitFont(char *filename); -void ttfLoadFont(TTFontPtr font, ULONG offset); -void ttfFreeFont(TTFontPtr font); - -#include "loadtable.h" - -#endif /* __TTF_H */ - - -/* end of ttf.h */ diff --git a/Build/source/texk/ttfdump/include/ttfutil.h b/Build/source/texk/ttfdump/include/ttfutil.h deleted file mode 100644 index 083d4cf3314..00000000000 --- a/Build/source/texk/ttfdump/include/ttfutil.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef __TTF_UTIL_H -#define __TTF_UTIL_H - -#include "ttf.h" - -/* $Id: ttfutil.h,v 1.2 1998/07/06 06:07:01 werner Exp $ */ - -#if !defined(EXIT_FAILURE) -#define EXIT_FAILURE 1 -#endif - -#if defined __GNUC__ && __GNUC__ >=3 -__attribute__((__noreturn__)) -#endif -void ttfError(const char *msg); - -void FixedSplit(Fixed f, int b[]); -#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) _x1 << 24 | _x2 << 16 | _x3 << 8 | _x4 -char *TagToStr(ULONG tag); - -#ifdef KPATHSEA - -#include <stdlib.h> -#include <kpathsea/lib.h> -#include <kpathsea/tex-file.h> - -static inline FILE * -fopen_truetype (const char *path) -{ - FILE *fp; - char *p; - - if ((p = kpse_find_file (path, kpse_truetype_format, 0)) == NULL) - return NULL; - - fp = fopen (p, "rb"); - free (p); - - return fp; -} - -#else /* !KPATHSEA */ - -/* Functions copied or adapted from kpathsea. */ -void xfseek (FILE *fp, long offset, int wherefrom, const char *funcname); -long xftell (FILE *fp, const char *funcname); -void *xmalloc (size_t size); -void *xcalloc (size_t nelem, size_t elsize); -char *xstrdup(const char *s); - -#define FATAL_PERROR(str) do { perror (str); exit (EXIT_FAILURE); } while (0) -#define XTALLOC(n, t) ((t *) xmalloc ((n) * sizeof (t))) -#define XTALLOC1(t) XTALLOC (1, t) - -#define fopen_truetype(path) fopen (path, "rb") - -#endif /* !KPATHSEA */ - -#define XCALLOC(n, t) ((t *) xcalloc (n, sizeof (t))) -#define XCALLOC1(t) XCALLOC (1, t) - -#include "protos.h" - -#endif /* __TTF_UTIL_H */ - - -/* end of ttfutil.h */ |