Brent Welch wrote on 2000-08-01 16:10 UTC:
> Hi - thanks for your patience.  I've still been in font hell - never
> managing to get your nice utf-8 fonts installed for my Exceed X server
> running over windows.

Actually, it is not absolutely essential to have *-iso10646-1 fonts
installed to get UTF-8 display under Tk 8.1 or higher. Tk will use
various other 8-bit fonts to make a best-effort display. In fact,
Tk�8.4a1 still has a serious bug that causes it to ignore Unicode fonts
completely (see Tcl Developer Xchange bug reports TR#2349 and TR#4071),
and it mixes instead glyphs from various quite random 8-bit fonts, the
result of which often looks extremely ugly.

> exmh uses some mappings defined in its app-defaults file to choose the
> X font to display a message.  Also, Tcl 8.1 and higher converts all characters
> into UNICODE (actually, UTF-8) internally.  So, exmh tries to determine
> the character set and informs Tcl, which loads it into memory and does
> the conversion automatically. (see Mime_SetFileEncoding in mime.tcl)
> Tk then does some heuristic font mappings
> to choose glyphs for each character.
> 
> You can help exmh by setting up the font mapping. I'll excerpt the
> relevant mappings from the exmh lib/app-defaults file.  If you can
> figure out how to trick it into using your fonts, I'll gladly pick up
> the changes.

> -----  So, I think you might be able to do something like this.
> 
> *mimeCharsets: us-ascii iso-8859-1 iso-8859-8 iso-2022-jp koi8-r iso-8859-2 
> utf-8
> 
> *mime_utf-8_registry: iso10646
> *mime_utf-8_encoding: 1
> *mime_utf-8_plain_families: fixed
> *mime_utf-8_fixed_families: fixed
> *mime_utf-8_proportional_families: fixed
> *mime_utf-8_title_families: fixed

I now have at the end of my .Xdefaults file added the following lines:

!
! Exmh
!
exmh.mimeUCharsets:                     utf-8
exmh.mime_utf-8_registry:               iso10646
exmh.mime_utf-8_encoding:               1
exmh.mime_utf-8_plain_families:         fixed
exmh.mime_utf-8_fixed_families:         fixed
exmh.mime_utf-8_proportional_families:  fixed
exmh.mime_utf-8_title_families:         fixed

and then Exmh 2.1.2 recognizes UTF-8 email and displays it. Before that,
I tried to add your lines to .exmh-defaults, but they were simply
ignored there.

As expected, the result looks rather ugly (many different fonts mixed),
but that is no doubt due to the above-mentioned Tk 8.1-8.4a1 bug, not
due to a problem with exmh. It seems we first have to make some progress
on the Tk front with Unicode fonts before further improvements in exmh
make sense.

Nevertheless, I would recommend to add already now your above lines to
the standard configuration lib/app-defaults of exmh.

Who should I best talk to with regard to this Tk Unicode font handling
problem?

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>


-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/

Reply via email to