Unable to detect latin writing system of a font
-
Hi! I am trying to use a font in a windows application. Font family is "Boombox", which should have a latin writing system, but Qt is giving me as Symbol. Can someone help me narrow down the issue?
I am usingQFontDatabase
to fetch all font families of the system and filtering Latin fonts only by providing writing systemQFontDatabase::Latin
. If I do this, my font gets filtered.
So when I fetched what Qt is assuming writing system of this particular font usingQList<QFontDatabase::WritingSystem> writing = database.writingSystems(family);
. It's Symbol only, where as for other fonts like Open Sans, Arial, etc, its Latin and Symbol.As per my investigation, default container is TTF of this font, when I install as is in windows, Qt gives me writing system as Symbol. But if I convert this to OTF using a web tool like onlinefontconverter.com, install this one, Qt is able to detect it as Latin & Symbol.
I don't have sufficient privilages so can't attach the font file but you can download it from internet, like https://www.urbanfonts.com/fonts/BoomBox.font
http://www.fontpalace.com/font-details/BoomBox/
http://www.dafont.com/boom-box.fontBy the way its not the only font behaving like this, same is with a font name "gordan" and a font named "bankgothic".
-
Hi and welcome to devnet,
I'd recommend checking the bug report system to see if you can find something related.
-
Hi
The .TTF seems VERY old.
I would try load and save it again from font editor. -
Hi
Maybe its simply flagged wrongly and only reports as symbol.
I had hoped re-saving would solve it.Did you try convert to OTF and then back to TTF ?
-
@Kush
Ok. so its not just due to old TTF format or something.
Well if the ttf was bad then export to OTF should also be damaged. so yes, right.But if online converter do any guessing, it might detect latin is included by it self.
but since saving the correctly working OTF to a TFF did not help it must be something else
at play.Is using OFT an option ? not sure how to fix the ttf without really diving into the ttf spec.
-
@mrjj I have my personal software that my customers will be going to use, I can provide them a workaround to use OTF fonts but I don't think many of them would like to do so. People generally download fonts online and would like to use them with whatever format they are in, if there is any way I could fix this then it would be great. Otherwise, I don't have any option anyway.
-
Hi
Well to fix it, we should first know why it fails.
I only used a few custom ttf and had no issues but
there might be bug in Qt or something about that ttf.
Or maybe when ttf is both symbol and latin etc.I would search https://bugreports.qt.io to see if something like this is known.
If not, make very small sample to reproduce, with the font and upload.