Last active
August 5, 2016 02:52
-
-
Save aldrienht/cdedca54a9398bdc6f7a3e12d7a222db to your computer and use it in GitHub Desktop.
Matching System Font with your local environment and Amazon Linux
This file contains 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
Step 1: Back up your EC2 System fonts. | |
cp -r /etc/fonts /etc/fonts.old | |
Step 2: Migrate your local font via SCP. | |
scp -r -i file.pem /etc/fonts [email protected]:/etc/fonts | |
Step 3: Reset Font Cache | |
fc-cache | |
fc-cache -v | grep err (to check errors) | |
*Note: If you encounter error with bitmap-fonts... | |
*The default config restricts the use of bitmap fonts, do the following. | |
sudo rm /etc/fonts/conf.d/70-no-bitmaps.conf | |
sudo ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d/70-yes-bitmaps.conf | |
Do the reseting of cache, you shouldn't get any error after. | |
Step 4: Create a fonts/ folder in your application and fill it with the font(s) you want. | |
cd my_app_dir | |
mkdir fonts | |
Step 5: Create a .ebextensions directory and copy_fonts.config file: | |
mkdir .ebextensions | |
cd .ebextensions | |
vi copy_fonts.config | |
(paste the code below:) | |
container_commands: | |
copy_fonts: | |
command: "cp fonts/*.ttf /usr/share/fonts/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment