all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: 3174@emacsbugs.donarmstrong.com, Christopher Menzel <cmenzel@tamu.edu>
Subject: bug#3174: NS font selection still broken
Date: Fri, 30 Oct 2009 09:44:59 -0400	[thread overview]
Message-ID: <CFEEA89B-D9D4-4B14-BA19-B8417580EF97@gmail.com> (raw)
In-Reply-To: <5AA4186F-3AFD-482E-AC4F-F60E9E2517B0@gmail.com>

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




  reply	other threads:[~2009-10-30 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 18:18 bug#3174: NS font selection still broken David Reitter
2009-10-29 18:43 ` Adrian Robert
2009-10-30 13:44   ` David Reitter [this message]
2009-10-30 14:51     ` Adrian Robert
2009-11-02  4:06       ` Kenichi Handa

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=CFEEA89B-D9D4-4B14-BA19-B8417580EF97@gmail.com \
    --to=david.reitter@gmail.com \
    --cc=3174@emacsbugs.donarmstrong.com \
    --cc=adrian.b.robert@gmail.com \
    --cc=cmenzel@tamu.edu \
    /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.