ohmtech-rdi / eurorack-blocks

Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
Other
303 stars 21 forks source link

Panel freetype #519

Closed ohmtech-rdi closed 1 year ago

ohmtech-rdi commented 1 year ago

This PR uses freetype to fix multiple problems with the current toy API from cairo:

Placement of glyphs slightly changes, as we base the ascent of the font on the character set most likely to be used when prototyping. We believe it is better, as it is based on visual properties of the font face.

Finally, this also simplify installation and avoid font problems, as we do not need to copy the fonts anymore, and reference a font face explicitly with an absolute path, rather than relying on font families and variants which might change from one font manager implementation to another.

Note The outlines of Truetype fonts is not perfect, but since we use them only for stickers, this is good enough.

Todo:

ohmtech-rdi commented 1 year ago

On macOS Intel, the universal2 wheel doesn't get always installed, so we need to check if it will be installed, and install freetype otherwise.