dbuenzli / vg

Declarative 2D vector graphics for OCaml
http://erratique.ch/software/vg
ISC License
88 stars 12 forks source link

Improve Cairo glyph API #9

Open dbuenzli opened 9 years ago

dbuenzli commented 9 years ago

As @art-w noted in his PR that brought Cairo support for Vg:

While Cairo is able to render text, it's intended to be used with Pango (which isn't binded with OCaml at this time). Hence, the text API is severely lacking: Beside not using the glyphs infos provided by Vg, the most striking offense is that the weights are limited to Normal and Bold (arbitrarily chosen at W600.)

The thing is that using the glyph API can be useful even without Pango. The vecho.ml example shows it already possible to perform basic layout with kerning for basic alphabetic scripts using Otfm.

Get in touch if you are interested in working on this problem.

Chris00 commented 5 years ago

There are two new font modules: Ft and Cairo_pango. They were written in haste and would benefit from more eyes looking at the code and testing.