You are not logged in.

#1 2020-07-05 08:58:34

morgothsauron
Member
Registered: 2014-03-28
Posts: 32

[solved] Unable to use Microsoft Fonts

Hello,
I have a minor font display issue on some websites with Firefox. The most obvious one is Google Calendar:
qGdHuDE.png

I looked at the style sheet and I think it has something to do with Arial fonts. From what I could find, Arial is part of Microsoft fonts.

Since I have a dual-boot with Windows 10, I copied all the fonts following the instructions found in the Wiki:
https://wiki.archlinux.org/index.php/Microsoft_fonts

To be exact, I executed the following:

## mount the windows partition
mkdir /tmp/windows
mount /dev/nvme0n1p3 /tmp/windows

## copy all fonts
mkdir /usr/share/fonts/WindowsFonts
cp /tmp/windows/Windows/Fonts/* /usr/share/fonts/WindowsFonts/
chmod 644 /usr/share/fonts/WindowsFonts/*

## refresh font cache
fc-cache --force --verbose

The files on the Windows partitions are not compressed.

I executed the last command (fc-cache) as root and as my user.

However I still can't see these fonts in KDE Font Management. I does not show when I run 'fc-list' either.

I tried to delete the font cache (~/.cache/fontconfig) and rebuild the cache, with no luck. I noticed that the Windows fonts don't seem to be found when I rebuild the cache (new cache contents: 0 fonts).

$ fc-cache -f -v
Font directories:
        /usr/share/fonts
        /usr/local/share/fonts
        /home/myuser/.local/share/fonts
        /home/myuser/.fonts
        /usr/share/fonts/TTF
        /usr/share/fonts/WindowsFonts
        /usr/share/fonts/adobe-source-code-pro
        /usr/share/fonts/cantarell
        /usr/share/fonts/encodings
        /usr/share/fonts/gnu-free
        /usr/share/fonts/noto
        /usr/share/fonts/util
        /usr/share/fonts/encodings/large
...
/usr/share/fonts/WindowsFonts: caching, new cache contents: 0 fonts, 0 dirs
...
/usr/share/fonts/WindowsFonts: skipping, looped directory detected
...
fc-cache: succeeded

Restarting my KDE session (logout + login) doesn't help.

I must be missing something, but I can't see what it could be.

Any suggestions on this ?

Thanks

Last edited by morgothsauron (2020-07-05 19:56:18)

Offline

#2 2020-07-05 11:13:31

morgothsauron
Member
Registered: 2014-03-28
Posts: 32

Re: [solved] Unable to use Microsoft Fonts

I don't know why I didn't think about this before. I booted Windows and I see the same thing, so it has nothing to do with Arch. It is simply gstaticadssl.l.google.com being blocked by the PiHole I use.

However I'd like to use these fonts anyway, so the font "installation" part of my post is still relevant.

Offline

#3 2020-07-05 11:28:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,768

Re: [solved] Unable to use Microsoft Fonts

Use the web inspector (ctrl+shift+i) to see which font families Firefox resolves, then test them against a missing glyph, eg. for the generic "sans" family

FC_DEBUG=4 pango-view --font="sans" -t   | grep family: 

and post the output.

Edit: the missing glyphs are btw. some more or less pointless unicode BS variants of <,> and @

Last edited by seth (2020-07-05 11:29:17)

Offline

#4 2020-07-05 13:41:00

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: [solved] Unable to use Microsoft Fonts

I wonder if there's an addon, or some other way, to provide google fonts locally... Decentraleyes does NOT afaics.

Offline

#5 2020-07-05 16:02:51

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [solved] Unable to use Microsoft Fonts

I think there's two different problems here; 1) Your browser is missing/can't find the Materials Icons Extended font and 2) your installation of the Win 10 Fonts didn't work. I don't think fixing #2 will actually fix #1, since that is a Google Polymer font, not a MS one. For getting your MS fonts working, I would recommend using the AUR package ttf-ms-win10 (AUR), since you've pretty much already done the hard part for installing that (copying the files from a licensed Windows instance). The pacman hook will/should take care of the rest, so that they will show up in font queries.

However, the Material Icons Extended font missing is bizarre, since that gets pulled in dynamically. I wonder if you have some Firefox setting turned on to force fonts and that interferes with the Material font. Can you try setting up a brand new user and running Firefox with its default vanilla setings to see if the problem is there as well? If not, then there's something going on with your FF settings.

Offline

#6 2020-07-05 19:01:29

morgothsauron
Member
Registered: 2014-03-28
Posts: 32

Re: [solved] Unable to use Microsoft Fonts

twelveeighty wrote:

However, the Material Icons Extended font missing is bizarre, since that gets pulled in dynamically. I wonder if you have some Firefox setting turned on to force fonts and that interferes with the Material font. Can you try setting up a brand new user and running Firefox with its default vanilla setings to see if the problem is there as well? If not, then there's something going on with your FF settings.

The answer to this is simple. After I posted I had a look at the log for the PiHole and found that fonts.gstatic.com was blocked. Whitelisting this domain fixes the issue.

On Windows I was able to install the font (https://github.com/google/material-desi … egular.ttf) and it seemed to work using the "test" page https://material.io/resources/icons/?style=baseline.

Installing the same font on Arch in /usr/share/fonts/MaterialIcons or /home/myuser/.local/share/fonts doesn't seem to work, might be because the font family doesn't match with what Firefox looks for

Pattern has 25 elts (size 32)
	family: "Material Icons"(s)
	familylang: "en"(s)
	style: "Regular"(s)
	stylelang: "en"(s)
	fullname: "Material Icons"(s)
	fullnamelang: "en"(s)
	slant: 0(i)(s)
	weight: 80(f)(s)
	width: 100(f)(s)
	spacing: 100(i)(s)
	foundry: "unknown"(s)
	file: "/usr/share/fonts/MaterialIcons/MaterialIcons-Regular.ttf"(s)
	index: 0(i)(s)
	outline: True(s)
	scalable: True(s)
	fontversion: 66256(i)(s)
	capability: "otlayout:latn"(s)
	fontformat: "TrueType"(s)
	decorative: False(s)
	postscriptname: "MaterialIcons-Regular"(s)
	color: False(s)
	symbol: False(s)
	variable: False(s)
	fonthashint: False(s)
	order: 0(i)(s)

I'll keep searching, but I won't spend too much time. Either I can find  some settings to "substitute" the font with a different one or I will simply whitelist the domain in PiHole config.

Offline

#7 2020-07-05 19:09:30

morgothsauron
Member
Registered: 2014-03-28
Posts: 32

Re: [solved] Unable to use Microsoft Fonts

Ok, I will whitelist the domain for the Google fonts. It will be a lot of trouble to get the font to work on all devices.

For the Windows fonts, I will try the suggested solution.

Offline

#8 2020-07-05 19:54:51

morgothsauron
Member
Registered: 2014-03-28
Posts: 32

Re: [solved] Unable to use Microsoft Fonts

Solved:

1) Firefox font display: For this one I whitelisted the google domain hosting the fonts. Maybe I could have find a way to get the font installed on my PC, but I would also have to deal with the font on other devices (Windows, macOS). Whitelisting the domain was the easiest solution that "fix" the issue for all devices at once.

2) Microsoft fonts: Since I already have access to the Windows fonts, I was able to install the fonts properly using AUR package (https://aur.archlinux.org/packages/ttf-ms-win10/). I had to edit the PKGBUILD a little to remove a font that doesn't exist. Installing the fonts using this method made them visible immediately in KDE Font Management and in fc-list

Offline

Board footer

Powered by FluxBB