unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#484: Font bug in 22 (Carbon): default "Monaco" has wrong (frame-char-width)
@ 2008-06-25 18:23 David Reitter
  2008-06-26  1:24 ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 2+ messages in thread
From: David Reitter @ 2008-06-25 18:23 UTC (permalink / raw)
  To: Bug-Gnu-Emacs; +Cc: Christoph Ortner

[-- Attachment #1: Type: text/plain, Size: 3195 bytes --]

I think there's a font bug in Emacs 22 (CVS), Carbon.

To reproduce:

Start Emacs -Q
(frame-width)  (evaluates to 80)
(frame-char-width)  (evaluates to 7)
(mac-font-panel-mode)
[select 14pt  in the default Monaco font]   (note that the frame does  
not resize in width)

(frame-width)  (evaluates to 80  - wrong!)
(frame-char-width)  (evaluates to 7 - wrong!)

When you select Monaco 18, the frame gets wider as intended (still a  
bad design choice), but (frame-width) is 81, which is too high.
(/ (frame-pixel-width) (frame-char-width)) evaluates to 85.  (frame- 
pixel-width) is correct, so I assume that (frame-char-width) is wrong.

Concrete use case:

Start Emacs -Q
(setq longlines-wrap-follows-window-size t)
[enter text with several words in a line that is longer than the  
window width, i.e. gets wrapped]
(mac-font-panel-mode)
select 14 point (in the default "Monaco")
(longlines-mode)

--> lines will be wrapped too late.


I don't notice such problems with other fonts.


The original bug report by christoph.ortner@merton.ox.ac.uk read:
====

Dear David,

There appears to be a bug in the latest Aquamacs version. If one tries  
to wrap the text (ALT+Q) with fontsize different from 12, one gets  
mostly garbage.

Best Wishes,
Christoph







In GNU Emacs 22.2.50.2 (i386-apple-darwin9.2.2, Carbon Version 1.6.0)
  of 2008-06-23 on plume.sr.unh.edu
Windowing system distributor `Apple Inc.', version 10.5.3
configured using `configure  '--without-x' '--prefix=/usr/local''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   locale-coding-system: iso-8859-1
   default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   longlines-mode: t
   tooltip-mode: t
   tool-bar-mode: t
   mouse-wheel-mode: t
   use-hard-newlines: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   unify-8859-on-encoding-mode: t
   utf-translate-cjk-mode: t
   auto-compression-mode: t
   line-number-mode: t

Recent input:
<help-echo> <down-mouse-1> <mouse-1> <help-echo> C-x
b <return> <help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-1> C-y <up> <up> <down> <down> <escape> x l
o n g l <tab> <return> <escape> x m a c - f o <tab>
<return> <help-echo> <down-mouse-1> <mouse-1> <return>
<return> <up> ( s e t q SPC l o n g l i n e s - w r
a p - f o l l o w s - w i n d o w - s i z e SPC t )
C-x C-e <return> <return> <escape> x l o n g l <tab>
m <tab> <return> <escape> x <up> <return> <help-echo>
<help-echo> <help-echo> <help-echo> <down> <up> x l
o n g l <tab> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <escape> x l o n g l <tab>
m o <tab> <return> <escape> x <up> <return> <menu-bar>
<help-menu> <send-emacs-bug-report>

Recent messages:
Longlines mode enabled
Mac-Font-Panel mode enabled
t
Longlines mode disabled
Longlines mode enabled
Longlines mode disabled
Longlines mode enabled
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2450 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#484: Font bug in 22 (Carbon): default "Monaco" has wrong (frame-char-width)
  2008-06-25 18:23 bug#484: Font bug in 22 (Carbon): default "Monaco" has wrong (frame-char-width) David Reitter
@ 2008-06-26  1:24 ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 2+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-06-26  1:24 UTC (permalink / raw)
  To: David Reitter, 484; +Cc: Bug-Gnu-Emacs, Christoph Ortner

>>>>> On Wed, 25 Jun 2008 19:23:21 +0100, David Reitter <dreitter@inf.ed.ac.uk> said:

> I think there's a font bug in Emacs 22 (CVS), Carbon.

> To reproduce:

> Start Emacs -Q
> (frame-width)  (evaluates to 80)
> (frame-char-width)  (evaluates to 7)
> (mac-font-panel-mode)
> [select 14pt  in the default Monaco font]   (note that the frame does  
> not resize in width)

> (frame-width)  (evaluates to 80  - wrong!)
> (frame-char-width)  (evaluates to 7 - wrong!)

At least the latter result is wrong, and it seems to be due to a bug
in ATSUI on Mac OS X 10.5 (Mac OS X 10.4 correctly reports it as 8).
You can observe that the width of the character "E" in Monaco 14 is
narrower than that of other characters.  I'll report it to Apple.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp







^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-26  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 18:23 bug#484: Font bug in 22 (Carbon): default "Monaco" has wrong (frame-char-width) David Reitter
2008-06-26  1:24 ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).