From: Bill Kendrick <nbs@so...> - 2007-04-26 23:50:46
Mark K. Kim has added alternative input method support to Tux Paint,
currently available in CVS. This will allow more languages to be used
with Tux Paint's "Text" tool!
Currently, in the Japanese locale, you can switch between normal (Latin),
Romanized Hiragana, and Katakana input modes. In the Korean locale, you can
switch between normal mode and Hangul 2-Bul input modes.
The README in CVS says this about it:
International Character Input
Tux Paint allows inputting characters in different languages. Most
Latin characters (A-Z, n~, e', etc.) can by entered directly. Some
languages require that Tux Paint be switched into an alternate input
mode before entering, and some characters must be composed using
When Tux Paint's locale is set to one of the supported languages
that require an alternate input mode, press the right [Alt] or right
[Option] key to cycle through normal (Latin character) and
Currently supported locales, and their input methods, are listed
below. Note: Many fonts do not include all characters for all
* Japanese -- Romanized Hiragana and Katakana
* Korean -- Hangul 2-Bul
and the EXTENDING docs in CVS discusses how to create new character mappings:
Alternative Input Methods
As of version 0.9.17, Tux Paint's "Text" tool can provide alternative
input methods for some languages. For example, when Tux Paint is running
with a Japanese locale, the right [Alt] can be pressed to change between
Latin, Romanized Hiragana and Katakana modes. This allows native
characters to be entered into the "Text" tool by typing one or more keys
on a keyboard with Latin characters (e.g., a US QWERTY keyboard).
To create an input method for a new locale, create a text file with a
name based on the locale (e.g., "ja" for Japanese), with ".im" as the
extension (e.g., "ja.im").
The ".im" file can have multiple character mapping sections for
different character mapping modes. For example, on a Japanese typing
system, typing [K] [A] in Hiragana mode generates a different Unicode
character than typing [K] [A] in Katakana mode.
Start each character mapping section with the word "section", the follow
it with the mappings, one per line. Each line should contain (separated
* the Unicode value of the character, in hexadecimal
* the keycode sequence (the ASCII characters that must be entered to
generate the Unicode character)
* a flag (or "-")
304B ka -
304C ga -
304D ki -
304E gi -
30AB ka -
30AC ga -
30AD ki -
30AE gi -
Note: Blank lines within the ".im" file will be ignored, as will any
text following a "#" (pound/hash) character -- it can be used to denote
comments, as seen in the example above.
Note: Flags must be set up on a per-locale basis (within the source
code, in "src/im.c"). For example, "b" is used in Korean to handle
Batchim, which may carry over to the next character.
Note: Additional input method support requires additions to Tux Paint's
source code (/src/im.c), and requires updates to the Makefile, to have
the ".im" files installed, for use at runtime.
Sooo... feel free to start sending me ".im" files and we'll try to figure
out how to get them working in the next release of Tux Paint.
Big thanks to Mark for adding this new feature to Tux Paint!