[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
two questions...
From: "Dmitry Baryshev" ####@####.#### Date: 9 Jun 2008 09:45:55 -0000 Message-Id: <39840bc80806090245x43ac8017n223ce99546811a14@mail.gmail.com> Hi. I have two small questions about microwindows-0.91: 1) How to set multiline text to 'static' component? 2) How to use utf8 text in all components where text is rendered (comboboxes, listboxes, static text etc.). My locale is ru_RU.UTF-8 and I have some utf8 strings (in russian) read from XML file. How to display them properly? Thanks in advance. -- Regards | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] two questions...
From: "Greg Haerr" ####@####.#### Date: 10 Jun 2008 23:33:56 -0000 Message-Id: <015701c8cb52$b763b1a0$6401a8c0@winXP> : 1) How to set multiline text to 'static' component? I assume you're talking win32 api. This likely needs to be added to the custom control. : : 2) How to use utf8 text in all components where text is rendered : (comboboxes, listboxes, static text etc.). My locale is ru_RU.UTF-8 : and I have some utf8 strings (in russian) read from XML file. How to : display them properly? This sounds like a modification we need to make. Most, but not all, controls, end up calling an internal MwExtTextOut function (very similar to the ExtTextOut win32 call) that takes an encoding as the last parameter. This will likely need to be modifed to use a "global locale" setting, rather than what's currently passed. See the implementation in src/mwin for details. Let me know if you need more help. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] two questions...
From: "Greg Haerr" ####@####.#### Date: 12 Jun 2008 15:39:45 -0000 Message-Id: <044001c8cca2$ceefa800$6401a8c0@winXP> Please post to the list so others can learn and comment. : I converted all utf8 text strings into koi8-r. How to display them now : properly ? AFAIU I need to load some external font with koi8-r support : with GdCreateFont and set it somehow as default application font. Microwindows doesn't support koi8-r, you'll have to add an encoder/decoder in engine/devfont.c::GdConvertEncoding (I think), along with a new MWTF_KOI8R flag, and then pass this to the MwExTextOut mod described below. : : But when I tried to load koi8-r .pcf font taken from X11 distribution, : my app segfaulted. Then I took pcf loader (font_pcf.c), PCF spec from : fontforge documentation and found out that pcf loader from : microwindows is totally broken. It won't read most of .pcf fonts from : X11 distribution. it doesn't follow the spec in most cases where byte : order is used. That's bad news. Certainly the original PCF loader did comply, but was buggy in other areas. I've accepted other contributions without going over them in detail, and now you're saying it doesn't work at all... :( I assume you're running the latest CVS version, right? Please send the .pcf and .bdf file (if possible) for the font you're finding crashes nano-X. : : Let's assume that I have only koi8-r strings. How to display them now : properly in all controls (listboxes, static text etc.) ? :) My previous email described how to change the default system encoding: This sounds like a modification we need to make. Most, but not all, controls, end up calling an internal MwExtTextOut function (very similar to the ExtTextOut win32 call) that takes an encoding as the last parameter. This will likely need to be modifed to use a "global locale" setting, rather than what's currently passed. See the implementation in src/mwin for details. The default system font would likely have to be changed in the init code where the fonts are initially loaded (somewhere in mwin/winuser.c or winfont.c I think) : : Thanks. : : -- : Regards, Krasu. : : | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Fwd: [nanogui] two questions...
From: "Dmitry Baryshev" ####@####.#### Date: 12 Jun 2008 16:20:28 -0000 Message-Id: <39840bc80806120920u4b4ebda7ke365c4564e85641d@mail.gmail.com> ---------- Forwarded message ---------- From: Dmitry Baryshev ####@####.#### Date: 12.06.2008 16:43 Subject: Re: [nanogui] two questions... To: Greg Haerr ####@####.#### Hi, Greg. I converted all utf8 text strings into koi8-r. How to display them now properly ? AFAIU I need to load some external font with koi8-r support with GdCreateFont and set it somehow as default application font. But when I tried to load koi8-r .pcf font taken from X11 distribution, my app segfaulted. Then I took pcf loader (font_pcf.c), PCF spec from fontforge documentation and found out that pcf loader from microwindows is totally broken. It won't read most of .pcf fonts from X11 distribution. it doesn't follow the spec in most cases where byte order is used. Let's assume that I have only koi8-r strings. How to display them now properly in all controls (listboxes, static text etc.) ? :) Thanks. -- Regards, Krasu. -- Regards, Krasu. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |