IDLgrFont national character set problem [message #29745] |
Tue, 19 March 2002 00:15  |
alt
Messages: 28 Registered: August 2001
|
Junior Member |
|
|
Continue to ask questions on Object Graphics with answers seem hiding
deep in IDL help ;-)
Do IDLgrFont or IDLgrText allow choosing national character set
(Cyrillic in my case) of TTF fonts on Windows?
In Direct Graphics I use DEVICE, SET_FONT & XYOUTS, FONT = 0 and font
is set as Cyrillic as default, because I have Russian version of
Windows. In OG I get only rubbish. May be some font modifiers doing
this?
And may be anybody can advice free procedure for interactive font
picking for Windows?
Thank you in advance.
Best regards,
Altyntsev Dmitriy
Remote Sensing Center, ISTP
Irkutsk, Russia
http://ckm.iszf.irk.ru
|
|
|
Re: IDLgrFont national character set problem [message #29829 is a reply to message #29745] |
Thu, 21 March 2002 20:38  |
alt
Messages: 28 Registered: August 2001
|
Junior Member |
|
|
Thanks a lot, I have two variants of doing multilingual support in OG
now:
1. Use old Russian fonts for Windows 3.1. They have Russian characters
in upper part of set. Advantage: not demand unicode conversion.
Disadv: fonts should be installed, small assortment of "ready-made"
fonts.
2. Use of !Z formatting (it is really not obvious to find it in help
if you don't know what Unicode means). Adv: wide range of fonts.
Disadv: convertion utility should be written (not hard though)
Best regards,
Altyntsev Dmitriy
Remote Sensing Center,
ISTP Irkutsk, Russia
http://ckm.iszf.irk.ru
|
|
|
|
Re: IDLgrFont national character set problem [message #29856 is a reply to message #29745] |
Wed, 20 March 2002 15:44  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
"Altyntsev Dmitriy" <alt@iszf.irk.ru> wrote...
>
> Do IDLgrFont or IDLgrText allow choosing national character set
> (Cyrillic in my case) of TTF fonts on Windows?
>
> In Direct Graphics I use DEVICE, SET_FONT & XYOUTS, FONT = 0 and font
> is set as Cyrillic as default, because I have Russian version of
> Windows. In OG I get only rubbish. May be some font modifiers doing
> this?
This may be helpful to you: I have learned that Unicode fonts can work in
IDLgrText objects (thanks, RSI tech support)
Here's an example to show how this works, using Roman, Cyrillic and Chinese
text. It will work if you have the 'Arial Unicode MS' font (comes with
Office 2000), otherwise you will need to find a full Unicode TrueType font
to use.
=====
PRO OGFontTest
mywindow = OBJ_NEW('IDLgrWindow', DIMENSIONS=[400,400])
myview = OBJ_NEW('IDLgrView', VIEWPLANE_RECT=[0,0,10,10])
mymodel = OBJ_NEW('IDLgrModel')
myview -> Add, mymodel
myfont = OBJ_NEW('IDLgrFont', 'Arial Unicode MS',SIZE=48)
mytext1 = OBJ_NEW('IDLgrText', FONT=myfont, /Enable_Formatting, $
'!Z(61,62,63)', LOCATION=[3,7], $
COLOR=[50,100,150])
mymodel -> Add, mytext1
mytext2 = OBJ_NEW('IDLgrText', FONT=myfont, /Enable_Formatting, $
'!Z(0418,0420,041A,0423,0426,041A)', LOCATION=[1,4.5], $
COLOR=[50,100,150])
mymodel -> Add, mytext2
mytext3 = OBJ_NEW('IDLgrText', FONT=myfont, /Enable_Formatting, $
'!Z(5510,601D,541B)', LOCATION=[2,2], $
COLOR=[50,100,150])
mymodel -> Add, mytext3
mywindow -> Draw, myview
END
=====
You can use the Windows Character Map to find codes, choose Font 'Arial
Unicode MS', Advanced view and Character set 'Unicode'.
I think the conversion from a Unicode file or byte-stream to the '!Z(...)'
format is a bit awkward, but quite possible.
P.S.: RSI has a feature request for Unicode support in widgets that display
text. I think that would really round things out for multilingual display.
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|