0

When using SpreadJs, if I set the font to Roboto, then the spreadsheet displays the font incorrectly.

Is there a way to add custom fonts or am I setting this incorrectly?

I am setting using the following format, this works for a select set of fonts but not others.

let fontText = `${fontWeight} ${fontSizes}px ${fontFamilies}`;
style.font = fontText;

enter image description here

user3284707
  • 3,033
  • 3
  • 35
  • 69

1 Answers1

0

I found it was because I didn't have Roboto installed, I added the following link at the top of my page and this solved the issue.

<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

user3284707
  • 3,033
  • 3
  • 35
  • 69