[tor-bugs] #31917 [Applications/Tor Browser]: Investigate shipping bundled fonts on Android

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Oct 1 21:11:10 UTC 2019


#31917: Investigate shipping bundled fonts on Android
--------------------------------------+--------------------------
 Reporter:  sysrqb                    |          Owner:  tbb-team
     Type:  defect                    |         Status:  new
 Priority:  Medium                    |      Milestone:
Component:  Applications/Tor Browser  |        Version:
 Severity:  Normal                    |     Resolution:
 Keywords:  tbb-mobile                |  Actual Points:
Parent ID:  #18097                    |         Points:
 Reviewer:                            |        Sponsor:
--------------------------------------+--------------------------

Comment (by sysrqb):

 Copying from ticket:31881#comment:1
 > 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;
 >     }
 >   }
 > }}}

 We can use this as a defense against font fingerprinting.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31917#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list