[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #31881 [Applications/Tor Browser]: Enabling bundled fonts does not work anymore on Android
#31881: Enabling bundled fonts does not work anymore on Android
-------------------------------------------------+-------------------------
Reporter: gk | Owner: tbb-
| team
Type: defect | Status:
| needs_review
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-rbm, ff68-esr, tbb-9.0-must- | Actual Points:
alpha, TorBrowserTeam201909R |
Parent ID: #30324 | Points: 0.5
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Changes (by sysrqb):
* status: new => needs_review
* keywords: tbb-rbm, ff68-esr, tbb-9.0-must-alpha, TorBrowserTeam201909 =>
tbb-rbm, ff68-esr, tbb-9.0-must-alpha, TorBrowserTeam201909R
Comment:
Similar to #31880, `--enable-bundled-fonts` is restricted to `browser`:
https://searchfox.org/mozilla-esr68/source/toolkit/moz.configure#1323
It seems bundled-fonts was always desktop-only, `configure` simply didn't
error when targeting Android before FF64.
[https://bugzilla.mozilla.org/show_bug.cgi?id=1491419 Bug 1491419] moved
this from `old-configure.in` into `moz.configure`. We can see `old-
configure.in` before this change [https://hg.mozilla.org/releases/mozilla-
esr68/file/2a985dd40eba10801b2da141d1e8966b2ec060a5/old-configure.in#l3005
described it] as "Enable support for bundled fonts on desktop platforms"
(and now I notice it says this in `toolkit/moz.configure`, too).
This feature was originally added in
[https://bugzilla.mozilla.org/show_bug.cgi?id=998844 bug 998844] and this
was limited to desktop builds because Fennec already shipped with bundled
fonts: https://bugzilla.mozilla.org/show_bug.cgi?id=998844#c15.
It seems like we should take note of
[https://bugzilla.mozilla.org/show_bug.cgi?id=998844#c8 comment 8]:
{{{
This is already possible on Android and Firefox OS, where font files in
the "font"
sub-dir of a profile are loaded on startup:
http://dxr.mozilla.org/mozilla-
central/source/gfx/thebes/gfxFT2FontList.cpp#1266
}}}
[https://dxr.mozilla.org/mozilla-
central/source/gfx/thebes/gfxFT2FontList.cpp#1115
gfxFT2FontList::FindFontsInOmnijar] is a slightly more helpful function
(from FF32). This was implemented in
[https://bugzilla.mozilla.org/show_bug.cgi?id=878674 Bug 878674].
This is the current location: https://searchfox.org/mozilla-
esr68/source/gfx/thebes/gfxFT2FontList.cpp#1079
{{{
static const char* sJarSearchPaths[] = {
"res/fonts/*.ttf$",
};
RefPtr<nsZipArchive> reader = Omnijar::GetReader(Omnijar::Type::GRE);
for (unsigned i = 0; i < ArrayLength(sJarSearchPaths); i++) {
nsZipFind* find;
if (NS_SUCCEEDED(reader->FindInit(sJarSearchPaths[i], &find))) {
const char* path;
uint16_t len;
while (NS_SUCCEEDED(find->FindNext(&path, &len))) {
nsCString entryName(path, len);
AppendFacesFromOmnijarEntry(reader, entryName, aCache,
jarChanged);
}
delete find;
}
}
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31881#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs