emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: ftfont ISO10646-1 font bug found (was Re: 23.0.60; Heav


From: sand
Subject: Re: [PATCH] Re: ftfont ISO10646-1 font bug found (was Re: 23.0.60; Heavy display problems with new font backend)
Date: Sun, 11 May 2008 15:32:50 -0700

address@hidden writes:
> Jason Rumney writes:
> > Kenichi Handa is probably the only person qualified to comment, and he 
> > said early this week that he won't have time to spend on Emacs this 
> > week, so please remain patient.
> > 
> > In the meantime, you might like to check out the font-backend branch, as 
> > the bug may already be fixed there, or your patch may need adapting to it.
> 
> Thanks.  I'll construct a patch for "font-backend" as well and send it.

The font-backend branch has the same problem, and essentially the same
patch works for it.  It's not worth constructing a separate patch for
that branch.  Plus, it looks like the patch itself, while useful, is
fixing secondary problems rather than root problems.  I decided to try
attacking the issues at the Lisp level.

Most of the problems seem to be caused by bad configuration in
"fontset.el".  I have appended the Lisp code I came up with to get my
environment (almost) working.  The exception is Korean syllabics,
which show up fine with the old backend (using Daewoo Mincho
KSC5601.1987) but don't show up at all with the new one.  The fontset
declaration looks okay, so I'm going to keep digging.

-- 
Derek Upham
address@hidden

------------------------------ cut here ------------------------------

(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))))

;; 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)

;; '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))




reply via email to

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