note: i use a windows pc, and my primary browser is chrome; i also feel that because this site is hosted on neocities, that's where a lot of my visitors are from, so things will be explained from these perspectives. i unfortunately probably can't help if you use a mac because i don't use them. the processes should be similar enough to still follow along, but i just wanted to acknowledge this in case your experience doesn't match what i say in my instructions exactly. when in doubt, google is your friendyou can contact me and i can maybe try to help (discord much preferred for coding help)
above is just a plain image with nothing fancy going on
in this example, i added some padding, added a background, added a border, and rounded the corners. i don't think it's reasonable for me to list all options, but basically you can style an image like a div, so play around with css attributes to see what you like!
places to browse fonts:
then, you'll download the font to your own pc, and if it's in a .zip or .rar, unzip it to a location of choice
you'll then want to check the embeddability of the font next. if the embeddability is restricted, that means it's not capable or allowed to be used as a primary font on a web page. as in, the font creator doesn't want it used on the web or in text editing programs, and has literally set it to be impossible. you can check the embeddability in the file properties, under details. save yourself a headache and always check if a font is restricted or not before moving on to other steps
also know that if you're dead-set on a certain font, the embeddability should still allow it to be used in programs such as photoshop - manually making things like header graphics is always an option, albeit more tedious. remember that using the font in graphics will still require appropriate credit based on the license of the font. there's also probably ways to unrestrict the embeddability, but don't do that. it's a douche move
to make sure the font always loads properly on every browser, the font should be converted into various formats. my personal favorite converter is available here; it automatically converts the font into every format you need, regardless of what format it was already in
from there, unzip and upload all the font files to your server
in this code, the relative file path is used over a full url; if the relative path is not used, the fonts may not work. if you're not familiar with relative file paths, it's essentially shorter paths based on the folder structure of your site. for example, say you're hosted on neocities and have a folder you put your fonts in. the relative path to the file would be /fonts/FONT.ttf while the full url would be https://YOURSITE.neocities.org/fonts/FONT.ttf. if you put everything in the same directy as your index file, then the relative path will simply be /FONT.ttf. you can learn more about file paths here
you also want to make sure you don't have a double file extension in the code. you want /FONTNAME.eot, not /FONTNAME.eot.eot. the parts you do want to leave in are ?#iefix for the second eot file, to have /FONTNAME.eot?#iefix. for the svg file, you'll want to keep #svg, and add the name of the font again, /FONTNAME.eot#svgFONTNAME.)
for the font name ("FONT NAME"), make sure it's the same as what it's called in the file properties, not necessarily what the file is literally named. right click on the file in your pc, and select properties from the dropdown menu. then select the "details" tab at the top of the new window. the first property should be name, and what it says there is what you want to say is the name in the code. for example, if it says FontName with capitals there, that's what should be used as the font name, even if the file name is fontname.ttf. the font name will not use a file extension
font-family is most often used for html, body, header, and div sections of a stylesheet. remember you can set different fonts for each of these for more unique designs, and bear in mind it's best to use a legible font for where the most text is going to be on your site - you want people to be able to actually read your content, right?
and voila! now you should have a custom font working on your website!
![]() |
![]() |