Last active
April 10, 2025 12:04
-
-
Save tsilvs/ea7d43271a4315d89fb13e79372164e4 to your computer and use it in GitHub Desktop.
Install Fast Font in Chrome on 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
#!/bin/bash | |
#TEST BEFORE RUNNING! | |
# Set your Chrome config directory name | |
chromium="chromium" | |
# Set your Chrome profile directory name | |
profile="Default" | |
chrome_prefs="~/.config/$chromium/$profile/Preferences" | |
mkdir -p ~/.local/share/fonts | |
mkdir -p ~/repo/Born2Root | |
git -C ~/repo/Born2Root clone [email protected]:Born2Root/Fast-Font.git | |
cp ~/repo/Born2Root/Fast-Font/Fast_{Mono,Sans,Serif}.ttf ~/.local/share/fonts | |
# This will enable the fonts in your profile | |
#jq '(.webkit.webprefs.fonts | .[] | .Zyyy) = "New_Font_Name"' "$chrome_prefs" | sponge "$chrome_prefs" | |
jq '(.webkit.webprefs.fonts.standard.Zyyy) = "Fast_Sans"' "$chrome_prefs" | sponge "$chrome_prefs" | |
jq '(.webkit.webprefs.fonts.sansserif.Zyyy) = "Fast_Sans"' "$chrome_prefs" | sponge "$chrome_prefs" | |
jq '(.webkit.webprefs.fonts.fixed.Zyyy) = "Fast_Mono"' "$chrome_prefs" | sponge "$chrome_prefs" | |
jq '(.webkit.webprefs.fonts.serif.Zyyy) = "Fast_Serif"' "$chrome_prefs" | sponge "$chrome_prefs" | |
# Now you have to apply the font everywhere, on all pages. | |
# I've found this line for uBlock Origin filters useful: | |
# *##body:style(font-family: unset !important;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment