folkertdev / elm-cff / Dict.Top

The top-level dictionaries of all fonts in the file.


type alias Top =
{ version : Maybe Basics.Int
, notice : Maybe Basics.Int
, copyright : Maybe Basics.Int
, full_name : Maybe Basics.Int
, family_name : Maybe Basics.Int
, weight : Maybe Basics.Int
, is_fixed_pitch : Basics.Bool
, italic_angle : Basics.Int
, underline_position : Basics.Int
, underline_thickness : Basics.Int
, paint_type : Basics.Int
, charstring_type : Basics.Int
, font_matrix : FontMatrix
, unique_id : Maybe Basics.Int
, font_bounding_box : FontBoundingBox
, stroke_width : Basics.Int
, xuid : Maybe (List Dict.Operator.Argument)
, charset : Basics.Int
, encoding : Basics.Int
, charstrings : Maybe Basics.Int
, private : Maybe { size : Basics.Int
, offset : Basics.Int }
, synthetic_base : Maybe Basics.Int
, post_script : Maybe Basics.Int
, base_font_name : Maybe Basics.Int
, base_font_blend : Maybe (List Dict.Operator.Argument)
, cid : Maybe Cid 
}

The TOP dict


type alias Cid =
{ ros : ( Basics.Int
, Basics.Int
, Basics.Int )
, font_version : Basics.Float
, font_revision : Basics.Float
, font_type : Basics.Int
, count : Basics.Int
, uid_base : Maybe Basics.Int
, fd_array : Basics.Int
, fd_select : Basics.Int
, font_name : Maybe Basics.Int 
}

Additional operators used in CIDFonts

decode : Basics.Int -> Bytes.Decode.Decoder Top

Decode the top dict given its size (in bytes)


type alias Point =
{ x : Basics.Int, y : Basics.Int }

A 2d point


type alias FontBoundingBox =
{ bottomLeft : Point
, topRight : Point 
}

The font bounding box


type alias FontMatrix =
{ a : Basics.Float
, b : Basics.Float
, c : Basics.Float
, d : Basics.Float
, e : Basics.Float
, f : Basics.Float 
}

The font matrix