From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 33944@debbugs.gnu.org
Subject: bug#33944: 27.0.50; harfbuzz: Noto Sans Mandaic not rendered correctly
Date: Tue, 01 Jan 2019 19:34:15 +0100 [thread overview]
Message-ID: <87zhsk6xco.fsf@turtle-trading.net> (raw)
In-Reply-To: <83a7kk4ct1.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Jan 2019 17:28:42 +0200")
Eli Zaretskii writes:
> You mean, with other fonts that support Arabic shaping the problem
> doesn't happen?
Now that you asked, I get the same problem with some words in Syriac,
like with this:
(set-fontset-font t '(?\u0700 . ?\u07FF) "Serto Mardin 20")
(setq bidi-paragraph-direction 'right-to-left)
(insert "\u0718\u0726\u0720\u0713\u0717\u073F")
The characters should all be connected, but the third and fourth are not
in this case.
>> From the doc string of bidi-paragraph-direction:
>
> If this is nil (the default), the direction of each paragraph is
> determined by the first strong directional character of its text.
> The values of ‘right-to-left’ and ‘left-to-right’ override that.
> Any other value is treated as nil.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Did you set it to t on purpose? If so, can you explain why?
No, that was a mistake. OTOH it seems that "is treated as nil" is not
true, because "t" has the same effect as "right-to-left".
> What happens if bidi-paragraph-direction is set to one of the valid
> values?
With right-to-left the same happens, with left-to-right it's good again
(same as with the default).
>> The commit that breaks this is the last one, 48776b7011 "Provide text
>> directionality and language to HarfBuzz shaper". Before that commit it
>> works for me.
>
> Can you run Emacs under a debugger and see what value of 'dir' do we
> come up with in this snippet from ftfont.c:
>
> hb_direction_t dir = HB_DIRECTION_INVALID;
> if (EQ (direction, QL2R))
> dir = HB_DIRECTION_LTR;
> else if (EQ (direction, QR2L))
> dir = HB_DIRECTION_RTL;
> /* If the caller didn't provide a meaningful DIRECTION, let HarfBuzz
> guess it. */
> if (dir != HB_DIRECTION_INVALID)
> hb_buffer_set_direction (hb_buffer, dir);
>
> Do we call hb_buffer_set_direction, and if so, with what value?
With "t" or right-to-left we have dir == HB_DIRECTION_LTR, and yes we go
into that function. With the default (nil) or left-to-right we have dir
== HB_DIRECTION_RTL and we also call that function. Is this switched
around somewhere?
Thanks for looking into this,
benny
next prev parent reply other threads:[~2019-01-01 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-01 14:36 bug#33944: 27.0.50; harfbuzz: Noto Sans Mandaic not rendered correctly Benjamin Riefenstahl
2019-01-01 15:28 ` Eli Zaretskii
2019-01-01 18:34 ` Benjamin Riefenstahl [this message]
2019-01-01 19:17 ` Eli Zaretskii
2019-01-01 21:40 ` Benjamin Riefenstahl
2019-01-02 16:04 ` Eli Zaretskii
2019-01-02 23:12 ` Benjamin Riefenstahl
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=87zhsk6xco.fsf@turtle-trading.net \
--to=b.riefenstahl@turtle-trading.net \
--cc=33944@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.