Missing non-latin characters

94 views
Skip to first unread message

Paweł "Gibol" Gibaszek

unread,
Apr 19, 2013, 12:41:33 PM4/19/13
to andro...@googlegroups.com
Hello!
I have a problem displaying some of polish characters in my android app.
ó ł are displaying ok, but instead of żźćśńąę i get [].

            Text{


                font.family: "DroidSansFallback" 
                text: "żęłśńóć" }

I've checked and DroidSansFallback has these characters on my device.
QML file is UTF-8 encoded.

I've even tried:
viewer.setFont(QFont("DroidSansFallback");
 
but without sucess.

Any ideas how to fix it?
I'm planing to relese on Google Play at the end of this month :) 
 

Sebastian Diel

unread,
Apr 19, 2013, 2:20:54 PM4/19/13
to andro...@googlegroups.com
Am 19.04.2013 18:41, schrieb Paweł "Gibol" Gibaszek:
> I have a problem displaying some of polish characters in my android app.
> ó ł are displaying ok, but instead of żźćśńąę i get [].
[...]
> Any ideas how to fix it?
The bugs
https://bugs.kde.org/show_bug.cgi?id=304196
and
https://bugs.kde.org/show_bug.cgi?id=309680
seem related.

In the thread to the latter, Karl-Heinz suggests:
"What You can do is: Enumerate all available fonts on the platform with
QFontDatabase::families. Some of them seem to be complete (at least with
german umlauts)."

In the first, lasconic proposes:
"As a workaround, Roboto can be defined as the application font with
app.setFont("Roboto"). This workaround seems to work for ICS+ and
doesn't break 2.3.3+"

Sebastian

Paweł "Gibol" Gibaszek

unread,
Apr 19, 2013, 2:50:31 PM4/19/13
to andro...@googlegroups.com


W dniu piątek, 19 kwietnia 2013 20:20:54 UTC+2 użytkownik SeDi napisał:
Am 19.04.2013 18:41, schrieb Paweł "Gibol" Gibaszek:
> I have a problem displaying some of polish characters in my android app.
> ó ł are displaying ok, but instead of żźćśńąę i get [].
[...]
> Any ideas how to fix it?
The bugs
https://bugs.kde.org/show_bug.cgi?id=304196
and
https://bugs.kde.org/show_bug.cgi?id=309680
seem related.

In the thread to the latter, Karl-Heinz suggests:
"What You can do is: Enumerate all available fonts on the platform with
QFontDatabase::families. Some of them seem to be complete (at least with
german umlauts)."
I took the font I'm talking about from the device and on linux it displays all of the polish chars correctly.


 

In the first, lasconic proposes:
"As a workaround, Roboto can be defined as the application font with
app.setFont("Roboto"). This workaround seems to work for ICS+ and
doesn't break 2.3.3+"

Sebastian

I'm testing on gingerbread, there is no roboto font. 

Paweł "Gibol" Gibaszek

unread,
Apr 24, 2013, 1:41:38 PM4/24/13
to android-qt
I've managed to fix it.
There is roboto font on my device, I was looking at file name not
actual name in the font.
DroidSans.ttf is "Roboto".

app->setFont(QFont("Roboto"));
and
font.family: "Roboto" in QML fixes everything.

I just had to figure it out myself ;)
Thanks anyway.
Reply all
Reply to author
Forward
0 new messages