uMatrix icon indicating copy to clipboard operation
uMatrix copied to clipboard

Bad interface under Firefox without custom fonts

Open Dupond opened this issue 9 years ago • 14 comments

Hello,

First of all thanks for this really great addon !

In order to reduce my browser's fingerprint (since we know that custom fonts are a way to target a specific browser, e.g. Panopticlick has a "System fonts" detection code), I use these parameters in my Firefox :

  • "browser.display.use_document_fonts" is set to "0" ;
  • "gfx.downloadable_fonts.enabled" is set to "false".

uMatrix's interface is then unusable : the icons are replaced with big and strange (more or less chinese-like) letters.

In order to fix this, would it be possible to use icons instead of custom fonts inside of the interface ?

Best regards, Dupond

Dupond avatar May 25 '15 06:05 Dupond

@Dupond you can disable flash based font enumeration in the mms.cfg file, by adding DisableDeviceFontEnumeration = 1.

0xBRM avatar May 25 '15 16:05 0xBRM

@CrisBRM Well that's handy, thanks for the tip.

luxoflux avatar May 26 '15 12:05 luxoflux

@CrisBRM Thanx for that, I've followed your advice. Is this workaround enough to close this issue, or do you guys think I should stay it opened waiting for an answer from gorhill ?

Dupond avatar May 26 '15 19:05 Dupond

There is a similar issue for uBlock.

I tried using a data: URI for the Font Awsome font file but that did not work.

Using fonts is really a huge time savers (easy to change, CSS styling), I won't ever go back to pixel-based icons. There is an issue on Firefox side to address fonts used as set of icons, but unclear if and when this would be resolved. I am not too warm at the idea of converting all to SVG, that would add some work overhead any time I want to change/select an icon -- but maybe I won't have choice.

gorhill avatar May 26 '15 20:05 gorhill

So a few things of note:

  • Adding DisableDeviceFontEnumeration=1 to C:\Windows\SysWOW64\Macromed\Flash\mms.cfg disables Flash enumeration.
  • Flash-based detection can only work if you allow scripts, and the Flash plugin (i.e., you should set click-to-play).
  • There's still another detection technique that uses CSS and doesn't require Flash, but will not work without javascript.
  • Personal opinion: using only document fonts ruins the user experience more than it's worth.

luxoflux avatar May 27 '15 04:05 luxoflux

Strange thing is, on the 3 PC's where I use Firefox with uMatrix and use_document_fonts=0, only one has problems displaying the buttons. The other two are fine. I have no idea what the difference is, but if someone knows where to look… (I tried to diff the prefs.js files but the output was too much).

wsldankers avatar Sep 28 '15 09:09 wsldankers

only one has problems displaying the buttons

Firefox version for that one? See http://www.ghacks.net/2015/07/21/firefox-41-mozilla-modifies-how-icon-fonts-are-handled-by-the-browser/.

gorhill avatar Sep 28 '15 12:09 gorhill

All three are version 41. I compared the settings as mentioned by that article but they seem to be identical. But perhaps this is just a local issue; if firefox indeed has a workaround for icon fonts, it may be that this bug can simply be closed.

wsldankers avatar Sep 28 '15 13:09 wsldankers

uMatrix 0.9.3.6, Pale Moon 27.0.3 (also same in latest unstable build), Win 8.1

browser.display.use_document_fonts = 0 and the font icons are OK in uMatrix with gfx enabled BUT the setting recommended in the uBlock issue, no remote fonts, will not save in uMatrix rules. I confirmed that other changes would save. Unless I'm missing something, this is not fully resolved for pre-41 Firefox (PM 27 is based on FF 38). Before asking PM developer if he can add a fix in the browser, is there anything I can do for uMatrix similar to the uBlock solution?

grumpygeek avatar Jan 13 '17 03:01 grumpygeek

Managed to fix it by resetting the (Ubuntu) fontconfig config to its defaults. YMMV

wsldankers avatar Jan 14 '17 17:01 wsldankers

No pref in PM with "fontconfig" or "font.config" or "font_config" I'm on Windows, so if you mean an OS setting, that's not likely to help Also, I checked Waterfox 50, and same problem is there too. I can live without the font icons, it just looks goofy. EDIT: I hope you weren't just referring to gfx.downloadable.fonts.enabled, because obviously it works with that set to default (=true), but that was the undesired setting.

grumpygeek avatar Jan 15 '17 01:01 grumpygeek

Yes, I referred to https://freedesktop.org/wiki/Software/fontconfig/ which is basically a linux OS component. It solved the problem for me, it may solve the problem for others. I'm sorry to hear it didn't solve it for you but I guess that's what YMMV means.

wsldankers avatar Jan 15 '17 09:01 wsldankers

I believe this issue is solvable, at least on nix systems, by installing fontawesome-webfont.ttf locally. I've put this file in /usr/local/share/fonts/font-awesome/ and then run fc-cache -fv. Make sure the directory has 0755 access permissions, and the file 0644.

You can find the above ttf file here - https://github.com/FortAwesome/Font-Awesome/tree/master/fonts

berkley4 avatar Jan 21 '17 06:01 berkley4

Yes, it worked for me. Thanks. The first link says ttf but is to a html page, then the link on that 2nd page is the actual file (click download button). Once downloaded, dbl-click file, click install button in font viewer (this is for Windows).

grumpygeek avatar Jan 24 '17 05:01 grumpygeek