WordPress.org

Forums

Frontier
[resolved] Changing fonts (6 posts)

  1. Ate Up With Motor
    Member
    Posted 10 months ago #

    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!

  2. Ate Up With Motor
    Member
    Posted 10 months ago #

    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!

  3. ronangelo
    Member
    Theme Author

    Posted 10 months ago #

    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.

  4. Ate Up With Motor
    Member
    Posted 10 months ago #

    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!

  5. ronangelo
    Member
    Theme Author

    Posted 10 months ago #

    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.

  6. Ate Up With Motor
    Member
    Posted 10 months ago #

    Okay, thanks. I will give that a shot.

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

Reply

You must log in to post.

About this Theme

About this Topic