OCamlPro / ocaml-canvas

The OCaml-Canvas library provides a portable Canvas for OCaml
https://ocamlpro.github.io/ocaml-canvas/
Other
59 stars 9 forks source link

Font features #139

Open zoggy opened 1 year ago

zoggy commented 1 year ago

Hello,

it would be useful to have more information on fonts (like ascent, descent, height, ...) and text rendered with a given font (width and height).

ddeclerck commented 1 year ago

Hi,

That's on my TODO list ;) Il probably implement that as an interface inspired by the TextMetrics API. Implementation might be a bit tricky tough, as font handling is quite different on the various backends.