GNU bug report logs - #67269
30.0.50; italic face fallback does not assume italic properties

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Sun, 19 Nov 2023 06:02:01 UTC

Severity: normal

Tags: notabug

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#67269: closed (30.0.50; italic face fallback does not assume
 italic properties)
Date: Sat, 25 Nov 2023 10:32:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 25 Nov 2023 12:31:16 +0200
with message-id <83msv2ceff.fsf <at> gnu.org>
and subject line Re: bug#67269: 30.0.50; italic face fallback does not assume italic properties
has caused the debbugs.gnu.org bug report #67269,
regarding 30.0.50; italic face fallback does not assume italic properties
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
67269: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67269
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Po Lu <luangruo <at> yahoo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; italic face fallback does not assume italic properties
Date: Sun, 19 Nov 2023 14:01:04 +0800
When the default font doesn't supply an Italic variant, the italic face
is assigned an underline propery in its place.  But when the italic face
is merged with another face whose font does supply such a variant, the
underline is applied all the same while the slant that would ideally be
also is disregarded.

Hence if the default font is set to Droid Sans Mono (with no Italic
variant) while shr-text is set to Times New Roman, italic text rendered
by shr:

  (shr-text italic)

is underlined rather than slanted.  Moreover, no underline or slant is
manifested if there is an Italic variant to the default font but not the
face being merged with italic, depriving such italic text of any visual
distinctiveness.


[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 67269-done <at> debbugs.gnu.org
Subject: Re: bug#67269: 30.0.50; italic face fallback does not assume italic
 properties
Date: Sat, 25 Nov 2023 12:31:16 +0200
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: 67269 <at> debbugs.gnu.org
> Date: Mon, 20 Nov 2023 20:00:36 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > If so, then it is strange that we haven't heard about this issue
> > before.
> >
> > Maybe we should do something like the below, and leave the rest to end
> > users and downstream distros.
> >
> >> > I don't understand how shr-tag-i is relevant.  I'm probably missing
> >> > something.
> >> 
> >> It combines a variable pitch face with italic, and so loses when the
> >> italic face doesn't support slant properties, even if the variable pitch
> >> one does.
> >
> > Yes, you already said that in your original message.  I thought
> > shr-tag-i provides some additional insight.
> 
> Ah, I'm sorry for the misunderstanding then.
> 
> > diff --git a/lisp/faces.el b/lisp/faces.el
> > index 7eacc40..8eaabbf 100644
> > --- a/lisp/faces.el
> > +++ b/lisp/faces.el
> > @@ -2440,7 +2440,10 @@ italic
> >    '((((supports :slant italic))
> >       :slant italic)
> >      (((supports :underline t))
> > -     :underline t)
> > +     ;; Include italic, even if it isn't supported by the default
> > +     ;; font, because this face could be merged with another face
> > +     ;; which uses font that does have an italic variant.
> > +     :underline t :slant italic)
> >      (t
> >       ;; Default to italic, even if it doesn't appear to be supported,
> >       ;; because in some cases the display engine will do its own
> > @@ -2457,7 +2460,9 @@ bold-italic
> >  (defface underline
> >    '((((supports :underline t))
> >       :underline t)
> > -    (((supports :weight bold))
> > +    ;; Include underline, for when this face is merged with another
> > +    ;; whose font does support underline.
> > +    (((supports :weight bold :underline t))
> >       :weight bold)
> >      (t :underline t))
> >    "Basic underlined face."
> 
> That's alright by me, thanks.

Thanks, installed on master, and closing the bug.


This bug report was last modified 1 year and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.