[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49797: 28.0.50; Setting face to custom fontset doesn't work
From: |
Eli Zaretskii |
Subject: |
bug#49797: 28.0.50; Setting face to custom fontset doesn't work |
Date: |
Wed, 06 Oct 2021 22:02:51 +0300 |
> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 6 Oct 2021 11:56:18 -0700
> Cc: Kenichi Handa <handa@gnu.org>,
> 49797@debbugs.gnu.org
>
> >> fontset = FONTSET_FROM_ID (face->fontset);
> >>
> >> Then find an appropriate font from it
> >>
> >> rfont_def = fontset_font (fontset, c, face, id);
> >
> > Yes, AFAIU that's the part where we check if the current face's
> > fontset's font, made for the ASCII characters, happens to have a glyph
> > for the non-ASCII character we need to display.
>
> That is not, the part you mentioned is before:
>
> if (face->ascii_face->font)
> {
> XSETFONT (font_object, face->ascii_face->font);
> if (font_has_char (f, font_object, c))
> return face->ascii_face->id;
> }
No, this is where we try to use the ASCII font for symbols and
punctuation characters.
> And what about the comment I mentioned? Did you read it?
Yes, but it has no relevance to the issue at hand. That whole part is
about displaying symbol and punctuation characters.
> In any case,
>
> rfont_def = fontset_font (fontset, c, face, id);
>
> finds a font in the fontset that can display character c. That’s hard to
> ignore.
I didn't.
> > As mentioned earlier, user code is not supposed to set the :fontset
> > attribute directly, which is why it isn't documented.
>
> Finternal_set_lisp_face_attribute has code that let me set :fontset. Why is
> it there if Lisp is not supposed to set :fontset?
How is that relevant? That something is possible doesn't mean it's
recommended.
> Plus, Emacs doesn’t set :fontset by itself
It does, via the Lisp attributes and LFACE_FONTSET_INDEX. That's what
matters on the C level.
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, (continued)
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Eli Zaretskii, 2021/10/05
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Yuan Fu, 2021/10/05
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Eli Zaretskii, 2021/10/06
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Yuan Fu, 2021/10/06
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Eli Zaretskii, 2021/10/06
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Yuan Fu, 2021/10/06
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work,
Eli Zaretskii <=
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Yuan Fu, 2021/10/07
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Eli Zaretskii, 2021/10/08
- bug#49797: 28.0.50; Setting face to custom fontset doesn't work, Yuan Fu, 2021/10/08