Use ICU4X as the Unicode back end for HarfBuzz
Categories
(Core :: Internationalization, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: hsivonen, Assigned: hsivonen)
References
Details
Attachments
(1 file)
We should use the icu_harfbuzz crate to make the Unicode Database operations that HarfBuzz has callbacks for to go to ICU4X instead of ICU4C.
We probably shouldn't involve Diplomat FFI here at all. Let's write a single FFI function for gfxHarfBuzzShaper::Initialize call and have that FFI function connect the callbacks as seen in https://github.com/unicode-org/icu4x/blob/main/tutorials/rust/harfbuzz/src/main.rs .
For performance and API settling down, it probably makes sense to wait until we have ICU4X 2.0 in mozilla-central before doing this.
| Assignee | ||
Comment 1•1 year ago
|
||
Specifically, this is about replacing this part of the current HarfBuzz initialization:
https://searchfox.org/mozilla-central/rev/937d8e66a5bfe2fc8eb9aa0080629ce7f8dd6cc6/gfx/thebes/gfxHarfBuzzShaper.cpp#1244-1257
| Assignee | ||
Comment 2•11 months ago
|
||
jfkthame, do we need to continue to have the fix for bug 1012365? It seems that Firefox for Android now requires Android 5 or newer, the buggy font was on a Samsung device running Android 4.3. There was a comment about Android 4.4.2 being OK, but it's unclear to me if that was Samsung's Android or some other Android 4.4.2.
| Assignee | ||
Comment 3•11 months ago
|
||
The font appears not to be included on Samsung A54 G5, according to Jens.
Comment 4•11 months ago
|
||
I don't have any current information regarding this. As far as I can tell, Samsung has shifted to their "SamsungOne" font as their primary font family, and Devanagari is mentioned as one of the writing systems it supports, but this doesn't seem to be readily available (short of getting a device that includes it), so I can't currently check it.
(Most likely it's all OK now, but my niggling concern is the possibility that they could have just taken their old SamsungDevanagari font and merged it into the SamsungOne "family", without necessarily fixing things.)
Maybe we could start by removing the hack from Nightly, and then ask a few people with Samsung devices to check whether the test file from bug 1012365 still renders the character.
| Assignee | ||
Comment 5•10 months ago
|
||
| Assignee | ||
Comment 6•10 months ago
|
||
https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=143795
(In reply to Jonathan Kew [:jfkthame] from comment #4)
Maybe we could start by removing the hack from Nightly, and then ask a few people with Samsung devices to check whether the test file from bug 1012365 still renders the character.
Thanks. OK. I'll try that.
| Assignee | ||
Comment 7•10 months ago
|
||
(I will need to figure out what to do about harfbuzz-sys containing a copy of the source of HarfBuzz.)
| Assignee | ||
Comment 8•10 months ago
|
||
Updated•4 months ago
|
| Assignee | ||
Comment 9•4 months ago
|
||
It's bad that harfbuzz-sys contains a copy of the source code of HarfBuzz itself.
Is there some directive that I can set to make mach vendor rust filter it out, or should I fork the repo, delete the copy of HarfBuzz in the fork, and then vendor from the fork?
Comment 10•4 months ago
|
||
Is there some directive that I can set to make mach vendor rust filter it out
There isn't
| Assignee | ||
Comment 11•4 months ago
|
||
Try run to check that it builds for various targets given that it previously built for desktop Linux but not for Android:
https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=180102
| Assignee | ||
Comment 12•3 months ago
|
||
| Assignee | ||
Comment 13•3 months ago
|
||
Perhaps getting around the Lando bug this time:
https://treeherder.mozilla.org/jobs?repo=try&revision=b7d9f2a3927327574c4a02f34e7a6622cd446ce9
| Assignee | ||
Comment 14•3 months ago
|
||
Comment 15•3 months ago
|
||
Comment 16•3 months ago
|
||
| bugherder | ||
Updated•2 months ago
|
Description
•