0
votes

Am developing a Delphi firemonkey desktop application with XE5.

I use Unicode characters to localize the application (Asian language call Sinhala).

Everything is perfect with windows 7 (We haven't tested it with Vista). But when we test it with windows XP, it display every character as a box (except in title bar).

What is the problem? Is delphi firemonkey support unicode in XP?

Is there any way to get it display correctly on XP?

(This happens only with firemonkey, everything is OK with VCL. Since am going to make it support for MAC, I have to use firemonkey.)

3
Maybe a missing font?jpfollenius
Windows XP needs a special Far East Language pack to properly support Asian, and Indic languages. That is off topic on this site. Also note that XP lacks the support to automatically subsitute valid far-east language glyphs from a base font, for fonts that lack a full Unicode subrange for your chosen language. In short XP is a terrible place to deploy your apps in 2013, what did you expect?Warren P

3 Answers

4
votes

AFAIK FireMonkey does not implement the so-called Font fall-back mechanism. It does not use the Uniscribe API.

I suspect the font you are using (e.g. Tahoma) does not contain the needed characters in XP - whereas the TTF file included with Seven/Vista does contain them. So FireMonkey is not able to display the text as expected in XP.

Change the font to one having all needed glyphs. You may have "Arial Unicode MS" available, even on XP, if you have MSOffice installed.

By default, the VCL renderer uses the ExtTextOut GDI API which does implement font fall-back, so it automagically searches the installed fonts for the missing glyphs.

1
votes

To properly use/display Unicode the OS has to support unicode strings and you have to have fonts installed that can display the Unicode characters. Since their are 65000+ characters not all font manufacturers include every Unicode character.
I think the FireMonkey app uses a font that does not contain Sinhala characters. Play with the font used by the app.

If you need a Sinhala font, the wonderful Alan Wood’s Unicode Resources has a section Large, multi-script Unicode fonts for Windows computers. The South Asian font page names several fonts you can try.
Alternatively, Googing "sinhala unicode font" will also give you plenty of suggestions.

0
votes

I have checked all these suggestions - but there is no useful turnout of my problem. I have found out the following facts.

  1. Changing the font to Arial MS Unicode or replacing Tahoma with a TTF file from Windows 7 doesn’t work.

  2. Changing the font to “Iskole Pota”, a font which support Sinhala Unicode symbols , solved the problem for TEdit component.

  3. All the components which are descendents of TTextControl don’t work with “Iskole Potha” solution.

  4. I have further noticed that changing the font to something like “Wingdings” for TTextControl descendants don’t show appropriate symbols either. They still show English.