Subject: bug#9519: 24.0.50; the NS variant shows the U+20xy quotes always in ugly Apple Symbols font

From: Peter Dyballa <[email-masked]>
Date: Fri, 16 Sep 2011 01:03:27 +0200

Hello!

These typographical quotes

	‘;  2018  LEFT SINGLE QUOTATION MARK
	’;  2019  RIGHT SINGLE QUOTATION MARK
	‚;  201A  SINGLE LOW-9 QUOTATION MARK
	‛;  201B  SINGLE HIGH-REVERSED-9 QUOTATION MARK
	“;  201C  LEFT DOUBLE QUOTATION MARK
	”;  201D  RIGHT DOUBLE QUOTATION MARK
	„;  201E  DOUBLE LOW-9 QUOTATION MARK
	‟;  201F  DOUBLE HIGH-REVERSED-9 QUOTATION MARK

are always displayed in ugly Apple Symbols font, which puts the low quotes much too high and the high quotes much too low. Except when I select FreeMono as font for the buffer (via Cmd-T). So I decided to change Emacs' behaviour with this statement in my init file:

    (set-fontset-font (frame-parameter nil 'font) '(#x2018 . #x201F)
		      "FreeMono" nil 'prepend)

This works only initially in the initial frame. In another frame or the initial frame after having increased the font size (via the Apple font chooser tool from Cmd-T) the function describe-fontset (for the current frame) reports:

	‘ .. ’ (#x2018 .. #x2019)
	    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1
		[-apple-Apple_Symbols-medium-normal-normal-*-10-*-*-*-p-0-iso10646-1]
	    -*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0
	    -*-*-*-*-*-*-*-*-*-*-*-*-gb2312.1980-0
	    -*-*-*-*-*-*-*-*-*-*-*-*-big5-0
	    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-1
	    -*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987-0
	‚ .. ‛ (#x201A .. #x201B)
	    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1
		[-apple-Apple_Symbols-medium-normal-normal-*-10-*-*-*-p-0-iso10646-1]
	“ .. ” (#x201C .. #x201D)
	    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1
		[-apple-Apple_Symbols-medium-normal-normal-*-10-*-*-*-p-0-iso10646-1]
	    -*-*-*-*-*-*-*-*-*-*-*-*-jisx0208.1983-0
	    -*-*-*-*-*-*-*-*-*-*-*-*-gb2312.1980-0
	    -*-*-*-*-*-*-*-*-*-*-*-*-big5-0
	    -*-*-*-*-*-*-*-*-*-*-*-*-cns11643.1992-1
	    -*-*-*-*-*-*-*-*-*-*-*-*-ksc5601.1987-0
	„ .. ‟ (#x201E .. #x201F)
	    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1
		[-apple-Apple_Symbols-medium-normal-normal-*-10-*-*-*-p-0-iso10646-1]

while, after inserting these QUOTEs for example in *scratch* buffer, the function returns:

	‘ .. ‟ (#x2018 .. #x201F)
	    -*-FreeMono-*-*-*-*-*-*-*-*-*-*-*-*
		[-apple-FreeMono-medium-normal-normal-*-10-*-*-*-m-0-iso10646-1]

though rather short-lived...

When use

    (set-fontset-font (frame-parameter nil 'font) '(#x2018 . #x201E)
		      "Monospace" nil 'prepend)

(Monospace has no U+201F glyph) the function describe-fontset throws an error:

	print-fontset: Invalid regexp: "Regular expression too big"

When invoked once more it runs OK and returns:

	‘ .. „ (#x2018 .. #x201E)
	    -*-Monospace-*-*-*-*-*-*-*-*-*-*-*-*
		[-apple-Monospace-medium-normal-normal-*-10-*-*-*-m-0-iso10646-1]

Using Bitstream Vera Sans Mono, which additionally has no U+201B glyph, the function describe-fontset tends to crash GNU Emacs. When not, then it reports:

	‘ .. „ (#x2018 .. #x201E)
	    -*-Bitstream Vera Sans Mono-*-*-*-*-*-*-*-*-*-*-*-*
		[-apple-Bitstream_Vera_Sans_Mono-medium-normal-normal-*-10-*-*-*-m-0-iso10646-1]

How can the choice of FreeMono (with standard text font being Lucida Sans Typewriter) be made persistent? Or GNU Emacs be stopped using Apple Symbols, at least for these quote characters?

In GNU Emacs 24.0.50.2 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36)
 of 2011-09-15 on peter-dyballas-macbook-pro.fritz.box
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--without-sound' '--without-dbus' '--without-pop' '--without-gconf' '--without-gpm' '--with-ns' '--disable-ns-self-contained' '--enable-locallisppath=/Library/Application Support/Emacs/calendar24:/Library/Application Support/Emacs' 'CFLAGS=-Wswitch-enum -v -g -H -pipe -fPIC -fno-common -m64 -mtune=core2 -march=core2 -fast -foptimize-register-move -ftree-vectorize' 'LDFLAGS=-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t' 'CC=clang' 'CXX=clang++' 'PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/opt/local/share/pkgconfig:/usr/lib/pkgconfig''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: de_DE.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Help

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  show-paren-mode: t
  display-time-mode: t
  desktop-save-mode: t
  mac-print-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

(The -Wswitch-enum C flag is an experiment, because Clang – Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn) – emits many warning with enums, -fast and others are not understood by Clang. The same is true for the default option -no-cpp-precomp from the configure script.)

--
Greetings

             ~  O
  Pete       ~~_\\_/%
             ~  O  o