[tbb-bugs] #13313 [Tor Browser]: Enable bundled fonts in Tor Browser
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Oct 1 04:39:27 UTC 2014
#13313: Enable bundled fonts in Tor Browser
-----------------------------+----------------------
Reporter: dcf | Owner: tbb-team
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Tor Browser | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
-----------------------------+----------------------
Comment (by dcf):
I started a branch to work on this:
https://gitweb.torproject.org/user/dcf/tor-browser-
bundle.git/log/refs/heads/fonts
This comment is being made when HEAD is
[https://gitweb.torproject.org/user/dcf/tor-browser-
bundle.git/shortlog/refs/tags/tbb-4.0-alpha-3-fonts-1
tbb-4.0-alpha-3-fonts-1]. Here is the
[https://gitweb.torproject.org/user/dcf/tor-browser-
bundle.git/commitdiff/9e49557dda63af95fd09d95367fc479c3a925efa?hp=c2b76dcc4a854d7cecb44acac2bea1cf23cf51e6
overall diff so far].
At this point the branch only handles the linux bundles. linux is easier
because we can control font behavior with a
[http://www.freedesktop.org/software/fontconfig/fontconfig-user.html
fonts.conf] file without patching the browser source code. I added two
fonts to the bundle, [https://en.wikipedia.org/wiki/Droid_fonts Droid] and
[https://fedorahosted.org/lohit/ Lohit]. Droid covers all the languages of
TBB, and Lohit additionally covers various Indic scripts.
[https://gitweb.torproject.org/user/dcf/tor-browser-
bundle.git/commitdiff/829db0f92c4219bae57ffe0e8f3c6d9d1d701a67#patch2
This] is the main important change.
{{{
+export FONTCONFIG_PATH="${HOME}/TorBrowser/Data/fontconfig"
+export FONTCONFIG_FILE="fonts.conf"
}}}
It overrides global Fontconfig settings by an included configuration file
that loads only those fonts included with the browser.
I uploaded bundles built from the branch.
https://people.torproject.org/~dcf/pt-bundle/4.0-alpha-3-fonts-1/
mac and windows are there, but they only include the font files, and don't
actually use them. Here are the sizes of the bundles with included fonts:
{{{
40970478 TorBrowser-4.0-alpha-3-fonts-1-osx32_en-US.dmg
33539120 torbrowser-install-4.0-alpha-3-fonts-1_en-US.exe
34123852 tor-browser-linux32-4.0-alpha-3-fonts-1_en-US.tar.xz
35833512 tor-browser-linux64-4.0-alpha-3-fonts-1_en-US.tar.xz
}}}
Compare that to the size of 4.0-alpha-3 without included fonts:
{{{
34742225 TorBrowser-4.0-alpha-3-osx32_en-US.dmg
29868034 torbrowser-install-4.0-alpha-3_en-US.exe
30430008 tor-browser-linux32-4.0-alpha-3_en-US.tar.xz
32140468 tor-browser-linux64-4.0-alpha-3_en-US.tar.xz
}}}
Here is the diff of bundle contents:
{{{
+80K ./Browser/fonts/DroidKufi-Bold.ttf
+80K ./Browser/fonts/DroidKufi-Regular.ttf
+91K ./Browser/fonts/DroidNaskh-Bold.ttf
+88K ./Browser/fonts/DroidNaskh-Regular.ttf
+109K ./Browser/fonts/DroidNaskhUI-Regular.ttf
+36K ./Browser/fonts/DroidSansArabic.ttf
+14K ./Browser/fonts/DroidSansArmenian.ttf
+190K ./Browser/fonts/DroidSans-Bold.ttf
+218K ./Browser/fonts/DroidSansEthiopic-Bold.ttf
+223K ./Browser/fonts/DroidSansEthiopic-Regular.ttf
+4.4M ./Browser/fonts/DroidSansFallbackFull.ttf
+3.8M ./Browser/fonts/DroidSansFallback.ttf
+21K ./Browser/fonts/DroidSansGeorgian.ttf
+30K ./Browser/fonts/DroidSansHebrew-Bold.ttf
+30K ./Browser/fonts/DroidSansHebrew-Regular.ttf
+1.2M ./Browser/fonts/DroidSansJapanese.ttf
+117K ./Browser/fonts/DroidSansMono.ttf
+187K ./Browser/fonts/DroidSans.ttf
+259K ./Browser/fonts/DroidSerif-BoldItalic.ttf
+245K ./Browser/fonts/DroidSerif-Bold.ttf
+247K ./Browser/fonts/DroidSerif-Italic.ttf
+244K ./Browser/fonts/DroidSerif-Regular.ttf
+137K ./Browser/fonts/Lohit-Assamese.ttf
+137K ./Browser/fonts/Lohit-Bengali.ttf
+71K ./Browser/fonts/Lohit-Devanagari.ttf
+61K ./Browser/fonts/Lohit-Gujarati.ttf
+194K ./Browser/fonts/Lohit-Kannada.ttf
+49K ./Browser/fonts/Lohit-Malayalam.ttf
+70K ./Browser/fonts/Lohit-Marathi.ttf
+96K ./Browser/fonts/Lohit-Oriya.ttf
+24K ./Browser/fonts/Lohit-Punjabi.ttf
+65K ./Browser/fonts/Lohit-Tamil-Classical.ttf
+61K ./Browser/fonts/Lohit-Tamil.ttf
+167K ./Browser/fonts/Lohit-Telugu.ttf
-125K ./Browser/precomplete
+127K ./Browser/precomplete
+639 ./Browser/TorBrowser/Data/fontconfig/conf.d/65-0-lohit-
marathi.conf
+636 ./Browser/TorBrowser/Data/fontconfig/conf.d/65-0-lohit-nepali.conf
+492 ./Browser/TorBrowser/Data/fontconfig/conf.d/65-droid.conf
+1.7K ./Browser/TorBrowser/Data/fontconfig/conf.d/65-lohit.conf
+626 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-assamese.conf
+639 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-bengali.conf
+3.1K ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-
devanagari.conf
+643 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-gujarati.conf
+620 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-kannada.conf
+634 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-oriya.conf
+621 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-punjabi.conf
+663 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-tamil-
classical.conf
+633 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-tamil.conf
+633 ./Browser/TorBrowser/Data/fontconfig/conf.d/66-lohit-telugu.conf
+643 ./Browser/TorBrowser/Data/fontconfig/conf.d/67-lohit-
malayalam.conf
+6.3K ./Browser/TorBrowser/Data/fontconfig/fonts.conf
+572 ./Browser/TorBrowser/Docs/Licenses/Droid-Fonts.txt
+4.3K ./Browser/TorBrowser/Docs/Licenses/Lohit-Fonts.txt
-5.8K ./Browser/TorBrowser/Docs/sources/versions
+6.1K ./Browser/TorBrowser/Docs/sources/versions
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13313#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tbb-bugs
mailing list