"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
|