comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDLgrFont national character set problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDLgrFont national character set problem [message #29856 is a reply to message #29745] Wed, 20 March 2002 15:44 Go to previous message
Dick Jackson is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: RSI Remains Committed to Mac OS X
Next Topic: Bug in 5.5 on Win 2k?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 00:15:23 PDT 2025

Total time taken to generate the page: 0.79910 seconds