[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#3174: NS font selection still broken
From: |
David Reitter |
Subject: |
bug#3174: NS font selection still broken |
Date: |
Fri, 30 Oct 2009 09:44:59 -0400 |
Adrian,
For differences from w32 or x11 that show up on Emacs 23, font
selection is handled through ns_findfonts() in nsfont.m. The
rewrite of a few months ago brought this mostly in line with other
ports, but some crucial differences may still remain (though I'm not
sure what they are). I'm afraid it will take a fairly significant
effort at turning on tracing in that file (NSFONT_TRACE at the top),
and working through the logic of what font.c is doing and what
nsfont.m is doing, for the characters in question. I can't think of
any shortcuts, and I have to admit these mathematical symbol ranges
have long been a problem eluding my efforts, though I believe the
rewrite lessened the number of erroneously-handled characters.
The actual "bugs" could be either in nsfont.m or font.c -- sometimes
in the past nsfont's different implementation sometimes revealed
problems in font.c that did not affect other ports. (Of course the
nsfont.m impl should continue to be normalized to the other ports so
such bugs can remain mercifully hidden.)
I've been looking at the trace from nsfont and, more importantly, `
(reverse font-log)' from font.c.
To display [“] 201C LEFT DOUBLE QUOTATION MARK, we get the log below
(after adding a few items to log).
At first (top of list), it tries to find "Apple Lucida Grande" and
"Lucida Grande" with a particular "registry" and for the symbol
script. This fails, because the `val' variable in font_list_entities
ends up being Qnil.
I don't quite see, why. Possibilities are that the [part of the] font
isn't loaded and/or caching fails, but I don't really understand what
the code after the call to font_get_cache is supposed to be doing.
Can you see the problem? If not, feel free to say so and I'll ask -
devel.
I did try adjusting script-representative-chars to make sure that the
example characters listed for `symbol' are all in Lucida. This had no
effect.
Thanks
- D
((default\ fontset:\ font\ for 8220 nil)
(finding nil nil)
(ASIZE\ \(val\)\ =<\ 0\ not\ adding\ to\ list
[]
nil)
(list "-apple-Lucida Grande-*-iso10646-1:script=symbol" nil)
(font_list_entities\ returned\ nil nil nil)
(ASIZE\ \(val\)\ =<\ 0\ not\ adding\ to\ list
[]
nil)
(list "-*-Lucida Grande-*-iso10646-1:script=symbol" nil)
(font_list_entities\ returned\ nil nil nil)
(ASIZE\ \(val\)\ >\ 0\ adding\ to\ list
[#<font-entity ns apple Apple_Symbols nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple Apple_Symbols nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple MS_PMincho nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple MS_PGothic nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple MS_Mincho nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple MS_Gothic nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple Menlo nil iso10646-1 bold italic normal 0
nil 100 0
((:script . symbol))
> #<font-entity ns apple Menlo nil iso10646-1 bold normal normal 0
nil 100 0
((:script . symbol))
> #<font-entity ns apple Menlo nil iso10646-1 medium italic normal
0 nil 100 0
((:script . symbol))
> #<font-entity ns apple Menlo nil iso10646-1 medium normal normal
0 nil 100 0
((:script . symbol))
> #<font-entity ns apple Code2000 nil iso10646-1 medium normal
normal 0 nil 0 0
((:script . symbol))
> #<font-entity ns apple Arial_Unicode_MS nil iso10646-1 medium
normal normal 0 nil 0 0
((:script . symbol))
>]
nil)
(list "-apple-*-iso10646-1:script=symbol"
["-apple-Apple_Symbols-medium-normal-normal-*-p-0-iso10646-1"
"-apple-Apple_Symbols-medium-normal-normal-*-p-0-iso10646-1" "-apple-
MS_PMincho-medium-normal-normal-*-p-0-iso10646-1" "-apple-MS_PGothic-
medium-normal-normal-*-p-0-iso10646-1" "-apple-MS_Mincho-medium-normal-
normal-*-p-0-iso10646-1" "-apple-MS_Gothic-medium-normal-normal-*-p-0-
iso10646-1" "-apple-Menlo-bold-italic-normal-*-m-0-iso10646-1" "-apple-
Menlo-bold-normal-normal-*-m-0-iso10646-1" "-apple-Menlo-medium-italic-
normal-*-m-0-iso10646-1" "-apple-Menlo-medium-normal-normal-*-m-0-
iso10646-1" "-apple-Code2000-medium-normal-normal-*-p-0-iso10646-1" "-
apple-Arial_Unicode_MS-medium-normal-normal-*-p-0-iso10646-1"])
(sort-by "-*-medium-normal-normal-*-13-*" "ns:-apple-Apple_Symbols-
medium-normal-normal-*-p-0-iso10646-1")
(finding\.\.\.finished\ early nil nil)
(open "-apple-Apple_Symbols-medium-normal-normal-*-p-0-
iso10646-1:script=symbol" "nil:-apple-Apple_Symbols-medium-normal-
normal-*-13-*-p-0-iso10646-1"))