unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
@ 2014-10-24  8:35 Sun Yijiang
  2016-06-18 14:45 ` Alan Third
  0 siblings, 1 reply; 7+ messages in thread
From: Sun Yijiang @ 2014-10-24  8:35 UTC (permalink / raw)
  To: 18818

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

Step by step:

1) Mac OS X 10.10 Yosemite, Xcode 6.1
2) Compile GNU Emacs 24.4 with ./configure --with-ns && make && make install
3) Make a clean run: /Applications/Emacs.app/Contents/MacOS/Emacs -q
4) In *scratch* buffer, run these line-by-line (with C-x C-e)

(set-default-font "-*-Monaco-bold-normal-normal-*-*-*-*-*-m-0-iso10646-1")
(set-default-font "-*-Monaco-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")

(set-foreground-color "#FFFFFF")
(set-background-color "#222222")

(set-default-font "-*-Monaco-bold-normal-normal-*-*-*-*-*-m-0-iso10646-1")
(set-default-font "-*-Monaco-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")

Screenshots after each step are attached.  It's clear that in a dark
background, bold and normal texts are flipped.


Best,
Yijiang

[-- Attachment #2: white-bold.png --]
[-- Type: image/png, Size: 57709 bytes --]

[-- Attachment #3: white-normal.png --]
[-- Type: image/png, Size: 56238 bytes --]

[-- Attachment #4: white-to-dark.png --]
[-- Type: image/png, Size: 58163 bytes --]

[-- Attachment #5: dark-bold.png --]
[-- Type: image/png, Size: 55206 bytes --]

[-- Attachment #6: dark-normal.png --]
[-- Type: image/png, Size: 57875 bytes --]

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

* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
  2014-10-24  8:35 bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10 Sun Yijiang
@ 2016-06-18 14:45 ` Alan Third
  2016-06-18 23:54   ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Third @ 2016-06-18 14:45 UTC (permalink / raw)
  To: Sun Yijiang; +Cc: 18818

Sun Yijiang <sunyijiang@gmail.com> writes:

> Step by step:
>
> 1) Mac OS X 10.10 Yosemite, Xcode 6.1
> 2) Compile GNU Emacs 24.4 with ./configure --with-ns && make && make install
> 3) Make a clean run: /Applications/Emacs.app/Contents/MacOS/Emacs -q
> 4) In *scratch* buffer, run these line-by-line (with C-x C-e)
>
> (set-default-font "-*-Monaco-bold-normal-normal-*-*-*-*-*-m-0-iso10646-1")
> (set-default-font "-*-Monaco-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")
>
> (set-foreground-color "#FFFFFF")
> (set-background-color "#222222")
>
> (set-default-font "-*-Monaco-bold-normal-normal-*-*-*-*-*-m-0-iso10646-1")
> (set-default-font "-*-Monaco-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")
>
> Screenshots after each step are attached.  It's clear that in a dark
> background, bold and normal texts are flipped.

I can confirm this in Emacs 25. It looks like it's only synthetic bolds
that are displayed incorrectly, faces with proper bold fonts, like
Menlo, are displayed correctly.

Looks like the Mac port behaves identically.

-- 
Alan Third





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

* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
  2016-06-18 14:45 ` Alan Third
@ 2016-06-18 23:54   ` YAMAMOTO Mitsuharu
  2021-08-19 14:31     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: YAMAMOTO Mitsuharu @ 2016-06-18 23:54 UTC (permalink / raw)
  To: Alan Third; +Cc: 18818, Sun Yijiang

>>>>> On Sat, 18 Jun 2016 15:45:23 +0100, Alan Third <alan@idiocy.org> said:

>> Screenshots after each step are attached.  It's clear that in a
>> dark background, bold and normal texts are flipped.

> I can confirm this in Emacs 25. It looks like it's only synthetic
> bolds that are displayed incorrectly, faces with proper bold fonts,
> like Menlo, are displayed correctly.

> Looks like the Mac port behaves identically.

This is a long-standing bug in Core Graphics.  The Mac port contains
an info node suggesting some workaround:

     Also, synthetic bold looks thinner if the background is darker than
  the foreground and the LCD font smoothing is turned on.  In such cases,
  you can turn off synthetic bold for particular fonts and use
  overstriking instead by customizing the variable ‘face-ignored-fonts’:

       (add-to-list 'face-ignored-fonts "\\`-[^-]*-monaco-bold-")

https://bitbucket.org/mituharu/emacs-mac/src/292d5368c1f209977c03ed6e1b2107aab37bfd92/doc/emacs/macport.texi?at=master&fileviewer=file-view-default#macport.texi-339

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






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

* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
  2016-06-18 23:54   ` YAMAMOTO Mitsuharu
@ 2021-08-19 14:31     ` Lars Ingebrigtsen
  2021-08-21  9:55       ` Alan Third
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-19 14:31 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 18818, Alan Third, Sun Yijiang

YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> writes:

> This is a long-standing bug in Core Graphics.  The Mac port contains
> an info node suggesting some workaround:
>
>      Also, synthetic bold looks thinner if the background is darker than
>   the foreground and the LCD font smoothing is turned on.  In such cases,
>   you can turn off synthetic bold for particular fonts and use
>   overstriking instead by customizing the variable ‘face-ignored-fonts’:
>
>        (add-to-list 'face-ignored-fonts "\\`-[^-]*-monaco-bold-")

So it sounds like this isn't something we can fix on the Emacs side, but
perhaps we should just add this text to the manual?

That is, if this is still an issue in Emacs 28; I haven't checked.

Alan, does this look reasonable to you?

diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index cd1db1a7ba..b60b584c82 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -201,7 +201,7 @@ Mac / GNUstep Customization
 number makes the trackpad less sensitive.
 @end table
 
-@subsection Font Panel
+@subsection Fonts
 
 @findex ns-popup-font-panel
 The standard Mac / GNUstep font panel is accessible with @kbd{M-x
@@ -211,6 +211,16 @@ Mac / GNUstep Customization
 @c  To make the setting permanent, use @samp{Save Options} in the
 @c Options menu, or run @code{menu-bar-options-save}.
 
+Synthetic bold looks thinner if the background is darker than the
+foreground and the LCD font smoothing is turned on.  In such cases,
+you can turn off synthetic bold for particular fonts and use
+overstriking instead by customizing the variable
+@code{face-ignored-fonts}:
+
+@lisp
+(push "\\`-[^-]*-monaco-bold-" face-ignored-fonts)
+@end lsip
+
 @node Mac / GNUstep Events
 @section Windowing System Events under macOS / GNUstep
 @cindex events on macOS


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
  2021-08-19 14:31     ` Lars Ingebrigtsen
@ 2021-08-21  9:55       ` Alan Third
  2021-08-21 10:03         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Third @ 2021-08-21  9:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 18818, Sun Yijiang

On Thu, Aug 19, 2021 at 04:31:26PM +0200, Lars Ingebrigtsen wrote:
> 
> So it sounds like this isn't something we can fix on the Emacs side, but
> perhaps we should just add this text to the manual?
> 
> That is, if this is still an issue in Emacs 28; I haven't checked.

I expect it will, I think it's a problem with the system libraries, so
it might be fixed on newer versions of macOS.

> +Synthetic bold looks thinner if the background is darker than the
> +foreground and the LCD font smoothing is turned on.  In such cases,
> +you can turn off synthetic bold for particular fonts and use
> +overstriking instead by customizing the variable
> +@code{face-ignored-fonts}:
> +
> +@lisp
> +(push "\\`-[^-]*-monaco-bold-" face-ignored-fonts)
> +@end lsip

I assume that customisation only affects Monaco, so it may be worth
adding a "for example" or something to make it clear it's not supposed
to fix it in all cases.

And perhaps it should go in etc/PROBLEMS instead of the manual?
-- 
Alan Third





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

* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
  2021-08-21  9:55       ` Alan Third
@ 2021-08-21 10:03         ` Eli Zaretskii
  2021-08-21 13:03           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-08-21 10:03 UTC (permalink / raw)
  To: Alan Third; +Cc: 18818, larsi, sunyijiang

> Date: Sat, 21 Aug 2021 10:55:22 +0100
> From: Alan Third <alan@idiocy.org>
> Cc: 18818@debbugs.gnu.org, Sun Yijiang <sunyijiang@gmail.com>
> 
> > +Synthetic bold looks thinner if the background is darker than the
> > +foreground and the LCD font smoothing is turned on.  In such cases,
> > +you can turn off synthetic bold for particular fonts and use
> > +overstriking instead by customizing the variable
> > +@code{face-ignored-fonts}:
> > +
> > +@lisp
> > +(push "\\`-[^-]*-monaco-bold-" face-ignored-fonts)
> > +@end lsip
> 
> I assume that customisation only affects Monaco, so it may be worth
> adding a "for example" or something to make it clear it's not supposed
> to fix it in all cases.
> 
> And perhaps it should go in etc/PROBLEMS instead of the manual?

Yes, probably.





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

* bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10
  2021-08-21 10:03         ` Eli Zaretskii
@ 2021-08-21 13:03           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-21 13:03 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 18818, Alan Third, sunyijiang

Eli Zaretskii <eliz@gnu.org> writes:

>> I assume that customisation only affects Monaco, so it may be worth
>> adding a "for example" or something to make it clear it's not supposed
>> to fix it in all cases.
>> 
>> And perhaps it should go in etc/PROBLEMS instead of the manual?
>
> Yes, probably.

OK; now done, and I'm therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-08-21 13:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-24  8:35 bug#18818: Incorrect font weight in dark background, Emacs 24.4 on Mac OS X 10.10 Sun Yijiang
2016-06-18 14:45 ` Alan Third
2016-06-18 23:54   ` YAMAMOTO Mitsuharu
2021-08-19 14:31     ` Lars Ingebrigtsen
2021-08-21  9:55       ` Alan Third
2021-08-21 10:03         ` Eli Zaretskii
2021-08-21 13:03           ` Lars Ingebrigtsen

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