Board index » delphi » Font.Charset problem

Font.Charset problem

I am trying to develop a multilanguage (Danish & Lithuanian) app.
Lithuanian requires the BALTIC_CHARSET rather than the ANSI_CHARSET needed
for Danish.  I can successfully write to a form's canvas by doing:

  Canvas.Font.Charset := BALTIC_CHARSET
  Canvas.TextOut (x1, y1, ALithuanianStr);

where ALithuanianStr might be defined as:

 const
   ALithuanianStr : String = #$E0 + #$E8;

The above two char string consists of  LATIN SMALL LETTER A WITH OGONEK
followed by LATIN CAPITAL LETTER C WITH CARON (according doc of code page
1257 - Windows Baltic Rim).

My problem is that I need to have Lithuanian Captions in labels, buttons
etc. and I just can't get this to work.  I try doing something like:-

MyBtn.Font.Charset := BALTIC_CHARSET
MyBtn.Caption := ALithuanianStr;

...but is doesn't work.  It seems always to use the ANSI codepage.  Can
anyone help me with this?

I am using Windows 98 (with Multilanguage support including Baltic and
EastEuropean installed) and Delphi 5 Pro.

TIA

John O'L
Leapgate Ltd., UK

 

Re:Font.Charset problem


OK Not to worry.  Found my problem (after several hours staring at it!).

I had forgotten to change the font name to a font that supported the Baltic
codepage!

Sorry for troubling the newsgroup.

John

Quote
>My problem is that I need to have Lithuanian Captions in labels, buttons
>etc. and I just can't get this to work.  I try doing something like:-

>MyBtn.Font.Charset := BALTIC_CHARSET
>MyBtn.Caption := ALithuanianStr;

>...but is doesn't work.  It seems always to use the ANSI codepage.  Can
>anyone help me with this?

>I am using Windows 98 (with Multilanguage support including Baltic and
>EastEuropean installed) and Delphi 5 Pro.

>TIA

>John O'L
>Leapgate Ltd., UK

Other Threads