Add system font support#77
Conversation
|
Fonts not rendering is probably because the filename and font name are different, i kept running into this when i was messing with font selection. |
|
That seems like what's happening. Ultimately fonttools is what creates a polygon from ttf's. It wants a full path to the font file. svg2mod populates a table of "system fonts" that it fronts in these folders. KiBuzzard/KiBuzzard/deps/svg2mod/svg2mod/svg/svg.py Lines 1039 to 1043 in 183e971 On linux you can put fonts in more places. So I suspect that wxFontPicker is pulling in fonts that svg2mod hasn't got a path for. |
After selecting a system font, the preview cannot be generated and the result is empty |

Summary
Here is initial work on adding system font support.
Open Questions
I think the UI looks cleaner if we have "System Font" in the main drop down list. What do people think? When it's not selected the FontPicker is greyed out.
I've seen a fair few fonts not render correctly. I suspect there is an issue with the search paths used by wx and the ones used by svg2mod?
Maybe if we have errors forward them into the UI? Instead of just displaying blank?
If a user opens a design that has a footprint generated with a font they do not have. how should we handle editing?
Demo
2022-03-03.23-30-48.mp4