URGENT help needed: Spirit updated and all fonts gone from drop downs!

Hi, I just updated Spirit theme and all our custom fonts are gone from the drop downs both the theme settings and text processor!

We are going live tomorrow and had just customised the fonts and fixed their sizes to the drop down. No the fonts are gone and this obviously has affected the look of the site and I really would not want to go through it all again!

So please, can you fix this asap. We have lots of work left tomorrow in building the site and this needs to work.

Feel free to access the site to fix the problem. The customisations can be found in the theme settings css (and there were some changes made to settings.php as well).

  • Michael Bissett

    Hey @Laura Janger-Laitio,

    I'm seeing 404 errors for the following fonts:

    PredigeRoundedMedium.otf
    Freeland.ttf
    Helveticaneue.ttf

    Could you please upload them to:

    /wp-content/themes/uf-spirit/fonts/

    Please note, as we're making changes to the theme itself (by uploading fonts to this folder, as well as the changes to settings.php), they will be wiped out on each update to the Spirit theme, so you'll want to note the changes made for later.

    In regards to the settings.php file, I've inserted the following into the bottom of it:

    'additional_fonts' => '[{family:\\"Freeland\\", variants:["regular"]}, {family:\\"PredigeRoundedMedium\\", variants:["regular"]}, {family:\\"Helveticaneue\\", variants:["regular"]}]',

    Could you let us know if this all gets things back up and running please?

    Kind Regards,
    Michael

  • Laura Janger-Laitio

    Yes thanks so much, this didi it!

    So just for the future: is it not enough that the fonts are now in both the upfront and spirit folders in wp-content? We had uploaded the fonts initially to the upfront folder, because that's the actual theme and spirit is the child theme, right? Also that code block was initially written in our settings.php (I think something must have happened, when we moved from local host the the temporary URL we are now).

    So do you think we are safe for the future updates, if we have the fonts in both folders and the settings.php set?

  • Laura Janger-Laitio

    Hi again, I'm still returning to this issue, since one of the fonts does not work as it should. I added the fourth custom font, PredigeRoundedBold to the settings.php, because it wasn't there (and checked and re-checked, the code seems to me to be alright). I also checked the custom css @fontface rules from the theme settings and it appears there and it appears in the drop down of the theme settings. But it does not appear where it would be needed, that is in the drop down of the text processor. Also, all the places I have used this font have lost the font. I even tried adding the settings.php file also to the upfront file in wp-contents, but that did not help either. What can be done? Why is this font not working, but the others with just the same settings do work?

    Also, could you please clarify to me, where does upfront read the fonts from? The spirit folder or the upfront folder? We now have all the custom fonts and the settings.php with the right added code (at least to my eyes).

    Sorry to bother you with this, but it is obviously important to us to have the right fonts on our site. Thanks so much for your assistance here!

  • Michael Bissett

    Hey @Laura Janger-Laitio,

    is it not enough that the fonts are now in both the upfront and spirit folders in wp-content?

    From what I saw, it didn't seem like the fonts were there at all (in either the /upfront/ or the /uf-spirit/ folders) after the update was performed, that's what ultimately gave us those 404 errors I mentioned.

    I'd place them in the child theme, myself (to answer your question about where to place them).

    Also that code block was initially written in our settings.php (I think something must have happened, when we moved from local host the the temporary URL we are now).

    The settings.php file of Spirit, correct?

    Once again, as we're making direct edits to the theme itself, as well as placing files inside of its folder (which aren't normally there), the changes will be lost on an update to Spirit.

    You'll need to keep track of the changes made, and re-apply them on each update (so you'll want to note the code changes made to settings.php, as well as the fonts uploaded to the theme folder).

    Now, as for this:

    I added the fourth custom font, PredigeRoundedBold to the settings.php, because it wasn't there (and checked and re-checked, the code seems to me to be alright).

    I also checked the custom css @fontface rules from the theme settings and it appears there and it appears in the drop down of the theme settings. But it does not appear where it would be needed, that is in the drop down of the text processor.

    How did you add the 4th font to your child theme? To pick apart how each custom font should be added, you'll notice that each font is enclosed in curly brackets:

    'additional_fonts' => '[{family:\\"Freeland\\", variants:["regular"]}, {family:\\"PredigeRoundedMedium\\", variants:["regular"]}, {family:\\"Helveticaneue\\", variants:["regular"]}]',

    Or to look at it another way (just for visualization purposes):

    'additional_fonts' => '[
    {family:\\"Freeland\\", variants:["regular"]},
    {family:\\"PredigeRoundedMedium\\", variants:["regular"]},
    {family:\\"Helveticaneue\\", variants:["regular"]}
    ]',

    Each "family" statement is enclosed in curly brackets, and each "family" statement needs to be followed up with a comma (excepting the last one, of course).

    So, to guess for your situation (since the original code isn't available), the following format should work:

    'additional_fonts' => '[{family:\\"Freeland\\", variants:["regular"]}, {family:\\"PredigeRoundedMedium\\", variants:["regular"]}, {family:\\"Helveticaneue\\", variants:["regular"]}, {family:\\"PredigeRoundedBold\\", variants:["regular"]}]',

    However, we must also take this statement into account:

    Also, all the places I have used this font have lost the font

    And ask, does that font exist inside of the child theme presently, in the location I referenced? If it is, then I'd like to have a look at your site.

    Could you please enable Support Access to your new site (as the one here in the thread uses the temp URL, which is no longer valid), and mention where I can see some text that should have this font?

    Please advise,
    Michael

  • Laura Janger-Laitio

    Thanks so much Michael for your assistance! Because we needed to go live with the site, I simply changed the fonts using only PredigeRoundedMedium. So this matter is no longer that urgent. I thought I added the code block to settings.php just as it should be, but I'll have to take a closer look.

    There is, however, a much more urgent matter, which would need to be fixed in order of the site to look as it should. I have filled a support ticket of that here: https://premium.wpmudev.org/forums/topic/why-are-some-of-the-regions-locked#post-989292
    Would it be possible really to rush this matter now? The fact that some regions are "locked" makes it hard to do the final adjusting to the site and, most importantly, it affects the the live site so that those locked regions are blurred. I will grant the support access immediately. Thanks!