Safe Haskell | None |
---|---|
Language | Haskell98 |
Utilities for making it easier to create Tables from Unicode data.
- type UnicodeGlyphMap = HashMap String (Glyph String)
- type UnicodeKernPairs = [(String, String, FWord)]
- makeUnicodeTables :: UnicodeGlyphMap -> UnicodeKernPairs -> PostTable -> (CmapTable, GlyfTable, PostTable, KernTable)
- makeUnicodeFont :: UnicodeGlyphMap -> UnicodeKernPairs -> FontInfo -> OpentypeFont
- type CodePoint = Int
- codepointName :: CodePoint -> String
- hasDescriptiveName :: CodePoint -> Bool
- nameToCodepoint :: String -> Maybe CodePoint
- postscriptIndex :: String -> Maybe Int
- postscriptName :: Int -> Maybe String
- postscriptNames :: Vector String
Unicode tables
type UnicodeGlyphMap = HashMap String (Glyph String) Source #
A map from glyphnames to glyphs. Unicode points are derived
using nameToCodepoint
. Names without matching codepoint can only
be used in composite glyphs. If the glyphName
has no matching
key in the map, it will be substituted by the empty glyph
makeUnicodeTables :: UnicodeGlyphMap -> UnicodeKernPairs -> PostTable -> (CmapTable, GlyfTable, PostTable, KernTable) Source #
Given a UnicodeGlyphMap
, create a CmapTable
, GlyfTable
and
KernTable
and update the PostTable
.
makeUnicodeFont :: UnicodeGlyphMap -> UnicodeKernPairs -> FontInfo -> OpentypeFont Source #
Create an opentype font from a UnicodeGlyphMap
and FontInfo
structure.
Postscript Names
codepointName :: CodePoint -> String Source #
Standard name for this codepoint. Will be a descriptive name if one is available, otherwise unihex-codepoint.
hasDescriptiveName :: CodePoint -> Bool Source #
postscriptIndex :: String -> Maybe Int Source #
index of the string in the list of standard postscript names, if any.
postscriptNames :: Vector String Source #
vector of standard postscript names.