From: "Richard Wordingham" <richard.wordingham@ntlworld.com>
To: <emacs-devel@gnu.org>
Subject: Re: [w32] display international HELLO
Date: Fri, 9 Nov 2007 08:37:42 -0000 [thread overview]
Message-ID: <001501c822ab$ccfec5e0$d5101252@JRWXP1> (raw)
On 31 January 2007, Takashi Hiromatsu wrote (archived at
http://lists.gnu.org/archive/html/emacs-devel/2007-01/msg01087.html ):
> I'm tring to display all the language's "HELLO" on Emacs on Windows by
> using original Microsoft true type fonts.
> --- Emacs/22.0.92 (i386-mingw-nt5.0.2195)
> I succeed many of them by "Arial unicode MS" font exept 7 language listed
> below.:
> Amharic
> Arabic
> Braille
> Hindi
> Kannada
> Malayalam
> Tibetan
> I wrote only font settings in my ~/.emacs shown below.
> ----------------------------------------------------------------------------
> (add-to-list 'default-frame-alist '(font . "fontset-default"))
> (set-fontset-font "fontset-default"
> 'mule-unicode-0100-24ff
> '("Arial Unicode MS*" . "iso10646-1"))
<snip>
> Off cource, "Amharic" and "Braille" can not be displayed by "Arial Unicode
> MS", becuase it does not have. But I hope to see other 5 languages by it.
> Is there any ways to display them?
> Or should I use other fonts?
Hindi and Malayalam are a tougher problem. Although the basic text is
encoded in mule-unicode-0100-24ff, 'composition' properties are actually
specified in the file. The composition property should provide renderable
text and mark-up which replace the basic text in the display, which ideally
should be totally unnecessary in an MS Windows system. (Realising this
ideal requires the ability to upgrade the Uniscribe library to cover extra
scripts and even newly admitted characters in supported scripts.) These
compositions are defined by elements for the charset indian-glyph, and its
characters have no specified Unicode equivalent. You need a non-Unicode
font to display these characters. Arial Unicode MS does not contain much in
the way of shaping tables, so it will not work properly for any of the truly
'complex' Indic scripts. (This may be why Microsoft seems to have abandoned
this font.)
Tibetan and Lao also use the composition property, but in terms of
characters in the same charset. However, I'm having display problems for
Lao - see item 3 below. Tibetan won't display for me as I don't have a font
that supports Tibetan.
I'm trying to understand how the input and display mechanisms of Emacs
22.1.1 work on Windows XP - I'm particularly interested in Indic scripts.
My machine is set up with Thai as its 'ANSI' character set. I'm seeing some
rather bizarre behaviours, and I'm having difficulty understanding them.
Once I realised that Emacs was not accepting Unicode input from the
keyboard, I tried to understand the built-in input methods. I investigated
Lao input.
1. With the default font, the Windows keyboard set to Thai Kedmanee, Thai
displays badly as it is typed. Bits of characters are left behind as the
typing position moves rightwards faster than it should. However, when I
switch to Code2000, a font with a wide Unicode coverage, Thai displays as
well as it does with native products such as Notepad. This may be because
the alleged default font, Courier New, has no Thai glyphs, and so glyph
metrics and glyphs bear no relationship to one another.
The Thai characters produced in this fashion are in one of the Unicode
charsets (mule-unicode-0100-24ff).
2. My first discovery with Lao was that just selecting a font (Code2000)
that supported Lao was not enough. It would not normally display Lao
characters (in the Lao charset), until I discovered that a trick such as
(set-fontset-font "fontset-myfont" 'lao '("Code2000" . "iso10646-1"))
suddenly made the Lao text displayable. How does this work? I have studied
the code of xdisp.c and its supporting functions, but I cannot find where
Emacs character codes are converted to Unicode. I did notice that if I
pasted Lao in from an MS application, Emacs would accept them as Unicode
characters and they would be displayed properly if I selected an appropriate
font.
3. Compositions of Lao characters, (i.e. with the 'composition' string
property) using the Code2000 font (the only fully working Lao font I have),
do not display properly, whether they are in the Lao or
mule-unicode-0100-24ff charset. With the latter I have seen left-hand parts
of Hangul syllables displayed instead of Lao! Perhaps when I understand how
uncomposed display does work, I will be able to understand this problem. At
present I need to defeat the composition logic by typing consonant + vowel
as <consonant, space, delete, vowel>! The text entered thus then displays
properly, mocking the hard work that has gone into carefully composing
grapheme clusters.
4. When I explicitly specify that a buffer is to be saved in UTF-8 (or one
of its variants), the Lao input method suddenly switches from generating Lao
characters in the Lao charset to generating Lao characters in the
mule-unicode-0100-24ff charset. How is this effect achieved? I can't work
it out. Characters already stored in the Lao charset remain in the Lao
charset in the buffer, as confirmed by C-x C-e (eval-last-sexp).
Bizarrely, selecting UTF-16 as the encoding for saving the buffer does not
change the charset used by the Lao charset.
5. Possibly not news, but I have found that with a Uniscribe that supports
Khmer, Unicode-encoded Khmer text pasted in to Emacs displays properly,
including 'Indic rearrangement'. As far as I can tell, Emacs 22.1 has no
support for Khmer! (Cursor positioning does look wrong for Khmer.) When I
understand what is happening with Lao, I intend to write an input method for
Khmer - unless I find Emacs on Windows has evolved to accepting UTF-16 as
the coding system for keyboard input.
6. Latin ligaturing does not work. 'Caesar' with a ZWJ between 'a' and 'e'
does not ligate even using a font for which it does ligate in Notepad.
Perhaps that can get swept up with the handling of Unicode viramas, i.e.
Indic conjuncts.
Richard.
next reply other threads:[~2007-11-09 8:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 8:37 Richard Wordingham [this message]
2007-11-09 10:55 ` [w32] display international HELLO Eli Zaretskii
2007-11-09 12:40 ` Kenichi Handa
2007-11-15 2:48 ` Richard Wordingham
2007-11-19 2:35 ` Kenichi Handa
2007-11-19 8:51 ` Jason Rumney
2007-11-20 1:49 ` Richard Wordingham
2007-11-20 11:30 ` Jason Rumney
2007-11-20 12:50 ` Kenichi Handa
2007-11-21 1:51 ` Richard Wordingham
-- strict thread matches above, loose matches on Subject: below --
2007-01-31 6:34 Takashi Hiromatsu
2007-01-31 6:51 ` Kenichi Handa
2007-01-31 7:07 ` Takashi Hiromatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001501c822ab$ccfec5e0$d5101252@JRWXP1' \
--to=richard.wordingham@ntlworld.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.