Problem with rendering cyrillic character using Lobster font on Windows
I have problem with rendering cyrillic character using "Lobster font":http://www.google.com/fonts/specimen/Lobster on Windows. On Linux (Gentoo) all work fine on the same Qt version.
Here is the problem:
Screenshot form Windows 7 + Qt 4.8.4
I think a problem with WritingSystem, because:
qDebug() << fontDb.writingSystems("Lobster");
// (1, 29)@
How can I fix it?
I assume the top chars are from Linux and the lower chars are the result on Windows.
The writing systems are Latin and Vietnamese but that is probably because you have a font of last resort instead of Lobster.
Since we cannot see what you have done it is hard to say exactly what is going on. Installed the font in Windows? Reading it from a resource? Is QFont::exactMatch() true?
bq. I assume the top chars are from Linux and the lower chars are the result on Windows.
No. This screenshot from windows. Both lines.
I load font from file. Like in code in first post.
Yes this font also installed.
I setup font like this:
qDebug() << font.exactMatch(); // true
UPD: here is how it looks on linux (KDE, dark theme)
I have managed to reproduce it but have not worked out what is going on.
This is the code I used.
int main(int argc, char **argv)
QApplication app(argc, argv);
QFont font("Lobster", 32);
Yes. I have the same font md5 sum.
And your code also make the same result on Qt 4.8.4 and 4.8.5.
Should I post a bugreport?
UPD: also on Mac OS X font works fine, so bug only appears on Windows.
Same problem with Lobster.
The solution: open the lobster.ttf in font editor like FontLab and resave it with proper encoding parameters. Bad method, but it works!