Red-ex

Enable bytecode-interpreter and the hinter in freetype by de

Feb 21st, 2020
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.97 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Enable bytecode-interpreter and the hinter in freetype by default in CentOS 7.7.1908
  4. # How to turn the bytecode-interpreter and the hinter found here:
  5. # http://lajosd.blogspot.com/2018/@ 10/subpixel-anti-aliasing-fonts-of-rhel75.html
  6. #
  7. sudo yum install yum-utils libX11-devel gcc rpm-build rpm-sign bzip2-devel libpng-devel -y
  8. mkdir ~/tools && cd ~/tools
  9. wget https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackageSource/freetype-2.8-14.el7.src.rpm freetype-2.8-14.el7.src.rpm
  10. rpm -ivv freetype-2.8-14.el7.src.rpm
  11. cd ~/rpmbuild/SPECS
  12. rpmbuild --sign -ba --with bytecode_interpreter --with subpixel_rendering freetype.spec
  13. # below to avoid "file /usr/lib64/libfreetype.so.6.10.0 from install of freetype-2.8-14.el7.x86_64 conflicts with file from package freetype-2.8-14.el7.x86_64"
  14. sudo rpm -e --nodeps freetype-2.8-14.el7.x86_64
  15. sudo rpm -Uh --replacepkgs ~/rpmbuild/RPMS/x86_64/freetype-2.8-14.el7.x86_64.rpm
  16.  
  17. # Adding local.conf file to /etc/fonts
  18. cd /etc/fonts/ && sudo wget -O local.conf https://pastebin.com/raw/0HA3pjhe
  19.  
  20. # Add two additional repositories and disable it
  21. sudo yum-config-manager --add-repo=https://download.opensuse.org/repositories/home:aevseev/CentOS7/home:aevseev.repo
  22. sudo yum-config-manager --add-repo=https://download.opensuse.org/repositories/home:ubn:charliecloud/CentOS_7/home:ubn:charliecloud.repo
  23. sudo yum-config-manager --disable home_aevseev
  24. sudo yum-config-manager --disable home_ubn_charliecloud
  25.  
  26. # Install the necessary fonts
  27. sudo yum install google-roboto-fonts google-roboto-mono-fonts bitstream-vera* -y
  28. sudo yum --enablerepo=home:aevseev install ubuntu-fonts -y
  29. sudo yum --enablerepo=home:ubn:charliecloud install fontawesome-fonts -y
  30.  
  31. #Download OTF SF Pro & Monaco fonts
  32. cd /usr/share/fonts
  33. wget -O - "https://www.dropbox.com/s/5nf6isrp44rzf3p/OTF.tar.gz" | tar xzf -
  34.  
  35. #Create an index of X font files in a directory
  36. cd OTF && mkfontdir
  37.  
  38. #Go to parent folder & update font cache
  39. cd .. && fc-cache -fv
Add Comment
Please, Sign In to add comment