[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: display-supports-face-attributes-p question
From: |
Eli Zaretskii |
Subject: |
Re: display-supports-face-attributes-p question |
Date: |
Sun, 29 Aug 2021 17:30:18 +0300 |
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sun, 29 Aug 2021 21:54:38 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > if (! FONT_OBJECT_P (attrs[LFACE_FONT_INDEX]))
> > attrs[LFACE_FONT_INDEX]
> > = font_load_for_lface (f, attrs, Ffont_spec (0, NULL));
>
> Before:
> #<font-spec nil haiku Noto\ Sans\ Mono nil iso8859-1 normal nil normal 12
> nil 100 0 ((:user-spec . "monospace"))>
>
> And after:
> #<font-object "-haiku-Noto Sans
> Mono-normal-normal-normal-*-12-*-*-*-m-0-iso8859-1">
>
> I don't exactly understand what the code does, but that seems wrong. I
> think both the spec and the object should be italic?
No, only the second one. The first one is generic, with the :slant
slot unspecified.
So it looks like the problem is inside font_load_for_lface. Please
step into it, then into font_find_for_lface that one calls, and tell
what is the value of 'entities' here:
for (l = 0; SYMBOLP (adstyle[l]); l++)
{
ASET (work, FONT_ADSTYLE_INDEX, adstyle[l]);
entities = font_list_entities (f, work); <<<<<<<<<<<<<<<
if (! NILP (entities))
It should be a list of font-entity objects, at least some of which
have the 'italic' value in the :slant slot.
Or maybe the code behaves differently in your case, and doesn't even
get to that place? If so, please try to figure out why.