Index

From: Narcís Calvet  Steema Software
Subject: Re: Unicode text display problems
Date: Tue, 23 Oct 2007 09:19:23 +0200
Newsgroup: steema.public.teechart7.activex  

Hello,

To show Unicode text at headers, axes title, etc you should do as in this
message:

http://www.teechart.net/support/viewtopic.php?t=6339

You could also have a look a the demos inlcuded with the ActiveX Unicode
version.


--
Best Regards,

Narcis Calvet
Steema Support Central
http://support.steema.com

"Important note: If you are a TeeChart registered customer, please post your
support questions at Steema's Support monitored Forums for customers:
http://support.steema.com for a prompter reply."


"Lietmeyer" wrote in message
news:$Qx5J%23IFIHA.1916@TEEPC.Steema.local...

Hi support team,

Unfortunately I have run into further problems with our multilang Unicode
version v7.0.1.4:

Generally in Windows XP, even complex scripts will be displayed correctly,
regardless of the chosen font if the following options are checked:

Control Panel->Regional and Language Options->Language->

Install files for complex script and right-to-left languages (including
Thai)

Install files for East Asian languages

If, for example, the Windows API functions DrawText() or TextOut() are used,
Windows uses font fallback to display the characters in a suitable font.
Unfortunately, this mechanism doesn't work in the TeeChart ActiveX control.
This applies to:

Headers,
Axis Names
Axis Labels
Marks
Legend contents.

I have done some manual text output in the event handler for
AfterDrawTChart; even using canvas.TextOut() doesn't work, I have to use the
API TextOut() function itself. However, this cannot be regarded as a
solution for all text output in TeeChart, if I have to handle all the
above-mentioned labels etc. manually. Somewhere, TeeChart must use something
like the Windows API TextOut() itself, so why doesn't it work there? Or do
you use something else?
If you are using the API TextOut(), I have noticed that, strangely enough,
the special characters not included in the set font are only interpreted
correctly if the string length (of the Unicode string) passed to the
TextOutW() function is not just its length, but 1 must be added to that
length, e.g. in C++

CString Label;
TextOut(...) or...
TextOutW(hDC, x, y , Label, Label.GetLength() + 1)

However, if no fallback font is required, beacuse the chosen font already
includes the respective characters, the extra string length is not needed,
in fact produces an error as one more "character" is shown.

DrawText(), however always does font fallback reliably, one doesn't have to
manipulate the string lengths in any way!

Could this apply to the internal TeeChart process?
Or can you offer some other solution for this problem?
It is unsatisfactory when characters correctly displayed in our software
appear as empty boxes in the TeeChart control.

Thanks in advance!

Best regards
P. Lietmeyer