• Resolved Ate Up With Motor

    (@ate-up-with-motor)


    I am looking to discontinue the use of the Google Font API fonts in my Frontier child theme and I’m wondering the best way to go about it. I can of course modify the fonts used in style.css through the child theme’s stylesheet, but they are also called by frontier/includes/editor-style.css, which begins with this line:

    @import url(http://fonts.googleapis.com/css?family=Roboto+Condensed:400,700|Arimo:400,700);

    To replace the Roboto and Arimo fonts with something else, do I need to made a complete duplicate of editor-style.css in the child folder and delete the first line (in addition to changing the font-family parameters)? If so, do I also need to recreate the folder hierarchy? (That is, do I need to create a folder called includes in the child theme folder and then put the edited duplicate editor-style.css in that folder?)

    If I do that, will it affect other functionality? I don’t want to accidentally break any of the other contents of the theme folder.

    I apologize if this is a dumb question, but I thought I should figure out the best way to approach this problem before trundling ahead and breaking something.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Oh, going along with that, I’m not sure how I can remove the wp_enqueue_style function that is loading the Google API fonts in the first place. I see it in the Frontier functions.php file, but I don’t know how to disable it from the child theme.

    Thanks again!

    Theme Author ronangelo

    (@ronangelo)

    Adding this on your child-theme’s functions.php will prevent the google fonts from being loaded on the front-end.

    function frontier_dequeue_font() {
       wp_dequeue_style( 'frontier-font' );
    }
    add_action( 'wp_enqueue_scripts', 'frontier_dequeue_font', 20 );

    As for the Post Editor, you could just disable the style applied by the theme.
    Frontier Options -> Misc -> Disable Editor Style

    Though if you want to keep the styles and simply change the fonts then yes, you have to add a modified editor-style.css inside an includes folder on your child-theme.

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Great, I will give that a shot.

    If I add a modified /includes/editor-style.css, do I need to copy all of the unmodified contents of the existing file or can I add a new one to the child theme containing just the altered line?

    Do I need to copy the rest of the includes folder or can I just copy that one?

    Thanks!

    Theme Author ronangelo

    (@ronangelo)

    do I need to copy all of the unmodified contents of the existing file

    You only need to add the properties that you plan to override.

    Ex.

    .mceContentBody {
       font-family: Tahoma, Sans-serif;
       font-size: 15px;
    }

    Do I need to copy the rest of the includes folder or can I just copy that one?

    No, you just need to add that one file.

    Thread Starter Ate Up With Motor

    (@ate-up-with-motor)

    Okay, thanks. I will give that a shot.

    Thanks again for your help. I really appreciate your excellent support for this theme.

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