Forum Discussion
Import custom local font?
- 9 years ago
Google "Access-Control-Allow-Origin" to learn more about this issue. Instead, you may use Google Fonts.
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!
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! :)
- murali_r8 years agoHelper I
Hi I am also face same issue (import roboto font) in power BI Desktop . I have only .pbix file . In this how do I generate and import this visual.less file . Please help me in details because I am new to this.
- v-viig8 years agoCommunity Champion
Hello murali_r
You can import custom fonts to your own custom visuals by using the solution above.
However, you can't import custom fonts and apply them to Power BI Desktop and other visuals w/o some code modifications.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- Friso7 years agoFrequent Visitor
Hello,
How and where can I import the code beneath?
And is it not possible yet to use is alwasy (one import or for each visual a seperate import?)
@import (less) url('https://fonts.googleapis.com/css?family=Roboto'); body { font-family: 'Roboto', sans-serif; }Friso
- mblacher8 years agoNew Member
In what part of Power BI Desktop should I put the code?
- mblacher8 years agoNew Member
In what part of Power BI Desktop should I put the code?