Cannot put stresses at greek letters
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
Installed the 0.9.21c version of Tux Paint under Windows 7 64bit Pro (English Version). When I tried to write a couple of greek words in the program, I realisded that I cannot put stresses to the words! I attached a screenshot.
Processor: Core 2 Quad Q9300
VGA: nVidia GForece 9600GT
RAM: 4GB
Windows 7 64bit Pro (English) up to date (UAC Activated)
Screen resolution: 1920x1050
A screenshot of the bug
I don't actually know anything about Greek, but a quick Google suggests to me that the stresses are, for example, ά, Ά, έ, Έ, η, Ή (stressing α, Α, ε, Ε, η, Η, respectively).
If that's the case, then I'm able to enter stress characters in Tux Paint in CVS as of today (what will become 0.9.22) (and I imagine it works fine in 0.9.21 as well, since I don't believe anything related to this has changed).
In KDE on Ubuntu 9.04, I'm using the "KDE Keyboard Layout Switcher", which simply calls "setxkbmap" with "-layout gr". When in Greek mode, if I type the [;] key on my keyboard (right of the [L] key), and then type a vowel key ([A], [E], [H], etc.), the characters shown above appear.
This is true in Kate (KDE text editor), Google Chrome (browser I'm using to access SourceForge.net Tracker right now), and Tux Paint (regardless as to whether I ask Tux Paint to run with its UI translated to Greek). See attached screenshot. I'm not sure how you enter Greek characters in Windows 7, but if it works in a program like Notepad, Word or your web browser, try using the same keystrokes in Tux Paint's 'Text' tool. If that doesn't work, then please let us know.
Also, if the characters I'm talking about (ά, Ά, etc.) are not the 'stressed' characters that you're talking about, then please accept
my apology. It'd help if you provide more information. I doubt it, but it may be necessary to add some Greek input method (IM) support to Tux Paint.
Thanks in advance!
Tux Paint CVS (0.9.22) on Linux with stressed vowels in Text tool
Yeah, that is correct, the letters which are "stressed" in Greek, are all vowels (that is ' α ', ' ε ', ' ι ', ' υ ', ' η ', ' ο ', ' ω ' like ' ά ', ' έ ', ' ί ', ' ύ ', ' ή ', ' ό ', ' ώ ') and the "process" of "stressing" letters is pressing the key next to 'L' in all keyboards (the ";/:" key) and then typing the desired letter. E.g., to "stress" ' α ' you've just to press the ";/:" key and then type ' α '; you'll take ' ά '. This process, does not work in Tux Paint. It leaves them "unstressed". Unicode currently supports all Greek characters, including all "stressed" letters. The "stressed" letters are also capital (e.g. ' Ά ').
Note that the process I described you, works not only in Windows 7 but everywhere; that is, all Windows versions (beginning 3.1), Mac OS, Linux etc. It is the "official" process.
Ok, it's interesting that it doesn't work for you on Windows 7, while it does work for me under Linux. Looping John Popplewell in, to see if he can confirm. I'll also ping the libSDL mailing list.
I just tried the checkkeys test program in SDL on Windows XP with the Greek keyboard selected. It generates the same code for 'a' as it does for ';a':
Key pressed: 97-a (0x3B1) modifiers: NUM
Key released: 97-a modifiers: NUM
Key pressed: 59-; (0x384) modifiers: NUM
Key released: 59-; modifiers: NUM
Key pressed: 97-a (0x3B1) modifiers: NUM
Key released: 97-a modifiers: NUM
I can take a look at it,
cheers,
John.
I had a look at the relevent SDL key handling code and added some tracing. In its current state it doesn't handle dead-key + key sequences correctly and I didn't manage to get it to work.
Currently, even the (unused by SDL) WM_CHAR message is just receiving ASCII characters. I changed the window creation code and associated functions to use the W versions of the functions and WM_CHAR started receiving 16-bit characters but the dead-key + key processing still wasn't working so I gave up for a bit.
I'll have another try tonight, I think I might need to call the rest of the W functions, wish me luck!
John - Are your comments related to just the Win32 version of SDL? (Like I said, I seem to be able to compose stressed Greek characters under Linux; SDL 1.2.13)
Yes, it's a win32 specific problem in SDL. It should 'just work' but SDL, for reasons to do with getting the raw key press/release messages, seems to be sabotaging the automatic handling of the dead character + character sequences.
I made a small non-SDL test program, and, if the main window is created as a Unicode window instead of an ASCII window (if those are the correct terms, basically using the W or A versions of the win32 functions) then the dead-character + character handling is automatic.
Still looking into it
So, this is only a Windows problem. When you fix that, you will include this mini-update in 0.9.22 or into a later version?
The problem is the win32 function ToUnicode() which messes up the dead-key decoding. Not found/figured out a solution yet, although it's a problem others have encountered.
I see, that's OK.
Some feedback from John P. on Jan. 27th:
"no easy fix that I can see. SDL-1.3 has a redesigned mechanism I believe, but I think I can get SDL-1.2 to work by making a relatively complex change, one that would probably not be accepted by the maintainers."
So we might be stuck with this issue on the Win32 side. It'd be interesting to know if other libSDL-based apps that accept text input (and that should accept Greek) work properly on Windows, or if they only work right on Linux. (It'd also be good to know if this issue affects Mac OS X.)
How could I know whether an application uses the libSDL? I would be grateful to test it.
P.S.: I cannot test it on MacOS X but, I recently checked it out on Ubuntu 10.04. The keyboard is fine, except the case in which the user put stress and diaeresis on the letter " ι ". (That is: " ΐ", meaning " ΄ " and " ¨ ".
I can report the same problem for Scottish Gaelic - à is displayed as `a etc. So, it seems to be a general problem with combined keystrokes to create a letter.
Question: Does upgrading the libSDL.dll help with this problem, as it does with #160 (see: http://sourceforge.net/mailarchive/message.php?msg_id=30750341, https://sourceforge.net/p/tuxpaint/bugs/160/)
Please test this in 0.9.22 (RC3 was posted the other day, first official is coming as soon as someone (e.g., Shin-Ichi) builds it for me!)
@lefteris008 & @gunchleoc -- It's been a few years now. Can you let us know whether this problem persists using the latest version of Tux Paint (0.9.26 from June 2021)? Thanks!
On Linux, accents work on lower-case letters but are missing on upper-case letters, e.g. I get Uù instead of Ùù. On Windows, it's working. I tried both the Text and the Label buttons. ETA: Linux is an older version, need to compile myself. ETA2: Compiled current master, bug is still there on Linux Mint.
Last edit: GunChleoc 2021-09-01
Attached is a screenshot showing input of various accented characters. Kubuntu 20.04 "focal" Linux, Tux Paint from master, US keyboard with "Left Win" (Windows key) set as the "Compose key" (since I have no right Windows key) in the KDE "Keyboard" system settings module, using Tux Paint.
I can get many characters, e.g., á, ü, etc., including some uppercase ones like Ł, €, Ų, etc. -- but I confirm I cannot get letters with diacritics above the letters -- e.g. when I try to enter "Ú", it only comes out as "U".
Oof!
Ah! For things like Ú, it seems to be a font issue! Some fonts show it just fine for me, @gunchleoc. Other fonts show the ' cut off at the top (sometimes to varying degrees, depending on how large I make the letters, using the up/down arrows in Tux Paint). So this is a different issue, for which I'll open a ticket.
The issue of Greek letters not composing properly in Tux Paint, on Windows, is still something that needs testing with a more recent version of Tux Paint. (@lefteris008, are you out there?) If it works now, we can simply close this ticket.
Feel free to tag me in the other issue once it's ready for testing.
Accented Greek characters are working for me. I don't know which version fixed it, but 0.9.24 is working fine.
Last edit: Billy A. 2022-12-17
As of 0.9.28, Tux Paint is now built using SDL2. I just tried master branch (what will be 0.9.29) on Ubuntu Linux and using the first font that was placed at the top of the list of fonts when I use the Text tool in Tux Paint, I was able to hit modifier+;, then Shift+U to produce a Ú.
I'd appreciate it if people who are more familiar with Greek can test under various OSes, since it seems like sometimes the issue was OS-specific. I'm hoping that the change to SDL2, and many other changes we made in the past decade, have solved the issues and we can finally close this ticket. :-)
So far everyone who has looked at it reports it's working okay, so going to close this one.