[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to walk a Lisp_String?
From: |
Po Lu |
Subject: |
Re: How to walk a Lisp_String? |
Date: |
Fri, 02 Sep 2022 09:08:10 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) |
Manuel Giraud <manuel@ledu-giraud.fr> writes:
> Finally, I'd like to walk this Lisp_String and call FACE_FOR_CHAR for
> each charater of this frame. And then be able to call XftDrawStringUtf8
> (or XmbDrawString) on each substring/font pair. WDYT?
That won't work correctly since glyphs do not correspond to characters.
After you obtain the substring containing characters that can be
displayed with a single font, you should pass it to the font driver's
`shape' function, and then give the resulting glyphs and offsets to
XftDrawGlyphs.
Using XftDrawStringUtf8 is a bad idea, along with any other "UTF-8"
interface provided by an X library. They simply don't work very well,
and cannot handle complicated things such as character compositions and
shaping.
Using XmbDrawString in conjunction with the Emacs face machinery is
probably a bad idea too, since both have differing notions of "fontset"
and "font".
- How to walk a Lisp_String?, Manuel Giraud, 2022/09/01
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/01
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/01
- Re: How to walk a Lisp_String?, Manuel Giraud, 2022/09/01
- Re: How to walk a Lisp_String?,
Po Lu <=
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/02
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/02
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/02
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
- Re: How to walk a Lisp_String?, Manuel Giraud, 2022/09/02
- Re: How to walk a Lisp_String?, Eli Zaretskii, 2022/09/02
- Re: How to walk a Lisp_String?, Po Lu, 2022/09/02