snap-ed firefox doesn't do word break for Thai text
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
People
(Reporter: peathot, Assigned: gerard-majax)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0
Steps to reproduce:
Open a web page with somewhat long Thai sentence in a container, an example of which is attached. Thai words in a sentence doesn't contain whitespaces, and requires some kind of dictionary to do word breaking properly.
Actual results:
The sentence overflows outside of the container.
Expected results:
The sentence is broken at the word boundaries and stays inside the container.
| Reporter | ||
Comment 1•4 years ago
|
||
| Reporter | ||
Comment 2•4 years ago
|
||
| Reporter | ||
Comment 3•4 years ago
|
||
Additional information:
- This doesn't happen with the distro-agnostic tarball downloaded from www.mozilla.org, so this indicates that it's likely a packaging issue.
- I'm not sure how Firefox do Thai wordbreaks. However, this job is usually done by a library called 'libthai'. Snap-wise, this seems to be part of
gnome-3-38-2004which Firefox snap (and Chromium snap) depend on. Maybe snapped Firefox looks for this library (or its dictionary) in the wrong place?
| Reporter | ||
Comment 4•4 years ago
|
||
Ok. Launching with
LIBTHAI_DICTDIR=/snap/firefox/1993/gnome-platform/usr/share/libthai/ /snap/bin/firefox
fixes word breaking. Which is weird because why in the world does the Chromium snap not require this similar trick? Also, I suspect this to be a common issue...
| Reporter | ||
Comment 5•4 years ago
|
||
Oh, wow. Turns out, gedit snap also has this issue too. So, perhaps this "libthai cannot find its dictionary" is a common thing that maybe should be resolved in gnome-platform itself. But from Firefox snap standpoint, I think you can add
export LIBTHAI_DICTDIR=${SNAP}/gnome-platform/usr/share/libthai/
to the wrapper script, and this issue will be solved. Meanwhile, I'll report this issue to Launchpad, which I hope should have better solution.
Comment 6•4 years ago
•
|
||
Firefox 106.0.1 on Flatpak on openSUSE LEAP 15.4 works. So I suppose this issue is specific to the Snap package.
Comment 7•4 years ago
•
|
||
(In reply to Ratchanan Srirattanamet from comment #4)
Ok. Launching with
LIBTHAI_DICTDIR=/snap/firefox/1993/gnome-platform/usr/share/libthai/ /snap/bin/firefoxfixes word breaking. Which is weird because why in the world does the Chromium snap not require this similar trick? Also, I suspect this to be a common issue...
Chromium, LibreOffice, etc., break a line using another library, i.e., libicu. So they don't depend on libthai.
Comment 8•4 years ago
|
||
I don't know how Snap packages are configured, but if LibThai is configured with proper --prefix=..., it's supposed to be able to locate the dictionary without using LIBTHAI_DICTDIR environment.
Comment 9•4 years ago
|
||
I found the official repository for build the firefox snap. https://github.com/canonical/firefox-snap
Updated•4 years ago
|
Comment 10•4 years ago
|
||
I had a feeling I'd seen a report like this before, but on searching, I think it was the flatpak issue in bug 1630922 that I remembered.
Maybe the comments there might point towards a solution, as I suspect it's a similar issue of configuration/packaging.
| Reporter | ||
Comment 11•4 years ago
|
||
People at the snapcraft forum has found some solution.
They say the variable can be added in the common launcher script. I think we can wait for that.
Comment 12•4 years ago
•
|
||
Hello, thank you for the bug report!
I managed to reproduce this issue on:
- Firefox 107.0b7(Snap);
- Firefox 106.0.3(Snap) ;
- Firefox 108.0a1(Snap);
- Firefox 102.4.0esr(Snap);
Tested on Ubuntu 22 with the testcase from Comment 0. Only reproducible on Snap builds.
Setting as NEW.
Comment 13•4 years ago
|
||
(In reply to Ratchanan Srirattanamet from comment #5)
Meanwhile, I'll report this issue to Launchpad, which I hope should have better solution.
Would you mind sharing the launchpad bug report, if you ended up reporting this there?
I believe most of the snap-specific Firefox work (particularly relating to external libraries) would happen there instead of here, particularly given that (as you observed) multiple applications are affected by this issue.
Updated•4 years ago
|
| Reporter | ||
Comment 14•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #13)
(In reply to Ratchanan Srirattanamet from comment #5)
Meanwhile, I'll report this issue to Launchpad, which I hope should have better solution.
Would you mind sharing the launchpad bug report, if you ended up reporting this there?
Ok. So I ended up not reporting issue this issue to Launchpad, but to Snapcraft forum instead. There's a positive comment already (see comment #11), so I think another report to Launchpad would be redundant - or so I thought. :)
Comment 15•4 years ago
|
||
Thanks! I don't know much about the snap ecosystem, but I agree -- it sounds like ogra and kenvandine over there might be in a position to fix this, per https://forum.snapcraft.io/t/thai-word-breaking-doesnt-work-in-snaps-using-common-gnome-snaps-e-g-firefox/32303/4
| Assignee | ||
Comment 16•3 years ago
|
||
Looks like a PR was sent: https://github.com/canonical/firefox-snap/pull/9
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 17•3 years ago
|
||
this has been merged upstream and will make it soon to users
Comment 18•3 years ago
|
||
Will future snaps across all channels pick up this change automatically?
| Assignee | ||
Comment 19•3 years ago
|
||
Good question. The fix applies to gnome-platform but I dont know how it ships. Likely sebastian or amin would know?
Comment 20•3 years ago
|
||
Yes, next builds will have the fix included. The snapcraft version including the fix is in stable now and I verified today on the edge channel that it's working.
Comment 21•3 years ago
|
||
Sounds good, thanks for confirming!
Description
•