lagrange: fribidi and harfbuzz dependencies?

  • Done
  • quality assurance status badge
Details
4 participants
  • Bengt Richter
  • Christopher Howard
  • Efraim Flashner
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Christopher Howard
Severity
normal

Debbugs page

Christopher Howard wrote 3 years ago
(name . Guix Bug Reports)(address . bug-guix@gnu.org)
13dbc4b21d83ed3ffad524bd876f952e84696b2a.camel@librehacker.com
Hi, I like the lagrange gemini client, but I have struggled with some
font display issues since I do a publishing with mixed English and
Hebrew words. Lagrange does display Hebrew unicode characters, if you
switch to the selectable "Tinos" font in the preferences, but on my
system, the Hebrew script is displayed in the wrong direction (left-to-
right, instead of right-to-left).

According to the Lagrange github README, Lagrange should be able to
utilize the fribidi and harfbuzz software to properly display these
sorts of scripts, but it does not seem to be doing this in Guix, even
though these packages are available.

I attempted running lagrange inside "guix environment --ad-hoc fribidi
harfbuzz" but the scripts are still displaying backwards, suggesting
that something needs to be modified in the package definition itself to
utilize this software.

Here is a simple gemini test page (contain just a single Hebrew word):

gemini://gem.librehacker.com/gemlog/your-word/test.gmi

On my system, it displays the letters as "bet resh alef" from left to
right, rather than from right to left.


--
Christopher Howard
Gemini capsule: gemini://gem.librehacker.com
Liliana Marie Prikler wrote 3 years ago
9b1d27d01901c0c61c3a02a2c0d36f9e6536d075.camel@gmail.com
Hi,

Am Mittwoch, den 13.10.2021, 07:22 -0800 schrieb Christopher Howard:
Toggle quote (9 lines)
> [...]
>
> According to the Lagrange github README, Lagrange should be able to
> utilize the fribidi and harfbuzz software to properly display these
> sorts of scripts, but it does not seem to be doing this in Guix, even
> though these packages are available.
>
> I attempted running lagrange inside "guix environment --ad-hoc
> fribidi harfbuzz"
That's not how any of this works. Even if Lagrange were to mystically
pick up packages from your environment, which more likely than not it
doesn't, you would still have to include it in said environment for it
to make a difference.

Toggle quote (3 lines)
> but the scripts are still displaying backwards, suggesting that
> something needs to be modified in the package definition itself to
> utilize this software.
I suggest trying a variant of lagrange that has harfbuzz to verify that
it indeed does make a difference. You can construct one by editing
Guix source or by using the following with the right (use-modules ...)
clause on top:

(package
(inherit lagrange)
(inputs
`(("harfbuzz" ,harfbuzz)
,@(package-inputs lagrange))))

Alternatively, someone else might try given the file you've provided,
just putting this out there if you want to experiment on your own :)

Regards,
Liliana
Christopher Howard wrote 3 years ago
844b8d8659ee7ff5486c783a4c25243d8653f389.camel@librehacker.com
Hello, the following did NOT work:

```
(use-modules (guix packages))
(use-modules (gnu packages web-browsers))
(use-modules (gnu packages gtk))
(use-modules (gnu packages fribidi))

(packages->manifest
(list
(package
(inherit lagrange)
(inputs
`(("harfbuzz" ,harfbuzz)
("fribidi" , fribidi)
,@(package-inputs lagrange))))))
```

The package does build, but the problem remains with the script being
displayed in the wrong direction.

I'm am greatly curious if there are more configure time options that
need to be set in relation to this. This paragraph indicates there are
related configure options:

Liliana Marie Prikler wrote 3 years ago
a1ac7393379bded0205a416d932f81396ded063f.camel@gmail.com
Hi,

Am Mittwoch, den 13.10.2021, 15:40 -0800 schrieb Christopher Howard:
Toggle quote (26 lines)
> Hello, the following did NOT work:
>
> ```
> (use-modules (guix packages))
> (use-modules (gnu packages web-browsers))
> (use-modules (gnu packages gtk))
> (use-modules (gnu packages fribidi))
>
> (packages->manifest
> (list
> (package
> (inherit lagrange)
> (inputs
> `(("harfbuzz" ,harfbuzz)
> ("fribidi" , fribidi)
> ,@(package-inputs lagrange))))))
> ```
>
> The package does build, but the problem remains with the script being
> displayed in the wrong direction.
>
> I'm am greatly curious if there are more configure time options that
> need to be set in relation to this. This paragraph indicates there
> are related configure options:
>
> https://github.com/skyjake/lagrange#unicode-text-rendering
By default, Lagrange should have ENABLE_FRIBIDI and ENABLE_HARFBUZZ be
ON, whereas ENABLE_FRIBIDI_BUILD and ENABLE_HARFBUZZ_MINIMAL are set
OFF, just as the script states. It would seem to be a bug elsewhere
then.

Try to check the build log to see whether or not harfbuzz and fribidi
respectively get correctly detected by CMake. It ought to use pkg-
config to do so, but I don't trust CMake on a fundamental level. If it
does, there might be a problem with how Lagrange uses them?
Bengt Richter wrote 3 years ago
Re: bug#51183: lagrange: fribidi and harfbuzz dependencies?
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
20211014103930.GA10185@LionPure
On +2021-10-14 08:55:49 +0200, Liliana Marie Prikler wrote:
Toggle quote (43 lines)
> Hi,
>
> Am Mittwoch, den 13.10.2021, 15:40 -0800 schrieb Christopher Howard:
> > Hello, the following did NOT work:
> >
> > ```
> > (use-modules (guix packages))
> > (use-modules (gnu packages web-browsers))
> > (use-modules (gnu packages gtk))
> > (use-modules (gnu packages fribidi))
> >
> > (packages->manifest
> > (list
> > (package
> > (inherit lagrange)
> > (inputs
> > `(("harfbuzz" ,harfbuzz)
> > ("fribidi" , fribidi)
> > ,@(package-inputs lagrange))))))
> > ```
> >
> > The package does build, but the problem remains with the script being
> > displayed in the wrong direction.
> >
> > I'm am greatly curious if there are more configure time options that
> > need to be set in relation to this. This paragraph indicates there
> > are related configure options:
> >
> > https://github.com/skyjake/lagrange#unicode-text-rendering
> By default, Lagrange should have ENABLE_FRIBIDI and ENABLE_HARFBUZZ be
> ON, whereas ENABLE_FRIBIDI_BUILD and ENABLE_HARFBUZZ_MINIMAL are set
> OFF, just as the script states. It would seem to be a bug elsewhere
> then.
>
> Try to check the build log to see whether or not harfbuzz and fribidi
> respectively get correctly detected by CMake. It ought to use pkg-
> config to do so, but I don't trust CMake on a fundamental level. If it
> does, there might be a problem with how Lagrange uses them?
>
>
>
>

Is something possibly dependent on GNU extended functionality,
that putting
#define _GNU_SOURCE 1
in a header file could enable?
Also, if there are local files in the same directory as the Makefile,
could -I. in the right rule be needed to trigger compiles?

... a couple things that caused me hiccups before, maybe too obvious for others.
--
Regards,
Bengt Richter
Efraim Flashner wrote 3 years ago
(name . Christopher Howard)(address . christopher@librehacker.com)(address . 51183@debbugs.gnu.org)
YWx2C/E22fnx15c9@3900XT
On Wed, Oct 13, 2021 at 07:22:18AM -0800, Christopher Howard wrote:
Toggle quote (27 lines)
> Hi, I like the lagrange gemini client, but I have struggled with some
> font display issues since I do a publishing with mixed English and
> Hebrew words. Lagrange does display Hebrew unicode characters, if you
> switch to the selectable "Tinos" font in the preferences, but on my
> system, the Hebrew script is displayed in the wrong direction (left-to-
> right, instead of right-to-left).
>
> According to the Lagrange github README, Lagrange should be able to
> utilize the fribidi and harfbuzz software to properly display these
> sorts of scripts, but it does not seem to be doing this in Guix, even
> though these packages are available.
>
> I attempted running lagrange inside "guix environment --ad-hoc fribidi
> harfbuzz" but the scripts are still displaying backwards, suggesting
> that something needs to be modified in the package definition itself to
> utilize this software.
>
> Here is a simple gemini test page (contain just a single Hebrew word):
>
> gemini://gem.librehacker.com/gemlog/your-word/test.gmi
>
> On my system, it displays the letters as "bet resh alef" from left to
> right, rather than from right to left.
>
> https://en.wikipedia.org/wiki/Hebrew_alphabet#Alphabet
>

This is something that I've noticed too for years but never got around
to trying to fix. I actually find that mutt displays Hebrew backwards
for me too, as does translate-shell.

I've updated lagrange from 1.5.2 to 1.7.2 and I didn't see any
improvement in how it displays ברא vs ארב.

--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmFsdggACgkQQarn3Mo9
g1FQExAAgBuU2MeYAdVf8SOsRugwQi32xp1XesCCX+SXtnJ1xPji8PFsoIRr3j0r
3uBeWK+lMpRmiwxWeXTTTcWOHQjTWQNVrRWVliJVit7CE/4K9WbdB411dqbqSAfx
8OU1/82GRzjmXQ5CCYR9sJxEuh+YuyQiUWceK9oy4ThND59WuNTP5ygMc7vxmUPl
331DayS9OpwWq0oYEN9af1C5w8VdslZyfNMd/wnM3kFc4QR0hNHB8l0ktO6+XmWn
iWKo/EUSePmKSU0+w0Hqh/l+yZuRj/Ma7zSqlYSws4BChY3lw/NjUxk5PARTucAj
p1E6mwveoya4Wb4uRbNBiUEEqebJ6lCzIpL+uOuwV7Kutzg4RoSbYIjWDmQNqBgO
uAeGHspDeHqmMxXE5pHxLxpn83nxNtkpG8ugNuaqEq3+9yp3XjUV8OCYH6zy3sWv
/Y/WOaj+lvo7Wq03rNHS1lcum1ocwBLUDTJdx/H3gsXirl/CpOr/UZn4zFYMlaoH
QP9B2Z8hT8RPXN8fnFvtfnGmkoj9vAyWwJ6lnOKbJWgyvlcz3s+ssnZRdDNMgjLJ
ky/bZjrktPvwopdOJ33Xg+VIHMjxiAlAYwnPE3CWGI1or3hK95tu2rS1Etzqnr8n
NBkXr9YDBU1wUzZZAuhHd1O1LSPAKeRzLSYpOAZejJjGd/8iEls=
=ZHW6
-----END PGP SIGNATURE-----


Christopher Howard wrote 4 months ago
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 51183-done@debbugs.gnu.org)
878qu26bl3.fsf@librehacker.com
I switched over to elpher a while ago, but when I look at this now in Lagrange, I do not see any problems with Hebrew letter ordering. I tried this also with a fresh lagrange profile but am not seeing a problem (after installing a Hebrew font). Closing my old bug report.

--
Christopher Howard
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 51183@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 51183
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help