Created
October 4, 2015 07:31
-
-
Save mertcanekiz/2044abae0388e6fb7383 to your computer and use it in GitHub Desktop.
Mac-like font rendering for Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version='1.0'?> | |
| <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
| <fontconfig> | |
| <match target="font"> | |
| <edit mode="assign" name="rgba"> | |
| <const>rgb</const> | |
| </edit> | |
| </match> | |
| <match target="font"> | |
| <edit mode="assign" name="hinting"> | |
| <bool>false</bool> | |
| </edit> | |
| </match> | |
| <match target="font"> | |
| <edit mode="assign" name="hintstyle"> | |
| <const>hintslight</const> | |
| </edit> | |
| </match> | |
| <match target="font"> | |
| <edit mode="assign" name="antialias"> | |
| <bool>true</bool> | |
| </edit> | |
| </match> | |
| <match target="font"> | |
| <edit mode="assign" name="lcdfilter"> | |
| <const>lcddefault</const> | |
| </edit> | |
| </match> | |
| <dir>~/.fonts</dir> | |
| </fontconfig> |
where to put this fonts.conf ?
bro, he uploaded it 10 years ago, i dont think he will reply,
check this out https://youtu.be/CPgMbyFI-88?si=GSt7HGoBSpy1B0gE
the same thing can be expressed in a minimal, modern ~/.config/fontconfig/fonts.conf like this:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="antialias"><bool>true</bool></edit>
<edit name="hinting"><bool>false</bool></edit>
<edit name="rgba"><const>rgb</const></edit>
<edit name="lcdfilter"><const>lcddefault</const></edit>
</match>
</fontconfig>Differences from yours:
- Removed duplicate
<match>blocks (one block is enough). - Dropped
hintstyle(irrelevant if hinting is off). - Removed old
<dir>~/.fonts</dir>(nowadays~/.local/share/fontsis auto-scanned). - Uses modern Fontconfig directory (
~/.config/fontconfig/fonts.conf).
If you drop this file in ~/.config/fontconfig/fonts.conf and run:
fc-cache -fvit’ll apply system-wide for your user.
-- chatgpt 5
there's a few places it can go https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where to put this fonts.conf ?