[Qt-interest] Problem with russian fonts
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Thu Jan 29 14:35:16 CET 2009
Hello,
???????? ??????? wrote on Thursday, January 29, 2009 9:55 AM:
^^^^^^^^^^^^^^^^^^^^^^
as you see, your problem is a well-known problem ;) (But this one is probably not due to Outlook - which I am forced to use - but to QuoteFix tool, which converts everything to plain and properly quoted text).
> Hello all,
>
> I have compiled Qt-4.4.3 from sources, but when I run example text
> editor from qtdemo, it is unable to display russian fonts. Only
> little squares with dashed borders are displayed.
This is because the current font which is being used cannot display that range of Unicode characters, hence the little squares. But I guess you have figured out that much by yourself ;)
> How can I fix the problem?
First, make sure that you have indeed installed a font which is able to display the "cyrilic Unicode range". Configure this font so that it is available to your applications (how to do that is system-dependent. If you're running KDE there is a system settings dialog somewhere which lets you install TrueType/OpenType fonts quite conveniently).
Test with other applications (OpenOffice, KEdit, ...) whether they can use this font (whether it is "properly installed").
Are you able to display cyrilic characters with other (non-Qt) applications?
Once that works make sure that, in your Qt application, you actually "select" this font when displaying text (*).
In the demo application (the example text editor) select the proper font in the font selector dialog (if that example has one, can't remember anymore).
Cheers, Oliver
(*) Actually Qt (respective the underlying font rendering system, FreeType (?)) should be able to automagically pick a proper font when it encounters a character which it cannot display with the current font (at least when the "encoding" of the text is set to Unicode). But it could be that this is also application dependent (been a while since I messed around with TrueType fonts and Qt 3.3 ...).
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list