Documentation for Custom Fonts
heaversm opened this issue · 2 comments
heaversm commented
Hi - just trying to get a local font to work in Blotter. My utilization of the font in CSS is as follows:
@font-face {
font-family: 'gtf_adieu_trialbold';
src: url('../fonts/gtfadieutrial-bold-webfont.woff2') format('woff2');
font-weight: normal;
font-style: normal;
}
Does blotter utilize the CSS font face somehow? Or is there something specific I need to do to make that available to JS?
jensdanjohansen commented
Hi @heaversm
Did you manage to make this work? If so I am really hoping you would share your solution! Thx
locksy commented
const text = new Blotter.Text(textEl.innerHTML, {
family : "'Righteous', 'url(Righteous-Regular.ttf)",
weight: 900,
size : 200,
fill : 'black'
and then I kept the font file in the same directory