�
�
Δionysus βenstein2018-06-20 18:54:08
Qt
Δionysus βenstein, 2018-06-20 18:54:08

Problem with QML fonts?

Hey! I'm having trouble displaying fonts on Android. On the computer they look just right. I did a separate resource file for fonts - it did not help. What is the problem? And in general, what advice can you give about developing mobile applications with Qt?

Screenshot from PC
5b2a7639ad760171528586.png
Screenshot from Android
5b2a766cd9173202692845.jpeg

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Jacob E, 2018-06-21
@Benstein

1. Is scale included?
2. There is a problem with different font sizes even when transferring between Windows and Linux, you can multiply font sizes in QML by a global constant, conditionally:

#ifdef Q_OS_ANDROID
    engine.rootContext()->setContextProperty("pt", 1,25);
#else
    engine.rootContext()->setContextProperty("pt", 1);
#endif

T
TriKrista, 2018-06-20
@TriKrista

Alternatively, the font size can be multiplied by a certain factor calculated from ppi, or you can use relative font sizes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question