Next.js Discord

Discord Forum

SVG font not loading properly once deployed - NextJS 14

Unanswered
Grass Carrying Wasp posted this in #help-forum
Open in Discord
Grass Carrying WaspOP
My SVG image's font (Paladins) isn't displaying properly on some devices once deployed, it works on localhost - On deployed versions it shows the default text

Note: I have Paladins.ttf in the public directory alongside the SVG file

Any help is much appreciated, thanks!

          <Image 
            src='/manifesto.svg'
            alt='Manifesto'
            width={184}
            height={51}
            layout='responsive'

            
          />


Manifesto.svg
      .cls-3, .cls-4, .cls-2 {
        font-family: Paladins, Paladins;
        font-size: 29.27px;
        text-decoration: underline;
      }

14 Replies

Grass Carrying WaspOP
Any help would be greatly appreciated 🙏
Field Spaniel
have you tried refreshing?
@Field Spaniel have you tried refreshing?
Grass Carrying WaspOP
of course I did... anything else?
@Grass Carrying Wasp of course I did... anything else?
Field Spaniel
sorry just joined, tryna help. pretty new to coding but yea
@Grass Carrying Wasp of course I did... anything else?
Field Spaniel
might not be an svg issue though
its probably to do with the font if im not mistaken
think it should be a simple fix, lmk if it works
if that doesnt work, lmk
@Field Spaniel its probably to do with the font if im not mistaken
Grass Carrying WaspOP
I know it's because of the fonts.. but how do I fix the fonts to make it universal?
@Grass Carrying Wasp I know it's because of the fonts.. but how do I fix the fonts to make it universal?
Field Spaniel
hmmm not sure will lyk if i find a solution, should be pretty simple though
Grass Carrying WaspOP
can someone else advise pls?
@Clown any thoughts on this? 🙏
Please dont ping people not part of the conversation until explicitly asked
As for the problem, you are going to have issues with SVG when using different fonts. Search up how to embed a font into a SVG for the fix