[resolved] @font-face stopped working when site moved into production (3 posts)

  1. pdxchambers
    Posted 5 years ago #


    I recently moved my WordPress site from my development environment to production, but for some reason I can't quite explain the @font-face substitution stopped working on one of my fonts.

    '@font-face {
    font-family: 'AlexandriaFLFRegular';
    src: url('./fontFace/AlexandriaFLF/AlexandriaFLF-webfont.eot');
    src: local('☺'), url('./fontFace/AlexandriaFLF/AlexandriaFLF-webfont.woff') format('woff'), url('./fontFace/AlexandriaFLF/AlexandriaFLF-webfont.ttf') format('truetype'), url('./fontFace/AlexandriaFLF/AlexandriaFLF-webfont.svg#webfont') format('svg');
    font-weight: normal;
    font-style: normal;

    @font-face {
    font-family: 'CaviarDreamsRegular';
    src: url('./fontFace/Caviar-Dreams/CaviarDreams-webfont.eot');
    src: local('☺'), url('./fontFace/Caviar-Dreams/CaviarDreams-webfont.woff') format('woff'), url('./fontFace/Caviar-Dreams/CaviarDreams-webfont.ttf') format('truetype'), url('./fontFace/Caviar-Dreams/CaviarDreams-webfont.svg#webfont') format('svg');
    font-weight: normal;
    font-style: normal;

    The part that confuses me is why AlexandriaFLFRegular works as expected but not CaviarDreamsRegular... especially given that the theme was copied directly and no code was changed in the process.

    Any ideas on what might have happened?


  2. pdxchambers
    Posted 5 years ago #

    Hmm... it really is amazing how much better things work when you actually call the correct font family name in the font stack.

    Now I'm all embarrassed and stuff. :)

  3. esmi
    Forum Moderator
    Posted 5 years ago #

    We all have days like that. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic