In #13313 (moved) we introduced a new font whitelisting mechanism. Tor Browser only allows certain fonts to be used in the browser, in order to prevent bad people from trying to identify you by detecting what fonts are installed on your computer. Font whitelisting is also available in Firefox, off by default. (The whitelisting is controlled by a pref, "font.system.whitelist", which contains a comma-separated list of allowed font names. You can edit this pref by opening a tab and browsing to about:config.)
On Window and Mac, we mostly whitelist certain system fonts that are bundled with the operating system by default. We bundle a few Google Noto fonts as well for languages that don't have a built-in platform font.
On Linux, we bundle a large number of Google Noto fonts, plus Arimo, Cousine, and Tinos. We don't expose any system fonts, because these aren't consistent across Linux flavors.
My strategy for choosing fonts for the whitelist was to try to cover all possible languages with at least one font, and get the work done as efficiently as possible. I whitelisted Mac and Windows fonts that have been available for a long time and should be on essentially all systems. Bundling fonts from the Noto collection was a quick and dirty method for covering any missing fonts for different languages.
But there are probably more appealing fonts for some languages that we could use, especially on Linux. For example, in #20820 (moved) we are considering switching Linux from Noto Japanese to mona.ttf because the latter looks better (according to Yawning) and because mona.ttf can be used in the ancient Japanese art of ascii calligraphy. I also heard from someone who knows that the Tamil font on Windows is not too beautiful.
Proposed project:
So it would be a useful project to go through each of the fonts on each platform and see if there are better fonts that could be used instead. Important considerations would include:
Aesthetics
Character coverage
Printability
Font licensing
Font file size
This would require asking the opinions of native speakers of various languages.
Ideally, we could come up with a new font whitelist and bundling list for Mac, Windows and Linux, where the fonts are beautiful and users are happy.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
When surfing the web, it isn't unusual to come across some of these and it looks silly when they don't render.
I got these example errors while trying to figure out what was going on with fed.wiki.org and ended up writing a github issue about it, only to close it after I found out that it was a Tor Browser bug: https://github.com/fedwiki/wiki/issues/97
It was said that this should allow for color and black and white emojis once it is finished.
In the mean time, that link also said that https://packages.debian.org/jessie/ttf-ancient-fonts offers black and white emojis. I wonder if it would render the dingbats too. I don't know how to look through it to see if it has all of the Unicode 1 thru Unicode 4 dingbats though. If it does, perhaps we could whitelist it in the next TBB release.
I also posted an issue in Tails just in case they might have some fonts that they already use that might be good whitelisting candidates: https://labs.riseup.net/code/issues/12154
My native language is Dingbat and TBB on Linux only supports a few words in my language. I notice that some of my language's symbols are on this webpage and in uBlock Origin, but aren't supported on Linux TBB, so I can't read them. Can you please evaluate whether adding NotoSansSymbols-Regular.ttf to TBB Linux would help this situation as yawning suggested here: https://trac.torproject.org/projects/tor/ticket/18364?replyto=9#comment:9?
I outlined below some font families who are running right now on products with a significant amount of users and which maybe we could add to our whitelist.
Roboto is the standard typeface on Android.
Noto is the standard typeface for all languages on Chrome and Android for all languages not covered by Roboto.
Script types
English and English-like (Latin, Greek, and Cyrillic)
Dense (Chinese, Japanese, and Korean)
Tall (South and Southeast Asian and Middle Eastern languages)
It'd be great to see this proposal move forward. I saw some similar chatter going on about this over here: https://github.com/pyllyukko/user.js/issues/286 Is there some way in which we could coordinate with them to try to get this stuff sorted?
Also, would it be bad to turn this propoal into a reality in the next few days by changing the name of this thread and just start asking people to start providing TBB font feedback like was provided in part in the above comment? https://trac.torproject.org/projects/tor/ticket/20842#comment:10 If not, who needs to say yes to this proposal? Is there a way in which proposals are officially reviewed and deemed appropriate that I'm not aware of? If so, is there a way to bump this proposal to the top of the list since it seems to have been ignored for so long?
A third option would be to create seperate sub-tickets for font feedback that are OS specific and then solicit the opinions of native speakers of various languages and ask them to post in their respective operating system specific threads related to what fonts are good and bad?
I'd like to request whitelist and packaging support for Linear A, Linear B and Cretan Hieroglyphs.
Of these, there is a 32kb Google Noto font for Linear B, which is a good start.
(I've been trying to use it via CSS and font-face/font-family, but it doesn't work. I can't find any docs about this, but I'm guessing it's being blocked, as it works in Firefox.)
I'd love to add Montserrat and Source Sans (both Google) to SecureDrop, but cannot until they're whitelisted.
If all of the Noto families could be whitelisted, that'd also be super swell. I really adore their multi-lingual/alphabet support.
Hi Nina -- Montserrat, Source Sans, and the Noto fonts should still be usable as WebFonts. The only restriction is that Tor Browser is not whitelisting them as system fonts.
Hi Nina -- Montserrat, Source Sans, and the Noto fonts should still be usable as WebFonts. The only restriction is that Tor Browser is not whitelisting them as system fonts.
When you say "WebFonts", do you mean font-face/font-family in CSS?
If so, I can't get this to work. I have a page, which uses them, and it's fine in Firefox (Linear B correctly displayed, using the Noto font), but it does not work in Tor Browser (I get "tofu").
Hi Nina -- Montserrat, Source Sans, and the Noto fonts should still be usable as WebFonts. The only restriction is that Tor Browser is not whitelisting them as system fonts.
When you say "WebFonts", do you mean font-face/font-family in CSS?
If so, I can't get this to work. I have a page, which uses them, and it's fine in Firefox (Linear B correctly displayed, using the Noto font), but it does not work in Tor Browser (I get "tofu").
I be glad to take a look at your page (if you want to post a link here or send it to me directly).
First, I checked security settings. They're set to standard.
Next, I followed the link you provided to CSS tricks.
I'm doing what it says except the font-face rule in my code was not first, before any style rules. I moved it, uploaded the CSS file, reloaded the site (shift+click on the reload icon) in Tor Browser. No change.
I then wanted to check the site in Firefox from a HTTP server. After all, HTTP is fairly different to local and I had only checked Firefox from local disk.
I copied the site to a normal, non-onion site I have (temporarily replaced the site there - only two files) and viewed the site in Firefox ESR (Debian 9).
The Linear B font loaded correctly.
I then put the original site back in place, and did a recursive chmod, changing all ownerships on all files for all web-sites (including the onion site) to "www-data" (files I upload through the Debian UI SFTP end up being my username - which should work fine, global "r" permission).
(Bear in mind that prior to this, the font loaded correctly in Firefox ESR over HTTP, which was using a cp -R copy of the onion site.)
I then went back to Tor Browser (which was still running - I'd not quit it) and reloaded the site - and hey presto, the font is showing.
So, I no longer have a problem, but I don't know why.
First, I checked security settings. They're set to standard.
Next, I followed the link you provided to CSS tricks.
I'm doing what it says except the font-face rule in my code was not first, before any style rules. I moved it, uploaded the CSS file, reloaded the site (shift+click on the reload icon) in Tor Browser. No change.
I then wanted to check the site in Firefox from a HTTP server. After all, HTTP is fairly different to local and I had only checked Firefox from local disk.
I copied the site to a normal, non-onion site I have (temporarily replaced the site there - only two files) and viewed the site in Firefox ESR (Debian 9).
The Linear B font loaded correctly.
I then put the original site back in place, and did a recursive chmod, changing all ownerships on all files for all web-sites (including the onion site) to "www-data" (files I upload through the Debian UI SFTP end up being my username - which should work fine, global "r" permission).
(Bear in mind that prior to this, the font loaded correctly in Firefox ESR over HTTP, which was using a cp -R copy of the onion site.)
I then went back to Tor Browser (which was still running - I'd not quit it) and reloaded the site - and hey presto, the font is showing.
So, I no longer have a problem, but I don't know why.
Glad to hear it's working! That is indeed mysterious. But it sounds like maybe the file was not accessible for some reason? If you could reproduce the original problem, it might be interesting to see if you could directly download the font files with Tor Browser, or if you are getting some kind of HTTP error.
A file which is uploaded, by the XFCE desktop GUI built-in SFTP, for the first time (rather than overwriting an existing file) gets permissions 600, and is owned by my user (not the HTTP server user).
Result - everything else worked, but not the freshly uploaded font file.
I did however before all of this check the developer tool for network, and saw no errors.
I work on SecureDrop. We recommend users to only use SD with the Tor security-slider set to SAFEST, which eliminates use of webfonts as an option. I appreciate that the default answer to this, is "well then design an alternative version without the nice fonts, or design only with system fonts" but that's inadequate. We're a Tor-first, SAFEST-first, product—but also want to provide a superb experience to our users. Typography is not a straight-forward discipline, and most system fonts for one reason or another, in my ~20yrs working in digital, are rarely adequate for the ux of a webapp.
Dotfont, as an example, is part of (an admittedly premature/hackish) a solution we're working on for show/hide functionality on password fields—which is critical for supporting highly usable AND highly secure experiences. Noto is the most cross-charset legible font, available—and legibility matters a ton, in usability (and in all alphabets). Finally, for our Journalist client app, we're using SourceSans and Montserrat—and, again, for usability, we want the information design of our Web UI to have visual parity with the web experience... and most standard system fonts just aren't that legible/usable across sizes and use instances (sorry, they're just not—especially on Linux distributions, which rarely involve typography experts).
Whitelisting a few non-standard fonts used often in support of usable, security-centric, and task-instensive UIs, is my ask. If there's a reason it's being punted for risk, I'd love to understand that reason more. :)
I don't think it's being punted for risk. I think it's being punted for a few reasons:
It's not whitelisting them, it's bundling them. We have to figure out which platforms need them, which have them (and since when) and bundle them on the ones that don't have them.
We have the evaluate the file size bump in our packages from doing so.
We probably don't want to just quick add fonts for whoever asks the most (no offense) but rather in some more impartial fashion that also captures other requests and the original intent of this bug, which was to replace fonts with ones that were better.
I'm not completely sold on #3 (closed) as a blocker though.
Aside from all that. We learned via a Canvas Fingerprinting exploration, that the same font from different versions of the same OS renders differently. This would be an argument to whitelist zero system fonts and only use ones we bundle across all OSes.
(However we're not sure if the OS itself also renders the same font file differently AFAIK....)
No offense taken—totally not wanting to get things implemented simply by being the squeakiest-wheel (though I appreciate that I can sure squeak loudly, sometimes!). ;)
Still not quite getting my head around this issue, but I'll chat with SD peeps more familiar with Tor. My only concern is wanting to get fonts other than those bundled in with the system or the browser at installation, to load in a Tor window when the security setting is on SAFEST.