Module Vg.Font
Fonts.
Font handling in Vg
happens in renderers and text layout and text to glyph translations are expected to be carried out by an external library. Values of type Vg.font
just represent a font specification to be resolved by the concrete renderer.
Fonts
type weight
=[
|
`W100
|
`W200
|
`W300
|
`W400
|
`W500
|
`W600
|
`W700
|
`W800
|
`W900
]
The type for font weights. Usually
`W400
denotes a normal weight and`W700
, a bold weight.
type t
=
{
name : string;
slant : slant;
weight : weight;
size : float;
}
The type for fonts. The size is expressed in
Vg
's coordinate space, the em unit of the font is scaled to that size.
Predicates and comparisons
Printers
val to_string : t -> string
to_string font
is a textual representation offont
.
val pp : Stdlib.Format.formatter -> t -> unit
pp ppf font
is a textual representation offont
onppf
.