You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, fonts are identified by the name of the file that defines the font. In Arnold we extended this logic to be able to find fonts based on the font family and style name. This makes it easier for end users to select fonts. For instance "Arial Bold" is defined by arialbd.ttf on Windows. Specifying arialbd is not that obvious and also file names could differ based on the platform.
If you find this useful, we can port our code back here.
I'd also like to point out that it's not that obvious from the current documentation that fontname supposed to be the file name and not the family name.
fontsize/fontname – Size and name of the font. If the name is not a full pathname to a font file, it will search for a matching font, defaulting to some reasonable system font if not supplied at all), and with a nominal height of fontsize (in pixels).
Specially because some examples suggest the family name should work, like this:
ImageBufAlgo::render_text(A, x, y, "Centered", 48, "Courier New");
Not sure about other platforms, but for instance on Windows this does not work currently, because "Courier New" is defined by cour.ttf.
The text was updated successfully, but these errors were encountered:
Currently, fonts are identified by the name of the file that defines the font. In Arnold we extended this logic to be able to find fonts based on the font family and style name. This makes it easier for end users to select fonts. For instance "Arial Bold" is defined by arialbd.ttf on Windows. Specifying arialbd is not that obvious and also file names could differ based on the platform.
If you find this useful, we can port our code back here.
I'd also like to point out that it's not that obvious from the current documentation that fontname supposed to be the file name and not the family name.
Specially because some examples suggest the family name should work, like this:
Not sure about other platforms, but for instance on Windows this does not work currently, because "Courier New" is defined by
cour.ttf
.The text was updated successfully, but these errors were encountered: