emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HELLO changes


From: Dave Love
Subject: Re: HELLO changes
Date: Thu, 16 Oct 2003 14:52:37 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux)

Juri Linkov <address@hidden> writes:

> For languages that I can tell with certainty about, information on the
> Web page is more correct than in the locale database.  Curiously enough
> why they are different given that they are created under one
> project.

I think there are several sources of information collected there.
It's a pity there doesn't seem to be an authoritative version of this
information.  I guess it's not very important, and native speakers who
care can submit corrections.  I'll change ones you can convince me about.

> I meant that separate file could contain the same text as the HELLO
> file currently has, but written by characters from mule-unicode-*
> character sets (I suppose that all characters in HELLO from
> non-Unicode character sets have their correspondence in Unicode table)
> and encoded by the same iso-2022 coding system (as they are encoded
> currently in Unicode section you proposed to delete from HELLO file).

I'm not sure I understand, but HELLO in the Emacs 22 code base
demonstrates some of the issues.  It is encoded as iso-2022.

> But seems this file will be useful only for developers and testers to
> see why letters of the same alphabets written by characters from
> different character sets (e.g. latin-iso8859-1 and mule-unicode-*) are
> displayed by different fonts.

[Actually latin-iso8859-1 and mule-unicode-* are disjoint.]

You can see how a charset is displayed by using list-charset-chars.
As far as I remember, this is independent of charset translation on
decoding.  Saving the buffer with the table and re-visiting it
demonstrates any effect of customized decoding.

> I expect that letters of the same
> alphabets should be displayed by the same fonts.  Could you tell, is it
> a bug, a misconfiguration, or is it not implemented yet?

Some font encodings have encoders which deal with multiple Emacs
charsets.  I think Cyrillic ones are done in the development code.
Look at the elements of `font-ccl-encoder-alist'.  It is usually easy
to add more, and probably useful to do that.  It isn't easy to provide
a good way for users to customize the font selection, though.  (This
is partly addressed in Emacs 22 with the concept of `scripts'.)  The
basic Lisp mechanism is `set-fontset-font'.  Here's an example I was
going to propose.

  (define-ccl-program encode-iso8859-1-font
    `(0
      (translate-character ucs-8859-1-encode-table r0 r1)
      (if (r0 == ,(charset-id 'latin-iso8859-1))
        (r1 = (r1 + 160)))))
  
  ;; (map-char-table (lambda (k v)
  ;;              (if v (set-fontset-font t k '(nil . "iso8859-1"))))
  ;;            ucs-8859-1-encode-table)
  
  ;; (add-to-list 'font-ccl-encoder-alist '("iso8859-1" . 
encode-iso8859-1-font))

It is also possible to change the way decoding is done by most of the
coding systems implemented in CCL, but I don't remember what the
relevant variable is called now.  E.g. you can choose to favour
iso8859 or mule-unicode charsets by adjusting a translation table.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]