-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Significant change to invisible font system
to improve correctness and compatibility with external programs, particularly ghostscript. We will start mapping everything to a single glyph, rather than allowing characters to run off the end of the font. A more detailed design discussion is embedded into pdfrenderer.cpp comments. The font, source code that produces the font, and the design comments were contributed by Ken Sharp from Artifex Software.
- 5.5.0
- 5.4.1
- 5.4.0
- 5.4.0-rc2
- 5.4.0-rc1
- 5.3.4
- 5.3.3
- 5.3.2
- 5.3.1
- 5.3.0
- 5.3.0-rc1
- 5.2.0
- 5.1.0
- 5.0.1
- 5.0.0
- 5.0.0-rc3
- 5.0.0-rc2
- 5.0.0-rc1
- 5.0.0-beta-20210916
- 5.0.0-beta-20210815
- 5.0.0-alpha-20210401
- 5.0.0-alpha-20201231
- 5.0.0-alpha-20201224
- 5.0.0-alpha
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.1-rc2
- 4.1.1-rc1
- 4.1.0
- 4.1.0-rc4
- 4.1.0-rc3
- 4.1.0-rc2
- 4.1.0-rc1
- 4.0.0
- 4.00.00dev
- 4.00.00alpha
- 4.0.0-rc4
- 4.0.0-rc3
- 4.0.0-rc2
- 4.0.0-rc1
- 4.0.0-beta.4
- 4.0.0-beta.3
- 4.0.0-beta.2
- 4.0.0-beta.1
- 4.0.0-alpha
- 3.05.02
- 3.05.01
- 3.05.00
- 3.05.00dev
- 3.04.01
- 3.04.01dev
- 3.04.00
1 parent
2924d3a
commit 6b63417
Showing
5 changed files
with
1,039 additions
and
1,765 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
/* I don't expect anyone to run this program, ever again. It is | ||
* included primarily as documentation for how the GlyphLessFont was | ||
* created. | ||
*/ | ||
|
||
/* The OpenType data types, we'll duplicate the definitions so that | ||
* the code shall be (as far as possible) self-documenting simply by | ||
* referencing the OpenType specification. Note that the specification | ||
* is soemwhat inconsistent with regards to usage, naming and capitalisation | ||
* of the names for these data types. | ||
*/ | ||
typedef char BYTE; | ||
typedef char CHAR; | ||
typedef unsigned short USHORT; | ||
typedef short SHORT; | ||
typedef struct _uint24 {char top8;unsigned short bottom16;} UINT24; | ||
typedef unsigned long ULONG; | ||
typedef long LONG; | ||
typedef unsigned long Fixed; | ||
typedef SHORT FWORD; | ||
typedef USHORT UFWORD; | ||
typedef unsigned short F2DOT14; | ||
typedef struct _datetime {long upper;long lower;} LONGDATETIME; | ||
typedef char Tag[4]; | ||
typedef USHORT GlyphId; | ||
typedef USHORT Offset; | ||
typedef struct _longHorMetric {USHORT advanceWidth;SHORT lsb;} longHorMetric; | ||
|
||
/* And now definitions for each of the OpenType tables we will wish to use */ | ||
|
||
typedef struct { | ||
Fixed sfnt_version; | ||
USHORT numTables; | ||
USHORT searchRange; | ||
USHORT entrySelector; | ||
USHORT rangeShift; | ||
} Offset_Table; | ||
|
||
typedef struct { | ||
Tag tag; /* The spec defines this as a ULONG, | ||
but also as a 'Tag' in its own right */ | ||
ULONG checkSum; | ||
ULONG offset; | ||
ULONG length; | ||
} TableRecord; | ||
|
||
typedef struct { | ||
USHORT version; | ||
USHORT numTables; | ||
} cmap_header; | ||
|
||
typedef struct { | ||
USHORT platformID; | ||
USHORT encodingID; | ||
ULONG Offset; | ||
} cmap_record; | ||
|
||
typedef struct { | ||
USHORT format; | ||
USHORT length; | ||
USHORT language; | ||
BYTE glyphIDArray[256]; | ||
} format0_cmap_table; | ||
|
||
/* This structure only works for single segment format 4 tables, | ||
for multiple segments it must be constructed */ | ||
typedef struct { | ||
USHORT format; | ||
USHORT length; | ||
USHORT language; | ||
USHORT segCountx2; | ||
USHORT searchRange; | ||
USHORT entrySelector; | ||
USHORT rangeShift; | ||
USHORT endcount; | ||
USHORT reservedPad; | ||
USHORT startCount; | ||
SHORT idDelta; | ||
USHORT idRangeOffset; | ||
USHORT glyphIdArray[2]; | ||
} format4_cmap_table; | ||
|
||
typedef struct { | ||
USHORT format; | ||
USHORT length; | ||
USHORT language; | ||
USHORT firstCode; | ||
USHORT entryCount; | ||
USHORT glyphIDArray; | ||
} format6_cmap_table; | ||
|
||
typedef struct { | ||
cmap_header header; | ||
cmap_record records[2]; | ||
format6_cmap_table AppleTable; | ||
format6_cmap_table MSTable; | ||
} cmap_table; | ||
|
||
typedef struct { | ||
Fixed version; | ||
Fixed FontRevision; | ||
ULONG checkSumAdjustment; | ||
ULONG MagicNumber; | ||
USHORT Flags; | ||
USHORT unitsPerEm; | ||
LONGDATETIME created; | ||
LONGDATETIME modified; | ||
SHORT xMin; | ||
SHORT yMin; | ||
SHORT xMax; | ||
SHORT yMax; | ||
USHORT macStyle; | ||
USHORT lowestRecPPEM; | ||
SHORT FontDirectionHint; | ||
SHORT indexToLocFormat; | ||
SHORT glyphDataFormat; | ||
SHORT PAD; | ||
} head_table; | ||
|
||
typedef struct { | ||
Fixed version; | ||
FWORD Ascender; | ||
FWORD Descender; | ||
FWORD LineGap; | ||
UFWORD advanceWidthMax; | ||
FWORD minLeftSideBearing; | ||
FWORD minRightSideBearing; | ||
FWORD xMaxExtent; | ||
SHORT caretSlopeRise; | ||
SHORT caretSlopeRun; | ||
SHORT caretOffset; | ||
SHORT reserved1; | ||
SHORT reserved2; | ||
SHORT reserved3; | ||
SHORT reserved4; | ||
SHORT metricDataFormat; | ||
USHORT numberOfHMetrics; | ||
} hhea_table; | ||
|
||
typedef struct { | ||
longHorMetric hMetrics[2]; | ||
} hmtx_table; | ||
|
||
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_table; | ||
|
||
typedef struct { | ||
USHORT platformID; | ||
USHORT encodingID; | ||
USHORT languageID; | ||
USHORT nameID; | ||
USHORT length; | ||
USHORT offset; | ||
} NameRecord; | ||
|
||
typedef struct { | ||
USHORT format; | ||
USHORT count; | ||
USHORT stringOffset; | ||
NameRecord nameRecord[3]; | ||
} name_table; | ||
|
||
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; | ||
BYTE panose[10]; | ||
ULONG ulUnicodeRange1; | ||
ULONG ulUnicodeRange2; | ||
ULONG ulUnicodeRange3; | ||
ULONG ulUnicodeRange4; | ||
CHAR achVendID[4]; | ||
USHORT fsSelection; | ||
USHORT usFirstCharIndex; | ||
USHORT usLastCharIndex; | ||
SHORT sTypoAscender; | ||
SHORT sTypoDescender; | ||
SHORT sTypoLineGap; | ||
USHORT usWinAscent; | ||
USHORT usWinDescent; | ||
ULONG ulCodePageRange1; | ||
ULONG ulCodePageRange2; | ||
SHORT sxHeight; | ||
SHORT sCapHeight; | ||
USHORT usDefaultChar; | ||
USHORT usBreakChar; | ||
USHORT usMaxContent; | ||
} OS2_table; | ||
|
||
typedef struct { | ||
Fixed version; | ||
Fixed italicAngle; | ||
FWORD underlinePosition; | ||
FWORD underlineThickness; | ||
ULONG isFixedPitch; | ||
ULONG minMemType42; | ||
ULONG maxMemType42; | ||
ULONG minMemType1; | ||
ULONG maxMemType1; | ||
} post_table; |