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 using QFontDatabase to fetch all font families of the system and filtering Latin fonts only by providing writing system QFontDatabase::Latin. If I do this, my font gets filtered.
    So when I fetched what Qt is assuming writing system of this particular font using QList<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.font

    By the way its not the only font behaving like this, same is with a font name "gordan" and a font named "bankgothic".


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I'd recommend checking the bug report system to see if you can find something related.


  • Qt Champions 2016

    Hi
    The .TTF seems VERY old.
    I would try load and save it again from font editor.



  • Nothing really similar to this issue is in Bug Report System, nor did resaving the file with FontForge in TTF fixed the issue.


  • Qt Champions 2016

    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 ?



  • @mrjj Yes I tried saving to OTF and then back to TTF but it doesn't work. But saving it to OTF/converting it to OTF does work correctly. Also if the font was corrupted or bad then Qt should have also not detected as Latin in OTF right?


  • Qt Champions 2016

    @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.


  • Qt Champions 2016

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.