Opened 13 months ago

Last modified 13 months ago

#31917 new defect

Investigate shipping bundled fonts on Android

Reported by: sysrqb Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-mobile
Cc: Actual Points:
Parent ID: #18097 Points:
Reviewer: Sponsor:


In #31881 we found the correct method for shipping bundled fonts in Tor Browser on Android.

  1. Do we need to ship bundled fonts?
  2. Which fonts should be ship?
  3. How do these impact apk size?
  4. How does this impact language support?

Child Tickets

Change History (1)

comment:1 Changed 13 months ago by sysrqb

Copying from ticket:31881#comment:1

It seems like we should take note of 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:

gfxFT2FontList::FindFontsInOmnijar is a slightly more helpful function (from FF32). This was implemented in Bug 878674.

This is the current location:

  static const char* sJarSearchPaths[] = {
  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.

Note: See TracTickets for help on using tickets.