We have moved to a new Sailfish OS Forum. Please start new discussions there.

Font changes in deployed applications

asked 2013-12-26 07:34:59 +0300

my-jolla gravatar image

updated 2014-01-17 11:05:19 +0300

veskuh gravatar image

When launched on the phone directly after deployment from the SDK (and when started from the terminal), an application has correct font, same as in the SDK emulator. But when launched from the application icon in launcher the font in the application is much smaller (actually: thinner) and very ugly (not antialiased, almost illegible on the device). Checked with multiple applications, always the same issue.

Furthermore, when the font is ugly (app launched from icon) text formatting/alignment (e.g. Text.AlignJustify) works correctly. But when the font is good looking (app launched from terminal) text alignment does NOT work.


Good looking font (same as in the SDK emulator) with AlignJustify NOT working - when an application gets launched from the terminal:

image description

image description

Ugly font (thinner, narrower) but correctly working AlignJustify - when launched from an icon:

image description

image description

edit retag flag offensive close delete



This sounds really starange, could you post screenshots of app having correct and wrong fonts. Would be good to see how they look ;)

foss4ever ( 2013-12-26 09:20:49 +0300 )edit

I've added some screenshots to the original post above. Even the button font changes to a thinner one, and so does the font in e.g. Pulley menu.

my-jolla ( 2013-12-26 18:27:02 +0300 )edit

Wow that looks really bad. Have you experienced this with other apps that you deploy to.device, or is it only this one?

foss4ever ( 2013-12-26 20:55:10 +0300 )edit

Yes, all applications are affected with the same issue. I've got nine applications fully ported to Sailfish OS and it happens with all of them.

my-jolla ( 2013-12-26 23:12:46 +0300 )edit

Ok, I have also the SDK in use and have been able to deploy a simple app to the device and checked that it works (I didn't pay attention to font rendering at the time). Do you have your source-code in GitHub and open-sourced, so I could try this with my own QtCreator and device?

foss4ever ( 2013-12-26 23:22:06 +0300 )edit

5 Answers

Sort by » oldest newest most voted

answered 2013-12-27 08:43:50 +0300

foss4ever gravatar image

updated 2013-12-29 04:35:05 +0300

After debugging this with code send to me by @my-jolla, I found out that it is the Silica components that render texts and fonts differently. Starting the app directly from QtCreator (after deploying it as RPM-package) in the device does not make the type of application to "silica-qt5", but just "qt5", and fonts render more clearly and brightly. The fonts are also of different letterspacing, and alignment (e.g. justification) works differently, so text takes different amount of space (as suggested by @my-jolla)

Now, after app is installed in device the .desktop file includes a line


which makes the application to be invoked with:

invoker --type=silica-qt5 --single-instance /usr/bin/Biorhythms

command, so that it uses Silica components, and these seem to render fonts differently (they look more blury as described by OP).

A workaround in this case, to make fonts render more clearly, is to change in the .desktop files this line to read:


which should make the app to be started with command

invoker --type=qt5 --single-instance /usr/bin/Biorhythms

Application can also started in device with the above command line in terminal to see the difference.

In these cases, of course, the app is not probably using Silica QML-components at alll (cause the type is not "silica-qt5") so this does not solve the root cause, which seems to be some font rendering issue in Silica QML/Qt5 components.

edit flag offensive delete publish link more


Please note that it's not just that fonts render "more clearly and brightly". They're also of different letterspacing, and alignment (e.g. justification) works differently, so text takes different amount of space.

my-jolla ( 2013-12-27 17:59:31 +0300 )edit

Ok, I added that to the answer. And, in regards what to do next to get this acknowledge; well we should get more votes for this question ;) and of courese, you could post this issue to SailfishOS Devel mailing list, or bring up this topic in #sailfishos freenode chat.

foss4ever ( 2013-12-29 04:36:58 +0300 )edit

Selecting qt5 as booster type will increase startup time and time for transitions between pages if Silica components are used. The thinner font looks like the intended system font, easy to see if you compare it to system apps. If the developer prefers different font, he should explicitly choose one.

veskuh ( 2014-01-17 10:49:37 +0300 )edit

@veskuh Yes, using qt5 as booster was just a hackihs way to invoke the app so that the fonts rendered differently (thicker and better suggested by the OP). I didn't intend it to be an actual work-around, cause I wasn'tt sure what was the intended font for silica-boosted apps. Maybe it would help to document somewhere how to choose a specific theme or font for our apps.. ,)

foss4ever ( 2014-01-17 10:56:07 +0300 )edit

@jjaone There isn't a custom theme (or app specific theme) support yet in Silica, but you can use normal font formatting properties to all text fields and labels. It unfortunately seems that there aren't public properties available to control the font for other controls, but hacks may work.

veskuh ( 2014-01-17 11:26:22 +0300 )edit

answered 2013-12-27 20:56:55 +0300

my-jolla gravatar image

Now that it has been confirmed by others to be an existing issue, is there any hope that it can be dealt with promptly? It breaks the look of all my applications so badly that I cannot release any of them. Should I submit it to somewhere so that it gets noticed? Here it may just go unnoticed among those thousands of other submissions...

edit flag offensive delete publish link more


@my-jolla Did you by any chance already post this question to SailfishOS devel mailing list?

foss4ever ( 2014-01-07 05:01:03 +0300 )edit

Sorry for late response. I haven't posted it there yet. But I've found another strange thing: if in main.qml file I set the initialPage as a Component then always the same (the uglier one) font is used. If I use an object (e.g. FirstPage {} ) then it uses different fonts as described above.

my-jolla ( 2014-01-16 05:54:03 +0300 )edit

(continued) This of course affects the initialPage only, all other pages still have the same problem.

my-jolla ( 2014-01-16 05:55:00 +0300 )edit

answered 2014-01-17 11:04:19 +0300

veskuh gravatar image

The default font shouldn't change depending on the booster type and launching from SDK should produce the same font than launch from icon.

It really looks like the thinner font is the real system font. It is inteded for device use and thus screenshot on desktop environment really doesn't do justice to it. Just to be sure, compare your app to system apps.

Also, you do not define font in the example you gave (test.zip/MainPage.qml) you just use whatever the default happens to be in Text element. If you do not like system font you should define a font you like. If you use Silica Label it should set system font automatically and if you just want to use Text element instead of Label you can get the system font from Theme.fontFamily.

edit flag offensive delete publish link more



I did NOT say that the screenshots come from the emulator. They do NOT. All screenshots were taken on the device. Just as I wrote, the thinner font is shown when an application is launched from the Terminal, and the thicker font is used when an application is launched from an icon.

my-jolla ( 2014-01-17 11:25:41 +0300 )edit

(cont.) Indeed, I don't define font and I want to show the default system font. But still, the default font should be the same no matter how one launches an application. THAT'S the problem - so that the font is always the same regardless of an app being started from an icon or from the terminal.

my-jolla ( 2014-01-17 11:30:10 +0300 )edit

(cont.) To sum up and clarify, I do not complain about the look of the font, but about it CHANGING depending on how an app is launched. So it's not that "I do not like the system font". I do like it, I just expect it to always BE THE SAME. And I'm sure that IT IS NOT INTENDED that it changes....

my-jolla ( 2014-01-17 11:37:04 +0300 )edit

@my-jolla Yes, I just meant that because of higher resolution and subpixel antialising screenshot of font rendering (even from device) does not do justice to it.

The picture from below looks more like system font to me, did you compare that to system apps?

veskuh ( 2014-01-17 11:39:26 +0300 )edit

@my-jolla And yes, I do agree that there is an issue here. The font should be the same.

veskuh ( 2014-01-17 11:41:03 +0300 )edit

answered 2014-01-17 10:21:56 +0300

thp gravatar image

Just a wild guess, can you check if the environment variables QT_DF_BASE, QT_DF_BASEDEVIATION, QT_DF_RANGE, ... (all the ones starting with QT_DF_) are different between the two invocations that lead to a different display? I've experienced this myself, and I think the thinner font that you call "uglier" is the intended font, but maybe we can improve the readability of this font independent of the fix to this issue (which should make the font appear the same, no matter how you start it up).

edit flag offensive delete publish link more


Yes, for me the thinner is much harder to read (not ugly in itself).. Gottta check those env vars, will report later here.. but it'd great to be able to choose the font/themes and their rendering in 3rd-party apps..

foss4ever ( 2014-01-17 11:02:04 +0300 )edit

Hey Thomas, printenv lists the same environment variables in each case: QT_DF_BASE=0.5, QT_DF_RANGE=0.08, QT_DF_SCALEFORMAXDEF=0.37, QT_DF_BASEDEVIATION=0.025, QT_DF_SCALEFORNODEV=0.6. P.S. I'm fine with the thinner font, I just need it to always be the same, regardless of how an app is launched...

my-jolla ( 2014-01-17 11:47:38 +0300 )edit

I think that when invoked in-device with different booster selectors (qt5 or qt5-silica) the envs might be different..

foss4ever ( 2014-01-17 12:04:52 +0300 )edit

I'll further investigate it later today...

my-jolla ( 2014-01-17 12:09:38 +0300 )edit

answered 2014-03-22 17:24:47 +0300

my-jolla gravatar image

So..... after THREE MONTHS this remains not fixed...

edit flag offensive delete publish link more



.... and judging by the response it won't be anytime soon.... Gosh, I'm really tired of it. I ported some of my apps to Sailfish OS already in March 2013, and after A YEAR I still cannot release any of them due to no support for paid apps, no support for certain Qt modules in Harbor, and bugs like this one that no one wants to even just confirm that they'll be fixed. I don't know how much longer I can wait, probably not too long. This platform apparently doesn't need developers like me.

my-jolla ( 2014-04-01 03:30:01 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2013-12-26 07:34:59 +0300

Seen: 1,588 times

Last updated: Mar 22 '14