wmayer wrote: ↑Thu Apr 20, 2023 6:11 am
The QFontDialog as it is won't work because the shape string function requires the path to a .ttf file which a QFont/QFontInfo doesn't deliver.
Minor point - FreeType (and Shapestring) will handle pretty much any vector font type - ttf, otf, Adobe Type1, etc. But it does have to read the actual font file to get the contours.
chennes wrote: ↑Tue Apr 18, 2023 7:52 pm
For font selection it should be using
QFontDialog, no?
As Werner says, the qfontdialog won't give you the actual file. Yorik and I looked for a solution to this, but we didn't find a cross platform solution. On Windows, you could get the directory listing from C:/Windows/Fonts, which would give you only the installed fonts, not any special purpose fonts that you might have installed. On Linux, you could check the user's ~/.fonts directory and the /usr/share/fonts/* directories or maybe get something from fontconfig. For Apple, there is System > Library > Fonts.
So maybe there should be two ways to get the font file - pick from installed fonts in standard places, or a general file dialog to pick a specific file.