Hello guys,
I’m trying to install SF font from Apple on my Droplet.
I’ve placed the font in 3 places, just in case:
/usr/share/fonts/
/usr/local/share/fonts/
~/.fonts/
Then in my .css I have:
font-family: 'SF UI Display Regular';
Which works fine in my Mac.
Any suggestions please?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Have you installed a desktop environment on your droplet? Which .css file are you referring to?
Unless you’re referencing the location of the font in your CSS file, font-family isn’t going to work as it normally would in a local environment (i.e on a Mac or Windows machine).
In your CSS file, you’ll need to define @font-face and provide a direct or relative path to the font file before it can be used.
This should be placed above any references to the font in question (i.e. at the top of the CSS file).
i.e.
@font-face {
font-family: 'SF UI Display Regular';
font-style: normal;
font-weight: 400;
src: local('/path/to/font.ext');
}
You would need to change /path/to/font.ext to the direct or relative path to the associated file.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.