From: Eli Zaretskii <eliz@gnu.org>
To: Tim Ruffing <dev@real-or-random.org>,
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: 73752@debbugs.gnu.org, dev@real-or-random.org, xuan@xlk.me,
visuweshm@gmail.com
Subject: bug#73752: 29.4; Ligatures are randomly rendered with extra spaces
Date: Mon, 04 Nov 2024 19:45:22 +0200 [thread overview]
Message-ID: <86y11yuc3x.fsf@gnu.org> (raw)
In-Reply-To: <bdfbfb7cf12da67f91ca29e8b63c271921d3fc28.camel@timruffing.de> (message from Tim Ruffing on Mon, 04 Nov 2024 01:11:39 +0100)
> From: Tim Ruffing <dev@real-or-random.org>
> Cc: dev@real-or-random.org, xuan@xlk.me, 73752@debbugs.gnu.org
> Date: Mon, 04 Nov 2024 01:11:39 +0100
>
> This fixes the problem:
Thanks. But do you understand why?
And how did you arrive to the conclusion that this is the change which
might help?
> diff --git a/src/ftfont.c b/src/ftfont.c
> index 882d3eec256..2be443108f1 100644
> --- a/src/ftfont.c
> +++ b/src/ftfont.c
> @@ -2994,9 +2994,8 @@ fthbfont_begin_hb_font (struct font *font, double
> *position_unit)
> struct font_info *ftfont_info = (struct font_info *) font;
>
> *position_unit = 1.0 / (1 << 6);
> - if (! ftfont_info->hb_font)
> - ftfont_info->hb_font
> - = hb_ft_font_create_referenced (ftfont_info->ft_size->face);
> + ftfont_info->hb_font
> + = hb_ft_font_create_referenced (ftfont_info->ft_size->face);
> return ftfont_info->hb_font;
> }
>
> That is, it makes at least the bug with Yixuan's script disappear. I
> haven't yet verified if this fixes what I often see during my daily
> usage.
That code was written by a leading HarfBuzz developer, so it's hard
for me to believe that it is so incorrect.
OTOH, I see that ftcrhbfont is the _only_ HarfBuzz-based font backend
which implements the end_hb_font method, and I think you both told me
that only the Cairo build has this problem? If so, I think the code
to look at is the end_hb_font method and what it does to the hb_font
object. The end_hb_font method is called each time the shaper is
called, so whatever it does to the hb_font object is inherited by the
next call to the shaper.
Visuwesh, do the problems you see also disappear when you install the
change in fthbfont_begin_hb_font which removes the
!ftfont_info->hb_font condition for calling
hb_ft_font_create_referenced?
I'm also adding Yamamoto-san to this discussion, in the hope that he
could have some ideas or suggestions.
next prev parent reply other threads:[~2024-11-04 17:45 UTC|newest]
Thread overview: 90+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-11 16:18 bug#73752: 29.4; Ligatures are randomly rendered with extra spaces xuan
2024-10-12 8:02 ` Eli Zaretskii
2024-10-12 16:09 ` Yixuan Chen
2024-10-27 10:21 ` Eli Zaretskii
2024-10-27 16:19 ` Visuwesh
2024-10-27 17:19 ` Eli Zaretskii
2024-10-27 17:27 ` Eli Zaretskii
2024-10-27 17:39 ` Yixuan Chen
2024-10-27 17:43 ` Eli Zaretskii
2024-10-27 17:46 ` Yixuan Chen
2024-10-27 19:14 ` Eli Zaretskii
2024-10-27 19:36 ` Yixuan Chen
2024-10-27 19:44 ` Eli Zaretskii
2024-10-27 19:47 ` Yixuan Chen
2024-10-27 20:11 ` Eli Zaretskii
2024-10-27 19:41 ` Yixuan Chen
2024-10-27 20:07 ` Eli Zaretskii
2024-10-27 20:32 ` Yixuan Chen
2024-10-28 14:25 ` Eli Zaretskii
2024-10-28 14:44 ` Yixuan Chen
2024-10-28 14:47 ` Yixuan Chen
2024-10-28 15:05 ` Eli Zaretskii
2024-10-28 15:20 ` Yixuan Chen
2024-10-28 17:19 ` Eli Zaretskii
2024-10-28 17:26 ` Eli Zaretskii
2024-10-28 17:28 ` Yixuan Chen
2024-10-28 18:41 ` Eli Zaretskii
2024-10-28 4:26 ` Visuwesh
2024-10-28 14:59 ` Eli Zaretskii
2024-10-28 15:24 ` Yixuan Chen
2024-10-28 16:18 ` Visuwesh
2024-10-28 17:13 ` Eli Zaretskii
2024-10-29 10:59 ` Visuwesh
2024-10-29 13:04 ` Eli Zaretskii
2024-10-29 13:54 ` Visuwesh
2024-10-29 14:00 ` Visuwesh
2024-10-29 15:38 ` Eli Zaretskii
2024-10-29 16:46 ` Visuwesh
2024-10-29 17:45 ` Eli Zaretskii
2024-10-30 5:43 ` Visuwesh
2024-10-29 16:51 ` Eli Zaretskii
2024-10-27 17:29 ` Yixuan Chen
2024-10-29 23:14 ` Tim Ruffing
2024-10-30 15:12 ` Eli Zaretskii
2024-10-30 15:45 ` Eli Zaretskii
[not found] ` <mvmikt9zkcq.fsf@suse.de>
2024-10-30 15:47 ` Eli Zaretskii
2024-10-30 17:34 ` Tim Ruffing
2024-10-30 17:46 ` Eli Zaretskii
2024-10-30 18:00 ` Tim Ruffing
2024-10-30 18:57 ` Eli Zaretskii
2024-10-31 1:39 ` Tim Ruffing
2024-10-31 2:36 ` Yixuan Chen
2024-10-31 2:46 ` Yixuan Chen
2024-10-31 7:44 ` Eli Zaretskii
2024-10-31 9:42 ` Eli Zaretskii
2024-11-01 17:05 ` Eli Zaretskii
2024-11-02 3:34 ` Tim Ruffing
2024-11-02 9:52 ` Eli Zaretskii
2024-11-02 10:39 ` Visuwesh
2024-11-02 12:07 ` Eli Zaretskii
2024-11-02 13:29 ` Visuwesh
2024-11-02 16:47 ` Eli Zaretskii
2024-11-02 17:04 ` Visuwesh
2024-11-02 17:18 ` Eli Zaretskii
2024-11-02 17:31 ` Visuwesh
2024-11-02 17:34 ` Eli Zaretskii
2024-11-02 17:39 ` Visuwesh
2024-11-02 17:44 ` Eli Zaretskii
2024-11-02 17:54 ` Visuwesh
2024-11-02 18:02 ` Visuwesh
2024-11-02 18:27 ` Eli Zaretskii
2024-11-04 0:11 ` Tim Ruffing
2024-11-04 17:45 ` Eli Zaretskii [this message]
2024-11-04 18:02 ` Visuwesh
2024-11-04 23:33 ` Tim Ruffing
2024-11-04 23:47 ` Tim Ruffing
2024-11-06 12:02 ` Tim Ruffing
2024-11-06 13:11 ` Eli Zaretskii
2024-11-07 2:12 ` Tim Ruffing
2024-11-07 7:05 ` Eli Zaretskii
2024-11-07 13:45 ` Visuwesh
2024-11-07 14:40 ` Eli Zaretskii
2024-11-07 15:13 ` Visuwesh
2024-11-07 15:49 ` Eli Zaretskii
2024-11-07 16:00 ` Visuwesh
2024-11-08 8:08 ` Eli Zaretskii
2024-11-06 14:50 ` Visuwesh
2024-11-02 10:32 ` Visuwesh
2024-10-31 8:12 ` Visuwesh
2024-10-31 9:43 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y11yuc3x.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73752@debbugs.gnu.org \
--cc=dev@real-or-random.org \
--cc=mituharu@math.s.chiba-u.ac.jp \
--cc=visuweshm@gmail.com \
--cc=xuan@xlk.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.