Site will not load new font or added glyph


I’m having an issue where I am trying to add a glyph to a font for a theme that I am customising.

I’m not entirely certain where the font lives in the published site as the ttf file isn’t copied into publish, and deleting it from the themes folder the other glyphs in the font still appear so it must be being loaded from somewhere.

The cse definition for the custom font family is just url(“fontname.ttf”…) So I don’t believe it’s being pulled from the web, and renaming the font name still does not show the glyph which I would assume would force it to see the updated file if it was cached somehow, or installed on my computer.

The glyph is a Mastodon icon which will not load in the main page.

The github for the project is here:

I noticed in your repository that you were trying to use the theme as a submodule but gave up. I reckon you should get that working before trying to customise the theme.

Once you’ve got everything working with the standard theme, then you can look into overriding parts of the theme you want to improve.

Are you using the extended version of Hugo on your development machine? You’ll need this so Hugo is able to build the assets. (I noticed a stray .lnk file in your repository, so I’m guessing you’re developing on Windows.)

If you want to include a customised version of the iconfont files, this is the process I’d recommend:

  1. Make a copy of the files in the theme’s assets/font directory you want to override (from my understanding of your question, that’s probably all the iconfont.* files.)
  2. Copy them into the directory /assets/fonts
  3. Edit the files you’ve copied into your top level assets/fonts directory.

Now when you run hugo server it will use your edited version of the fonts, rather than the ones which came with the theme.

1 Like