Forum Discussion
karlsandin
9 years agoRegular Visitor
Import custom local font?
I am trying to import a local font but I keep on getting a console error: "@font-face failed cross-origin request. Resource access is restricted." Is it possible at all to import a custom fon...
- 9 years ago
Google "Access-Control-Allow-Origin" to learn more about this issue. Instead, you may use Google Fonts.
v-chuncz-msft
9 years agoCommunity Support
Based on my test, you need to import it as .less file.
@import (less) url('https://fonts.googleapis.com/css?family=Lato');karlsandin
9 years agoRegular Visitor
Works like charm!
Thanks alot for taking the time to help me with this, very much appreciated!
- lattys9 years agoFrequent Visitor
Hello karlsandin!
How did you import fonts or where/on wich platform ?
I would like to import the "roboto" family in my power bi desktop, which I will be publishing to the web (refresh through cloud). Thank you for your answer!
- karlsandin9 years agoRegular Visitor
Hi lattys!
I used the following line to import a google font into my project, placing it first in my visual.less file:
@import (less) url('https://fonts.googleapis.com/css?family=Lato');This works in both web and desktop version of Power BI
In your case it would look something like:
@import (less) url('https://fonts.googleapis.com/css?family=Roboto'); body { font-family: 'Roboto', sans-serif; }- lattys8 years agoFrequent Visitor
Thank you very much! :)