Hello everybody.
If you remember my question about UTF-8 in FLTK-2.0, I want to tell what I've 
found. If I'm wrong, please correct me.
In FLTK I found Layout commands (@ and &). With them I tried to make individual 
characters bold and italic. Everything was OK with standard letters and Russian 
(I think it is related to all UTF8 characters, but I'm not sure about 
Japanese). I've got my strings bold and italic. But when I tried to use 
underscore format with &, only English letters were underscored. Russian looks 
like the &-sign before desired letters.
When I looked through src/*.cxx and test/*.cxx files, I found nothing about 
UNDERSCORED font format, but found BOLD and ITALIC. I think it is ommited 
because of crossplatforming compatibility, or anything else. Maybe default 
fonts can't display these characters. By the way, I've launched 
fltk-2.0/test/fonts and there were only two format flags "bold" and "italic".
Can you tell me, is there a way to display underscored UTF-8 characters? Also I 
want them to react at ALT+char_key in menu (such as &File ALT+F).
Also I want to tell something maybe new to all of you. The current subject of 
my talk is menu shortcuts. I tried to create a shortcut with FLUID2 with 
Russian letter. I successfully created it, but it was usual English combination 
despite of the keyboard layout. When I launched fltk-2.0/test/keyboard, I saw, 
that shortcut doesn't depend on the layout, but key pressed. I think it work 
like Windows' virtual key codes. I'm agree with this, but I want display not 
CTRL+S (for ex.) but CTRL+Ы (the same key_code, but different key_text), 
Because of users, of course if I display menu in Russian language they won't 
understand why the English keys are there...
O'k, I tried the same way in GTK2+ library. Just to see, how it works. Yes, it 
displayed Russian letters undescored, ALT also works on them but shortcuts work 
separately in different layouts (if I said to use CTRL+S, CTRL+Ы doesn't work 
and vice versa). But when I saw intermediate code from this shortcut, I saw, 
that they use GDK_Cyrillic_yeru unsigned integer (or XK_Cyrillic_yeru == 
0x06d9). So I decided to use this integer in Menu::add(...) function as 
add(..., CTRL | 0x06d9,...). And I've got what I want :( In menu there was the 
next view: "File-->Exit   CTRL+Cyrillic_yeru". Of course, this combination 
wasn't handle.
My friend found the line 384 in src/drawtext.cxx:
if (isalnum(*q)) underscore = true;
    else {++p; goto SKIP_LETTERS;}
it is said, that isalnum works only with A-Z, a-z, 0-9 letters. So maybe that 
is why it can't use UTF-8 chars? or maybe it can handle them, but can't 
underscore...
Well, I've tried to rewrite it as underscore = true; as I'm agree with 
underscoring every letter... it works, but not for ALT+Rus_key combinations.
Please write me your answers, or suggestions about my problem. (or you don't 
think that this is a problem it is just the other way :) ).

OS: Ubuntu 7.04 (also I want to compile a project in Windows with small amount 
of compatibility problems), locale = ru_RU.UTF-8. fltk-2.0.x-r5940


Thank for your attention.
(p.s. sorry, if you get this message several times before. I have a problem 
with inet, so it looks like my message wasn't succefully delivered)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to