FontyFruity-0.5.1.1: A true type file format loader

Safe HaskellNone
LanguageHaskell2010

Graphics.Text.TrueType.Internal

Description

This module provide internal access to many structure, not exported by default. The stability of this module is absolutely not insured.

Synopsis

Documentation

data Font

Type representing a font.

Constructors

Font 

Fields

_fontOffsetTable :: !OffsetTable

Field discribing various offsets/positions of table inside the font file. Not available for reading.

_fontTables :: ![(ByteString, ByteString)]
 
_fontNames :: Maybe NameTable
 
_fontHeader :: Maybe FontHeader
 
_fontMaxp :: Maybe MaxpTable
 
_fontMap :: Maybe CharacterMaps
 
_fontGlyph :: Maybe (Vector Glyph)
 
_fontLoca :: Maybe (Vector Word32)
 
_fontHorizontalHeader :: Maybe HorizontalHeader
 
_fontHorizontalMetrics :: Maybe HorizontalMetricsTable
 

Instances

data FontHeader

Font header

Constructors

FontHeader 

Fields

_fHdrVersionNumber :: !Fixed

Table version number 0x00010000 for version 1.0.

_fHdrFontRevision :: !Fixed

fontRevision Set by font manufacturer.

_fHdrChecksumAdjust :: !Word32

To compute: set it to 0, sum the entire font as ULONG, then store 0xB1B0AFBA - sum.

_fHdrMagicNumber :: !Word32

Should be equal to 0x5F0F3CF5.

_fHdrFlags :: !HeaderFlags
 
_fUnitsPerEm :: !Word16

Valid range is from 16 to 16384

_fHdrCreateTime :: !Word64

International date (8-byte field).

_fHdrModificationTime :: !Word64

International date (8-byte field).

_fHdrxMin :: !FWord

For all glyph bounding boxes.

_fHdrYMin :: !FWord

For all glyph bounding boxes.

_fHdrXMax :: !FWord

For all glyph bounding boxes.

_fHdrYMax :: !FWord

For all glyph bounding boxes.

_fHdrMacStyle :: !FontStyle

Bit 0 bold (if set to 1); Bit 1 italic (if set to 1)

_fHdrLowestRecPPEM :: !Word16

Smallest readable size in pixels.

_fHdrFontDirectionHint :: !Int16

0 Fully mixed directional glyphs; 1 Only strongly left to right; 2 Like 1 but also contains neutrals ; -1 Only strongly right to left; -2 Like -1 but also contains neutrals.

_fHdrIndexToLocFormat :: !Int16

0 for short offsets, 1 for long.

_fHdrGlyphDataFormat :: !Int16

0 for current format.

data HeaderFlags

Header flags.

Constructors

HeaderFlags 

Fields

_hfBaselineY0 :: !Bool

Bit 0 - baseline for font at y=0;

_hfLeftSideBearing :: !Bool

Bit 1 - left sidebearing at x=0;

_hfInstrDependPointSize :: !Bool

Bit 2 - instructions may depend on point size;

_hfForcePPEM :: !Bool

Bit 3 - force ppem to integer values for all internal scaler math; may use fractional ppem sizes if this bit is clear;

_hfAlterAdvance :: !Bool

Bit 4 - instructions may alter advance width (the advance widths might not scale linearly);

data HorizontalHeader

Describe the "hhea" TrueType table.

Constructors

HorizontalHeader 

Fields

_hheaAscent :: !FWord

Distance from baseline of highest ascender

_hheaDescent :: !FWord

Distance from baseline of lowest descender

_hheaLineGap :: !FWord

typographic line gap

_hheaAdvanceWidthMax :: !FWord

must be consistent with horizontal metrics

_hheaMinLeftSideBearing :: !FWord

must be consistent with horizontal metrics

_hheaMinRightSideBearing :: !FWord

must be consistent with horizontal metrics

_hheaXmaxExtent :: !FWord

max(lsb + (xMax-xMin))

_hheaCaretSlopeRise :: !Int16

used to calculate the slope of the caret (rise/run) set to 1 for vertical caret

_hheaCaretSlopeRun :: !Int16

0 for vertical

_hheaCaretOffset :: !FWord

set value to 0 for non-slanted fonts

_hheaMetricDataFormat :: !Int16

0 for current format

_hheaLongHorMetricCount :: !Word16

number of advance widths in metrics table

data HorizontalMetricsTable

For every glyph (indexed by the glyph index), provide horizontal information.

data MaxpTable

Constructors

MaxpTable 

Fields

_maxpTableVersion :: !Fixed

version number 0x00010000 for version 1.0.

_maxpnumGlyphs :: !Word16

The number of glyphs in the font.

_maxpmaxPoints :: !Word16

Maximum points in a non-composite glyph.

_maxpmaxContours :: !Word16

Maximum contours in a non-composite glyph.

_maxpmaxCompositePoints :: !Word16

Maximum points in a composite glyph.

_maxpmaxCompositeContours :: !Word16

Maximum contours in a composite glyph.

_maxpmaxZones :: !Word16

1 if instructions do not use the twilight zone (Z0), or 2 if instructions do use Z0; should be set to 2 in most cases.

_maxpmaxTwilightPoints :: !Word16

Maximum points used in Z0.

_maxpmaxStorage :: !Word16

Number of Storage Area locations.

_maxpmaxFunctionDefs :: !Word16

Number of FDEFs.

_maxpmaxInstructionDefs :: !Word16

Number of IDEFs.

_maxpmaxStackElements :: !Word16

Maximum stack depth .

_maxpmaxSizeOfInstructions :: !Word16

Maximum byte count for glyph instructions.

_maxpmaxComponentElements :: !Word16

Maximum number of components referenced at "top level" for any composite glyph.

_maxpmaxComponentDepth :: !Word16

Maximum levels of recursion; 1 for simple components.

newtype FWord

Constructors

FWord Word16 

Instances

data Fixed

Constructors

Fixed Word16 Word16 

Instances