folkertdev/elm-cff/1.0.0

Charset

The Charset maps glyph identifiers to glyph names

type Charset

The Charset maps glyph identifiers to string identifiers.

The string identifiers can then be used as indices into the string INDEX to get the actual name of a glyph.

{ offset : Int
, numberOfGlyphs : Int
}
-> Decoder Charset

Decode a Charset. The offset is (a)bused to indicate use of a predefined charset

  • offset = 0: the ISOAdobe charset will be used
  • offset = 1: the Expert charset will be used
  • offset = 2: the ExpertSubset charset will be used
  • otherwise the charset has to be decoded

When a predefined charset is used the charset is not encoded.

Find the string identifier for a glyph identifier.