Closed Himra closed 4 years ago
this is the content of the linked CSS file The font is in the same directory as the CSS file It always renders with Arial
@font-face {
font-family: 'orkneylight';
src: url('orkney-light-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
body{
background:transparent;
margin: 0;
font-family: 'orkneylight', Arial;
font-size: 1.1rem;
}
Ive checked the plugin with the latest matomo version and it works like expected. I think you has some other issues with your css styles.
Maybe you can check your generated html content, to see if everything is injected corrently.
Edit: Please be sure, you use the correct iframe uri with the correct site id.
Hello Zeichen32,
The CSS is correctly integrated and displayed in the source code, but it always uses the wrong font. Another CSS file in the same folder and with the same font integration works.
somehow strange
So it is a problem with your css code and not with the plugin. So we can close this issue? Maybe you can try to add the font style with a absolute uri.
It also occurs with absolute paths and only in this plugin. The same CSS will work fine in a normal CSS file in the same directory.
Your webfont is not found by the browser:
This is defintiv a problem with your css style and not with this plugin. Maybe it is a cross-site script / iframe problem.
The Browser Console Tab shows: "Access to font at 'https://dorfimker.de/assets/dorfimker/orkney-light-webfont.woff' from origin 'https://stat.aurina.de' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
Thanks for your quick answer.
Why can the browser find the CSS and not the font, both files are in the same directory.
This definitely exceeds my knowledge. Can anyone describe how to solve this?
You need to configure your webserver to add a Allow-Origin Header when serving the font file. This is a security feature of modern browsern if you want to request between different domains / subdomains. https://www.codecademy.com/articles/what-is-cors
I copied the font into the Matomo directory and inserted the CSS script directly into the plugin. Now it works.
Thanks again for your help.
No problem, your welcome.
Seems like the plugin doesn't work with this version. Re-installation does not fix the problem.
I need this useful plugin because I want to use my own font.
Does anyone run it with this version?