• I’ve made a child of twentyseventeen and overridden the default font in my child styles.css. This is working on the home page, i.e., everything is rendered in my font. However, when I click on a post and go to that post’s individual page, my font isn’t rendered, instead, PT Sans and Garamond. Looking at the Chrome Inspect of the page gives me these two errors in the Console:

    GET http://147pm.info/blog/the-ceiling/cmunrm.woff
    GET http://147pm.info/blog/the-ceiling/cmunrm.ttf

    There doesn’t seem to be any real directory the-ceiling on my server, and, therefore, I didn’t copy my fonts into it. But then, what is overriding my child styles.css and why? My site is 147pm.info/blog

    • This topic was modified 8 years, 11 months ago by borgauf.
    • This topic was modified 8 years, 11 months ago by Jan Dembowski.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi @borgauf

    What happens if you deactivate all plugins? Do the errors go away?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    How did you enqueue your new font in the child theme?

    Thread Starter borgauf

    (@borgauf)

    Deactivating plugins has no effect. Here’s my styles.css:

    
    /*                                                                                                                                                                                                    
    Theme Name:     2017147pm                                                                                                                                                                             
    Description:    Child Theme of 2017                                                                                                                                                                   
    Author:         borgauf@gmail.com                                                                                                                                                                     
    Template:       twentyseventeen                                                                                                                                                                       
                                                                                                                                                                                                          
    (optional values you can add: Theme URI, Author URI, Version, License, License URI, Tags, Text Domain)                                                                                                
    */
    
    @font-face {font-family: "CMU Serif Roman";
      src: url("cmunrm.eot"); /* IE9*/
      src: url("cmunrm.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
      url("cmunrm.woff2") format("woff2"), /* chrome、firefox */
      url("cmunrm.woff") format("woff"), /* chrome、firefox */
      url("cmunrm.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
      url("cmunrm.svg#CMU Serif Roman") format("svg"); /* iOS 4.1- */
    }
    
    body,
    textarea,
    html {
            font-family: "CMU Serif Roman", Georgia, serif;
            line-height: 1.15;
            -ms-text-size-adjust: 100%;
            -webkit-text-size-adjust: 100%;
    }
    
    • This reply was modified 8 years, 11 months ago by Jose Castaneda. Reason: added backticks
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    the issue is with the SRC in the CSS. You need to specify a fully qualified URL, something like

    
    url("http://example.com/wp-content/themes/mytheme/fonts/cmurm.eot")

    Otherwise, they’re relative to the current page/post.

    Thread Starter borgauf

    (@borgauf)

    This still isn’t working (same error) even though you can put in http://147pm.info/blog/cmunrm.eot and pull down the font. I now realize the “the-ceiling” is just the title as some sort of pseudo-directory.

    
    @font-face {font-family: "CMU Serif Roman";
      src: url("http://147pm.info/blog/cmunrm.eot"); /* IE9*/
      src: url("http://147pm.info/blog/cmunrm.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
      url("http://147pm.info/blog/cmunrm.woff2") format("woff2"), /* chrome、firefox */
      url("http://147pm.info/blog/cmunrm.woff") format("woff"), /* chrome、firefox */
      url("http://147pm.info/blog/cmunrm.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
      url("http://147pm.info/blog/cmunrm.svg#CMU Serif Roman") format("svg"); /* iOS 4.1- */
    }
    
    • This reply was modified 8 years, 11 months ago by Jose Castaneda. Reason: added backticks for code
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Did you make the change I outlined? It doesn’t look like it.

    If you put the font files in the ROOT of your website, then the URLs should be like
    url("http://example.com/cmurm.eot")

    Thread Starter borgauf

    (@borgauf)

    I’ve put the cmunrm.* files in literally every directory up and down my server. The problem, I’m still rather sure, lies in the fact that WP is creating a virtual directory based on the blog title e.g., “the-ceiling” and there are no cmunrm.* files in this virtual directory. Again, Chrome Inspect reports that it is looking in http://147pm.info/blog/the-ceiling/… for the font files and there is no real such place.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘What is “the-ceiling”?’ is closed to new replies.