Advertisement
Red-ex

Customize_fonts

Jul 3rd, 2018
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.48 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. ### Used sources:
  4. #   1. https://archlinux.org.ru/forum/topic/16691/
  5. #   2. http://www.pivpav.com/post/183
  6. #   3. https://github.com/sidaf/dotfiles/blob/master/init/50_linux_gnome_config.sh
  7. #
  8. # Install the required fonts from repos
  9. sudo pacman -S wget ttf-bitstream-vera ttf-croscore ttf-dejavu ttf-ubuntu-font-family ttf-inconsolata ttf-liberation ttf-roboto cpio noto-fonts noto-fonts-emoji noto-fonts-extra --noconfirm
  10.  
  11. # Install the required fonts from AUR
  12. yay -S ttf-carlito ttf-caladea ttf-droid-sans-mono-slashed-powerline-git otf-san-francisco --noconfirm
  13.  
  14. # Choose subpixel hinting mode /etc/profile.d/freetype2.sh
  15. sudo sed -i -e 's/#export FREETYPE_PROPERTIES="truetype:interpreter-version=40"/export FREETYPE_PROPERTIES="truetype:interpreter-version=38"/' /etc/profile.d/freetype2.sh
  16.  
  17. # Create local.conf file
  18. cd /etc/fonts/ && sudo wget -O local.conf https://pastebin.com/raw/QkLErPEw
  19.  
  20. # Open /etc/fonts/conf.d, delete all links and create new ones
  21. sudo rm -rf /etc/fonts/conf.d/*
  22. sudo ln -s /etc/fonts/conf.avail/10-hinting-slight.conf /etc/fonts/conf.d
  23. sudo ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d
  24. sudo ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d
  25. sudo ln -s /etc/fonts/conf.avail/69-unifont.conf /etc/fonts/conf.d
  26. sudo ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d
  27.  
  28. # Create & merge a ~/.Xresource file
  29. cat << EOF > ~/.Xresources
  30. Xft.dpi: 96
  31. Xft.antialias: true
  32. Xft.hinting: true
  33. Xft.rgba: rgb
  34. Xft.autohint: false
  35. Xft.hintstyle: hintslight
  36. Xft.lcdfilter: lcddefault
  37. EOF
  38. xrdb -merge ~/.Xresources
  39.  
  40. # Install gnome.settings-daemon
  41. sudo pacman -S gnome-settings-daemon --noconfirm
  42.  
  43. # Change fonts
  44. gsettings set org.gnome.desktop.interface document-font-name 'SF Pro Text 11'
  45. gsettings set org.gnome.desktop.interface font-name 'SF Pro Display 10'
  46. gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 12'
  47. gsettings set org.gnome.desktop.wm.preferences titlebar-font 'SF Pro Display Medium 10'
  48.  
  49. # Set font antialiasing and hinting
  50. gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing 'rgba'
  51. gsettings set org.gnome.settings-daemon.plugins.xsettings rgba-order 'rgb'
  52. gsettings set org.gnome.settings-daemon.plugins.xsettings hinting 'slight'
  53.  
  54. # Change autodetect encoding settings for Xed editor (as a bonus)
  55. gsettings set org.x.editor.preferences.encodings auto-detected "['UTF-8', 'WINDOWS-1251', 'KOI8-R', 'CURRENT', 'ISO-8859-15', 'UTF-16']"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement