Last active
January 16, 2023 21:56
-
-
Save EmperorRXF/1c6b7a85647366e62922031996a5832c to your computer and use it in GitHub Desktop.
Fix Linux Fonts by disabling "Embedded Bitmap" and symlinking Windows Fonts
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 | |
set -e | |
WINDOWS_FONTS_DIR="/mnt/Windows/Windows/Fonts/" | |
echo "Creating ~/.config/fontconfig and ~/.local/share/fonts folders" | |
mkdir -p ~/.config/fontconfig ~/.local/share/fonts | |
echo "Writing EmbeddedBitmap filter to ~/.config/fontconfig/fonts.conf" | |
cat > ~/.config/fontconfig/fonts.conf << EOL | |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<edit name="embeddedbitmap" mode="assign"> | |
<bool>false</bool> | |
</edit> | |
</match> | |
</fontconfig> | |
EOL | |
echo "Creating symlink for $WINDOWS_FONTS_DIR in ~/.local/share/fonts/WindowsFonts" | |
ln -sfn $WINDOWS_FONTS_DIR ~/.local/share/fonts/WindowsFonts | |
echo "Refreshing font cache. Please wait..." | |
fc-cache -f | |
read -p "Press enter to continue." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment