|
wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
|
wx_bgi_graphics now ships with two text-rendering paths:
DEFAULT_FONTTRIPLEX_FONTSMALL_FONTSANS_SERIF_FONTGOTHIC_FONTMODERN_ROBOTO_FONTMODERN_PLAYFAIR_DISPLAY_FONTMODERN_HANDJET_FONTClassic BGI code can use the new embedded families directly through settextstyle():
If you prefer name lookup instead of hardcoded ids:
The classic compatibility hook installuserfont() now also resolves bundled font names:
Related helpers in wx_bgi_ext.h:
wxbgi_font_count()wxbgi_font_name(fontId)wxbgi_font_id(name)Text input is now decoded as UTF-8 when possible, with single-byte fallback for legacy callers. That means strings such as Résumé, ÁÉÍÓÚ, äöü, ñ, ç, æ, ø, þ, and ß render correctly in the embedded Google fonts and in the extended classic stroke-font path.
Roboto, Playfair Display, and Handjet are embedded into the shared library at build time from the upstream font binaries stored under:
third_party/fonts/roboto/third_party/fonts/playfairdisplay/third_party/fonts/handjet/Their SIL Open Font License notices are kept in the matching OFL.txt files in those directories. The font binaries are compiled into the library; they are not installed as separate runtime font files by this project.
The repository includes a font showcase example that displays the classic and embedded font families and exits automatically after 10 seconds:
Use --test for the short automated path used during development: