comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: IDLgrFont national character set problem
items: Re: IDLgrFont national character set problem

IDLgrFont national character set problem
type: item
description: 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
creator: alt
date: 2002-03-19T08:15:15-00:00

Re: IDLgrFont national character set problem
type: item
description: "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,…
creator: Dick Jackson
date: 2002-03-20T23:44:03-00:00

Re: IDLgrFont national character set problem
type: item
description: "Dick Jackson" <dick@d-jackson.com> wrote in message news:799m8.7$zB4.3110386@shaw-ty2... Good answer, Dick. I have a couple of things to add. > ...otherwise you will need to find a full Unicode TrueType font to use. Look here for Unicode-aware fonts: http://www.hclrss.demon.co.uk/unicode/ The following thread has some discussion on Unicode in IDL. (I have no idea whether this link will work as written, but that's what comes up in my browser address bar.) http://groups.google.co.nz/groups?hl=en&ie=ISO-8859-1&am p;oe=ISO-8859-1&threadm= 966808985.242925%40clam-ext&rnum=1&prev=/groups%3Fq% 3Dunicode%2Bhadfield%2Bg roup:comp.lang.idl-pvwave%26hl%3Den%26ie%3DISO-8859-1%26oe%3 DISO-8859-1%26se lm%3D966808985.242925%2540clam-ext%26rnum%3D1 -- Mark Hadfield m.hadfield@niwa.co.nz Ka puwaha et tai nei http://katipo.niwa.co.nz/~hadfield Hoea tatou National Institute for Water and Atmospheric Research (NIWA)
creator: Mark Hadfield
date: 2002-03-21T00:19:25-00:00

Re: IDLgrFont national character set problem
type: item
description: 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
creator: alt
date: 2002-03-22T04:38:14-00:00