unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
Subject: Implementing charset-aware X font names [was: Cyrillic vs UTF-8]
Date: Sat, 26 Apr 2003 12:55:49 +0900	[thread overview]
Message-ID: <87ist17vzu.fsf_-_@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <iluznme1ps2.fsf@latte.josefsson.org> (Simon Josefsson's message of "Fri, 25 Apr 2003 18:54:21 +0200")

>>>>> "Simon" == Simon Josefsson <jas@extundo.com> writes:

    PROBLEMS> * Characters from the mule-unicode charsets aren't
    PROBLEMS> displayed under X.

    PROBLEMS> XFree86 4 contains many fonts in iso10646-1 encoding
    PROBLEMS> which have minimal character repertoires (whereas the
    PROBLEMS> encoding is meant to be a reasonable indication of the
    PROBLEMS> repertoire).

*sigh*  "iso10646" is not meant to be an indication of repertoire.
See section 13 of the ISO 10646 standard.  It's intended to fix the
ISO 8859 ambiguity.  There is a deficiency in XFree86, but it's not
that the fonts are incomplete (note the word "implicit" in the XLFD
standard, that refers to current national encoding practice at
definition time, not to UCSes); that's gonna happen.  Why should a
Russian font designer provide Thai glyphs?  And what Thai in her right
mind would prefer those over native-designed fonts (without looking at
them)?

Instead, the font names and properties should provide encoding range
specifications instead of the useless "1" (which in ISO 10646-1 is not
an encoding specification, really).  As a first take, I think a
reasonable way to do this would be to specify that for the iso10646
registry the encoding field of an XLFD name should contain a
comma-separated list of Unicode block names, or a comma-separated list
of hex ranges xxxx..yyyy (can't use hyphens for the ranges,
obviously).  As long as the XLFD is otherwise fully-qualified (ie,
contains 14 hyphens), the block name format allows you to query with
"-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-*CYRILLIC*" and guarantee sane
results.  Mostly "*-iso10646-*CYRILLIC*" should work OK, too.  With
the hex range format, the app has to work harder, querying with
"-*-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" and checking for the ranges it
needs.  IIRC, since the actual font loaded is known to the server, you
could even have multiple such aliases, one for each block, and with
languages using multiple blocks (basically, all of them, since
everybody uses ASCII), you'd just want to be careful to query for the
"rare" blocks first.

This would also allow Emacs and other smart apps to create virtual
fonts (ie, in faces) by requesting Ryumin Light for the Han and Kana
blocks and Times-Roman for the Basic Latin and Latin-1 Supplement
blocks, as an alternative to X Font Sets.  (This would be nearly
trivial to implement in XEmacs since we use specifiers to implement
faces, and specifiers already do magic to connect charsets to font
registries.  I suppose it would be more work in GNU Emacs, but I
haven't looked at Emacs's font set code.)

Does this look like something reasonable for Emacs (and XEmacs) to
implement on the client side?  If so, I'll play with it a bit (note
that implementing this server-side is simply a matter of editing
fonts.aliases) and then put it in play with the X11 and XFree86
people.

-- 
Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

  reply	other threads:[~2003-04-26  3:55 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25 16:12 Cyrillic vs UTF-8 Simon Josefsson
2003-04-25 16:40 ` Eli Zaretskii
2003-04-25 17:09   ` Simon Josefsson
2003-04-25 22:39     ` Eli Zaretskii
2003-04-26  8:11     ` Kenichi Handa
2003-04-26 12:25       ` Simon Josefsson
2003-04-28  9:18         ` Kenichi Handa
2003-04-28 11:11           ` Simon Josefsson
2003-04-26 16:21       ` Benjamin Riefenstahl
2003-04-26 16:27         ` Benjamin Riefenstahl
2003-04-28  4:38       ` Richard Stallman
2003-05-01  8:27         ` Kenichi Handa
2003-05-02  7:06           ` Richard Stallman
2003-05-02 21:51             ` Eli Zaretskii
2003-05-03 13:37               ` Juanma Barranquero
2003-05-03 19:04                 ` Eli Zaretskii
2003-05-04 13:03               ` Richard Stallman
2003-05-04 11:04           ` Dave Love
2003-05-04 12:01             ` Simon Josefsson
2003-05-04 17:13               ` Dave Love
2003-05-04 18:03                 ` Simon Josefsson
2003-05-05  8:47             ` Kenichi Handa
2003-04-26 13:44     ` Richard Stallman
2003-04-26 14:10       ` Simon Josefsson
2003-04-28 21:49     ` Stefan Monnier
2003-04-28 22:29       ` Simon Josefsson
2003-04-29 13:49         ` Stefan Monnier
2003-04-29 14:27           ` Simon Josefsson
2003-04-30  4:42             ` Stephen J. Turnbull
2003-04-30  5:43           ` Richard Stallman
2003-05-19  0:40       ` Kenichi Handa
2003-05-19  0:52         ` Stefan Monnier
2003-05-19  2:31           ` Kenichi Handa
2003-05-19 13:28             ` Stefan Monnier
2003-05-19 13:49               ` Stefan Monnier
2003-04-25 16:54 ` Simon Josefsson
2003-04-26  3:55   ` Stephen J. Turnbull [this message]
2003-04-28 11:09     ` Implementing charset-aware X font names [was: Cyrillic vs UTF-8] Kenichi Handa
2003-04-28 12:27       ` Implementing charset-aware X font names Stephen J. Turnbull
2003-05-01 11:13         ` Kenichi Handa
2003-05-01 14:14           ` Alex Schroeder
2003-05-01 23:16             ` Kenichi Handa
2003-04-26  7:59   ` Cyrillic vs UTF-8 Kenichi Handa
2003-04-26 12:14     ` Simon Josefsson
2003-05-01  7:20       ` Kenichi Handa
2003-05-01 14:06         ` Alex Schroeder
2003-05-01 18:03         ` Customizing fontsets (was: Cyrillic vs UTF-8) Oliver Scholz
2003-05-02  5:17           ` Customizing fontsets Alex Schroeder
2003-05-02  6:32             ` Kenichi Handa
2003-05-02 13:25               ` Stefan Monnier
2003-05-03  0:40               ` Oliver Scholz
2003-05-03  1:50                 ` Kenichi Handa
2003-05-03 12:08                   ` Oliver Scholz
2003-05-07  1:22                     ` Kenichi Handa
2003-05-03  0:33             ` Oliver Scholz

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ist17vzu.fsf_-_@tleepslib.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).