• Resolved keykey767

    (@keykey767)


    I need to substitute the fonts that Baskerville theme uses. That’s because the used fonts (Roboto, Roboto Slab, Pacifico) do not support Polish characters.

    I don’t want to modify style.css, to be able to upgrade the theme in the future not losing my modifications. So I thought I could replace the font files with the ones downloaded from Font Squirrel with ‘Polish subset’ selected (for Pacifico there is no Polish subset, so I would download something similar that has Polish subset and substitute it’s name (file name) for ‘Pacifico’).

    But all that failed because the Baskerville theme doesn’t seem to have font files included locally. I also couldn’t find any @import of @font-face that could refer to Google Fonts for instance. So I don’t understand how does this theme finds the fonts it’s using…

    What I’m asking is how do I substitute fonts used by Baskerville theme in a way that they won’t be replaced back on theme upgrade.

    Best Regards and thanks for this great theme!
    Chris

Viewing 4 replies - 1 through 4 (of 4 total)
  • Create a child theme and make your adjustments in the child theme style.css. When the parent theme (Baskerville) is updated you will not lose changes.

    https://codex.www.ads-software.com/Child_Themes

    Thread Starter keykey767

    (@keykey767)

    Well, that could work, but I think when the Barkerville theme gets an update, it’s probably worth installing. It is a great theme. And I think your method would prevent me from installing Baskerville updates unless I’m okay with losing my modifications.

    I still don’t get how does this theme work when it refers to font names like Roboto and there are no local files with this font nor there is any URL pointing to online fonts in the theme itself. It would be the ultimate solution to substitute the font files, IMHO, if they were there…

    Best regards,
    Chris

    The fonts are called in via links in the <head> section. They are loaded directly from the Google Font repository. Look for:
    <link rel="stylesheet" id="baskerville_googleFonts-css" href="//fonts.googleapis.com/css?family=Roboto+Slab%3A400%2C700%7CRoboto%3A400%2C400italic%2C700%2C700italic%2C300%7CPacifico%3A400&ver=3.9.1" type="text/css" media="all">
    and
    <link rel="stylesheet" id="open-sans-css" href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=3.9.1" type="text/css" media="all">

    You really should read up on how child themes work. The whole point of them allows you to make changes to a theme while still allowing themes to be updated without losing your modifications.

    Thread Starter keykey767

    (@keykey767)

    Yes, you are right, obviously ??
    Thanks! ??

    Best regards,
    Chris

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Substitute theme fonts’ is closed to new replies.