You are not logged in.
the fontconfig file /etc/fonts/conf.d/30-metric-aliases.conf makes firefox use TeX Gyre Heros (Helvetica lookalike) on pages like github.
i prefer hinted fonts on screen, and only want the gyre family for TeX, where i can specify the directly.
how to disable the gyre fonts as aliases for helvetica etc.?
Offline
I use fontconfig-infinality and the free-font preset. Helvetica is replaced with Liberation Sans if available and Tex Gyre is only second choice for missing symbols.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I use, in /etc/fonts/local.conf:
<match>
<test name="family"><string>Helvetica</string></test>
<edit mode="assign" name="family" binding="strong"><string>Helvetica World</string></edit>
</match>So choose your replacement font (e.g.: Univers CE 55 Medium, Lato, Tex Gyre Heros, Liberation Sans). Test it with:
fc-match helveticaLast edited by brebs (2014-03-01 11:56:37)
Offline
Liberation Sans is very different from Helvetica stylistically, it just has the same metrics. They have very different uses, and mixing symbols is bound to look bad.
Offline
hmm, but i want github and the others just to fall back to my default sans-serif font. i want to *undo* the mapping of helvetica, not create a new one.
Offline
mixing symbols is bound to look bad.
Better to have bad looking symbols than none at all. Tex Gyre is AFAIK one of the few free fonts that include some special Adobe symbols like oldstyle digits. So you should have it always as last resort in a fontconfig chain.
Last edited by progandy (2014-03-01 13:26:53)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
hmm, but i want github and the others just to fall back to my default sans-serif font. i want to *undo* the mapping of helvetica, not create a new one.
Then try something like
$ cat ~/.config/fontconfig/fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>Helvetica</family>
<prefer>
<family>sans-serif</family>
</prefer>
</alias>
</fontconfig>Edit: Sorry, forgot to edit my post.
Last edited by progandy (2014-03-01 13:35:57)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
i want to *undo* the mapping of helvetica, not create a new one.
Then delete/edit /etc/fonts/conf.d/30-metric-aliases.conf as you see fit. Or use the method I described.
Remember, fontconfig has to map it to *something*, even if it's just Arial (the usual fallback).
Offline
this doesn’t do the trick:
<match>
<test name="family">
<string>Helvetica</string>
</test>
<edit mode="assign" name="family" binding="strong">
<string>sans-serif</string>
</edit>
</match>and progandy’s neither. after both i got this.
$ fc-cache -f
$ fc-match helvetica
texgyreheros-regular.otf: "TeX Gyre Heros" "Regular"and deleting 30-metric-aliases.conf is also bad, because it is useful in other cases.
the best thing would be a firefox/browser-specific override of just helvetica to sans-serif…
Offline
Not sure if this helps, but I use Stylish to override fonts on certain webpages that don't want to respect my system replacements.
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document
domain("blogs.technet.com"),
domain("support.microsoft.com"),
domain("technet.microsoft.com")
{
*{font-family:Verdana,Arial !important;}
}EDIT: removed sans-serif from code thanks to brebs.
Last edited by 0strodamus (2014-03-01 17:58:43)
archlinux | OpenRC | TOMOYO Linux | Xfce
"In his house at R'lyeh dead Cthulhu waits dreaming."
Offline
Not sure if this helps, but I use Stylish to override fonts on certain webpages that don't want to respect my system replacements.
@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("blogs.technet.com"), domain("support.microsoft.com"), domain("technet.microsoft.com") { *{font-family:Verdana,Arial,sans-serif !important;} }
thanks, in fact i used sth. similar to fix bitmap fonts displaying on github before, but more sites than just github want to use helvetica
Offline
"sans-serif" is not the name of a font, that's why it doesn't work. Obvious test:
$ fc-match "sans-serif"
arial.ttf: "Arial" "Normal"Offline
Thanks brebs. I corrected the code I posted, although it works for me as posted. I'm not sure why there are 3 fonts even listed because the first one is what always gets used. I "borrowed" it from a userscript I found many years ago and it's always worked so I didn't change anything other than the domains. Anyway, thanks again for the correction.
archlinux | OpenRC | TOMOYO Linux | Xfce
"In his house at R'lyeh dead Cthulhu waits dreaming."
Offline