I registered a custom FontFamily in the theme.json. It looked like this:
{
"name": "Open Sans",
"slug": "open-sans",
"fontFamily": "Open Sans",
"fontFace": [
{
"fontFamily": "Open Sans",
"fontStyle": "normal",
"fontWeight": "400",
"src": [
"file:./open-sans-latin-400.woff2",
"file:./open-sans-latin-400.woff",
"file:./open-sans-latin-400.ttf"
]
},
{
"fontFamily": "Open Sans",
"fontStyle": "normal",
"fontWeight": "800",
"src": [
"file:./open-sans-latin-800.woff2",
"file:./open-sans-latin-800.woff",
"file:./open-sans-latin-800.ttf"
]
}
]
}
While this works perfectly fine in Safari, Chrome is, for reasons that are unknown to me, not happy with my code. I tried and tried, and couldn’t find the mistake. Also, in this there I included 3 other fonts, and the other 3 fonts are working without any problem.
Then I figured, maybe there’s a problem with that Open Sans is maybe a prohibited name or whatever. So I changed my theme.json to
{
"name": "Custom Font",
"slug": "open-sans",
"fontFamily": "Custom Font",
"fontFace": [
{
"fontFamily": "Custom Font",
"fontStyle": "normal",
"fontWeight": "400",
"src": [
"file:./open-sans-latin-400.woff2",
"file:./open-sans-latin-400.woff",
"file:./open-sans-latin-400.ttf"
]
},
{
"fontFamily": "Custom Font",
"fontStyle": "normal",
"fontWeight": "800",
"src": [
"file:./open-sans-latin-800.woff2",
"file:./open-sans-latin-800.woff",
"file:./open-sans-latin-800.ttf"
]
}
]
}
And… it bloody works. Please tell me, what is going on here, and how was I supposed to know that using the name “Open Sans” is causing problems?
]]>I get the following error on my WordPress Dashboard:
OMGF konnte Open Sans Condensed nicht finden /tag/teil-des-problems/. Die API gab den folgenden Fehler zurück: Not Found.
In the CSS Google Fonts delivers is the following:
`/* latin */
@font-face {
font-family: ‘Open Sans Condensed’;
font-style: normal;
font-weight: 700;
src: url(https://fonts.gstatic.com/s/opensanscondensed/v22/z7NFdQDnbTkabZAIOl9il_O6KJj73e7Ff0GmDuXMR7eS2Ao.woff2) format(‘woff2’);
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}`
What I really find interesting is that I can not find the font on Google Font, only Open Sans.
If you need more information I of course will provide what I can.
]]>How can I fix this?
Thanks!
]]>When using a font within accordion eg. Open sans and then using Adobe Typekit to load that same font, the accordion selected font will fail to load.
The issue revolves around the property inserted by Accordian which is:
font-family: Open Sans !important;
For some reason it clashes with Adobe Typekit property which is:
font-family: open-sans, sans-serif;
To solve you have to put a css overide:
#wpsm_accordion_7773 .ac_title_class, {
font-family: open-sans, sans-serif;
}
Just a headsup. Might be of help to someone else.
]]>The ID is SP_WPCF-google-web-fonts-sp_wpcp_shortcode_options-css so I know it’s getting placed from this plugin. When I disable the plugin it goes away. How do I remove this Google Font request? We’re bringing in our own fonts and this embed is not necessary.
]]>1. If I enter a new para between two existing paras of Roboto, the new para uses Open Sans.
2. If I view it in the Text Editor, the Roboto text is wrapped in <span> tags and the Open Sans text just has normal <p> tags. So WordPress clearly believes that Open Sans is the still the default font, even though I have used Font Organiser to delete it from the system.
3. If I try to change a section of Roboto Text to Open Sans, I can’t because Opens Sans is not listed in the available fonts. (as expected)
4. If I use the Visual Editor toolbar option “Clear Formatting” from the entire post, everything reverts to Open Sans, confirming point 2.
5. The only two areas where fonts are defined are in Theme Options -Styles Tab and the Font Organiser plugin. I have uninstalled that plugin in case it was competing with the theme. No difference.
6. I have hard cleared the cache
7. I have tried a different browser
8. I even tried a fix I found somewhere else on here, which added a css file and called it in functions.php but that didn’t work so I reversed it out
There’s an artifact setting somewhere. Grrrrr
]]>I just updated to 5.1 and now my page view statistics showing me a lot of 404 errors trying to lookup this:
/wp-content/plugins/jetpack/css/”https:/fonts.googleapis.com/css?family=Open Sans”
Shows up when visitors are viewing various pages of the website.
Is there some kind of bug introduced with 5.1? While browsing the page nothing weird shows up when viewing the site, it is just my page views in the backend that is getting messed up.
Can you please resolve this?
]]>Where is the setting to change this PERMANENTLY back to a usable font?
]]>