Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for Custom Fonts #45

Closed
heaversm opened this issue Sep 25, 2019 · 2 comments
Closed

Documentation for Custom Fonts #45

heaversm opened this issue Sep 25, 2019 · 2 comments

Comments

@heaversm
Copy link

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
Copy link

Hi @heaversm

Did you manage to make this work? If so I am really hoping you would share your solution! Thx

@locksy
Copy link

locksy commented Mar 29, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants