Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: nim108 on September 16, 2015, 01:03:01 PM

Title: Font Type in QT Application
Post by: nim108 on September 16, 2015, 01:03:01 PM
I am running the latest TC (6.4 at the time of this posting) with an entire build environment underneath (compiletc, -dev packages of all libs, etc.). I used this guide (http://www.m-opensolutions.com/?p=600) to build Qt 5.4.2 and it built flawlessly. My question is about fonts. My test application written under Qt displays with a very weird font that does not match what I see under Linux Mint or Windows. How/where can I get a more traditional style font and customize it to work as the default? What am I missing? Where are the configs, if any, that I need to modify? Do I just grab Xorg-fonts.tcz and dejavu-fonts-ttf.tcz, load those, and expect it to just work?
Title: Re: Font Type in QT Application
Post by: Juanito on September 16, 2015, 01:19:34 PM
what happens when you try that?
Title: Re: Font Type in QT Application
Post by: curaga on September 16, 2015, 01:23:19 PM
Yeah, any fonts should just work, though many find Xorg fonts and Dejavu ones ugly - liberation or microsoft ones are common.
Title: Re: Font Type in QT Application
Post by: nim108 on September 16, 2015, 01:28:52 PM
Thanks, let me test with the liberation-fonts-ttf.tcz extension ... I assumed it was a Qt problem and not TC or X but from what it sounds like, the application should just use whatever font is available before falling back to some default one, which is what it seems to be doing now.
Title: Re: Font Type in QT Application
Post by: nim108 on September 16, 2015, 02:15:58 PM
Loaded ttf-bitstream-vera.tcz and liberation-fonts-ttf.tcz and it seemed to have changed the font in my application so I guess it works. I'm just not sure how to tell what it's using or force it to use a certain family of fonts if I have multiple sets installed for testing. Any ideas?
Title: Re: Font Type in QT Application
Post by: curaga on September 17, 2015, 04:46:39 AM
The app requests a font or a family, "Arial" "Sans serif". Then fontconfig maps that to an installed font according to your preferences, see /etc/fonts (can be made per-user in ~/.fonts.conf).

So in short, you need the app's source code to see what font it requests first.
Title: Re: Font Type in QT Application
Post by: nim108 on September 18, 2015, 08:39:26 AM
Thanks curaga, I will find out more what my Qt app is doing/requesting.