all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Torsten Bronger <bronger@physik.rwth-aachen.de>
Cc: sand@blarg.net, 613@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: bug#613: 23.0.60; Unicode display problems
Date: Wed, 20 Aug 2008 10:38:54 +0900	[thread overview]
Message-ID: <E1KVcf0-0004FY-Gl__4300.29570493406$1219196921$gmane$org@etlken.m17n.org> (raw)
In-Reply-To: <87od3qqvlg.fsf@physik.rwth-aachen.de> (message from Torsten Bronger on Mon, 18 Aug 2008 15:52:11 +0200)

In article <87od3qqvlg.fsf@physik.rwth-aachen.de>, Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

> finding a font for: (8220)
> ftfont-list: -unknown-DejaVu Sans Mono-*-iso10646-1:script=symbol
> list: -unknown-DejaVu Sans Mono-*-iso10646-1:script=symbol
[...]

Now I see what is wrong.  Dejavu Sans Mono lacks some of
charaters (#x201C #x2200 #x2500) to be used as `symbol'
font, so the other arbitrary font that contains all of those
characters are selected.  This setting was added by the
request in the attached mail, but it seems that the
restriction is too strong for symbol fonts.  So, I deleted
that restriction.  Please try again with the latest CVS code.

---
Kenichi Handa
handa@ni.aist.go.jp

In article <18477.2875.876651.446827@priss.frightenedpiglet.com>, sand@blarg.net writes:

> Below is the complete set of fontset changes that my system needed to
> display the HELLO file and Markus Kuhn's "UTF-8-demo.txt" file.  There
> are various problems with the fontset definitions that we can fix in
> Emacs Lisp.

>   1. The "symbol" and "phonetic" scripts don't have any representative
>   characters defined, and they don't have any fontset defined.

>   2. The Latin script doesn't have representative characters over
>   7-bits.  This means the Xft backend doesn't have any constraint that
>   would reject ISO8859-1 fonts.  Emacs appears to have special support
>   for real ISO8859-1 characters, so the new definition should not
>   break anything.

>   3. The Armenian script has representative characters, but no fontset
>   defined.

>   4. The Thai fontset definition assumes that you have OpenType set
>   up.  It needs a fallback in case you don't.

>   5. The Hangul fontset definition assumes that you have a language
>   definition in your Hangul font.  It needs a fallback in case you
>   don't.

> Note that for some people, the "symbol", "phonetic" and Latin scripts
> may display just fine.  The problem is that Emacs is not rejecting
> ISO8859-1 fonts---but if your installation happens to pick a
> ISO10646-1 font with coverage first then you won't see any weirdness.
> For example, my work machine had trouble displaying the scripts while
> my home machine did not.

> It may be that the Thai and Hangul definitions are the tip of the
> iceberg.  I suspect that *every* ISO10646-1 fontset definition that
> uses :otf or :language needs a fallback definition that uses :script.

> If your HELLO file shows weird fonts being picked (such as a
> double-width Chinese font for U+2018 LEFT SINGLE QUOTATION MARK) or
> "missing font" boxes, can you please try putting the below code into
> your .emacs file to see if it fixes the problem?  These were sufficent
> to get my work machine displaying every HELLO and "UTF-8-demo.txt"
> glyphs for every font that I had installed.

> This code can be applied to CVS HEAD before or after the font-backend
> merge.

> Derek

> --
> Derek Upham
> sand@blarg.net

> ------------------------------ cut here ------------------------------

> ;; The eval-after-load here is a hack for testing.  These should
> ;; really be changes in "fontset.el".
> ;;
> ;; Some of the fontset definitions have 'prepend for testing.  When
> ;; added to "fontset.el" they should go into some appropriate
> ;; location in the current lists.

> (eval-after-load "fontset"
>   '(progn

> ;; Representative characters for Latin need to include the
> ;; various extension blocks.  This should replace the existing
> ;; definition.
> (setq script-representative-chars
>       (cons '(latin ?A ?Z ?a ?z #x00C0 #x0100 #x0180 #x1e00)
>             script-representative-chars))

> ;; Representative characters for symbols were not defined.
> (setq script-representative-chars
>       (cons '(symbol #x201C #x2200 #x2500)
>             script-representative-chars))

> ;; Representative characters for phonetics were not defined.
> (setq script-representative-chars
>       (cons '(phonetic #x0250 #x0283)
>             script-representative-chars))

> ;; 'latin script needs a declaration that incorporates the Latin
> ;; representative characters.  None of the current ones do.
> (set-fontset-font "fontset-default" 'latin
>  (font-spec :registry "iso10646-1" :script 'latin) nil 'prepend)

> ;; No 'symbol script declaration exists.  Create one using the new
> ;; representative characters.
> (set-fontset-font "fontset-default" 'symbol
>  (font-spec :registry "iso10646-1" :script 'symbol))

> ;; No 'phonetic declaration exists.  Create one using the new
> ;; representative characters.  (Note that there is an 'ipa
> ;; declaration, but 'ipa doesn't exist as a real script.)
> (set-fontset-font "fontset-default" 'phonetic
>  (font-spec :registry "iso10646-1" :script 'phonetic))

> ;; No fontset was defined for Armenian.
> (set-fontset-font "fontset-default" 'armenian
>  (font-spec :registry "iso10646-1" :script 'armenian))

> ;; The Thai fontset definition assumes that you have OpenType
> ;; definitions set up properly.  We need an explicit :script
> ;; declaration as a backup.  I think this should go after the :otf
> ;; declaration, but I'm doing it as a 'prepend here.  (Perhaps
> ;; FreeSerif Thai fonts comply with OpenType, but Misc-Fixed
> ;; ones don't.)
> (set-fontset-font "fontset-default" 'thai
>  (font-spec :registry "iso10646-1" :script 'thai) nil 'prepend)

> ;; 'hangul script has a :language restriction for iso10646-1, but also
> ;; needs :script restriction as alternative.
> (set-fontset-font "fontset-default" 'hangul
>   (font-spec :registry "iso10646-1" :script 'hangul) nil 'prepend)

> ))









  parent reply	other threads:[~2008-08-20  1:38 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-02 17:57 bug#613: 23.0.60; Unicode display problems Chong Yidong
2008-08-05  7:25 ` Kenichi Handa
2008-08-05  8:44   ` Torsten Bronger
2008-08-06  5:33     ` Kenichi Handa
2008-08-06  5:56       ` Torsten Bronger
2008-08-13 10:46         ` Kenichi Handa
2008-08-18 12:15           ` Kenichi Handa
2008-08-18 12:15           ` Kenichi Handa
2008-08-18 12:49             ` Torsten Bronger
2008-08-18 12:59               ` Kenichi Handa
2008-08-18 12:59               ` Kenichi Handa
2008-08-18 13:52                 ` Torsten Bronger
2008-08-20  1:38                   ` Kenichi Handa
2008-08-20 14:11                     ` sand
2008-08-21  0:51                       ` Kenichi Handa
2008-08-21  0:51                       ` Kenichi Handa
2008-08-27 14:07                         ` sand
2008-08-28  6:51                           ` Kenichi Handa
2008-08-28 15:16                             ` sand
2008-09-01  2:53                               ` Kenichi Handa
2008-09-01  2:53                               ` Kenichi Handa
2008-09-03  2:34                                 ` sand
2008-08-27 14:07                         ` sand
2008-08-20 16:01                     ` Torsten Bronger
2008-08-21  1:01                       ` Kenichi Handa
2008-08-21  1:18                         ` Juanma Barranquero
2008-08-21  1:18                         ` Juanma Barranquero
2008-08-21  1:01                       ` Kenichi Handa
2008-08-20 16:01                     ` Torsten Bronger
2008-08-20  1:38                   ` Kenichi Handa [this message]
2008-08-18 13:52                 ` Torsten Bronger
2008-08-18 12:49             ` Torsten Bronger
2008-08-13 10:46         ` Kenichi Handa
2008-08-06  6:59       ` Torsten Bronger
2008-08-05 14:14   ` Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2008-09-02 16:35 Chong Yidong
2008-09-02 19:59 ` Torsten Bronger
2008-09-02 20:06   ` Torsten Bronger
2008-07-26 17:32 Torsten Bronger

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='E1KVcf0-0004FY-Gl__4300.29570493406$1219196921$gmane$org@etlken.m17n.org' \
    --to=handa@m17n.org \
    --cc=613@emacsbugs.donarmstrong.com \
    --cc=bronger@physik.rwth-aachen.de \
    --cc=emacs-devel@gnu.org \
    --cc=sand@blarg.net \
    /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.