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

is it possible to use font awesome? #44

Open
avados opened this issue Mar 3, 2016 · 3 comments
Open

is it possible to use font awesome? #44

avados opened this issue Mar 3, 2016 · 3 comments

Comments

@avados
Copy link

avados commented Mar 3, 2016

Hi, everything in the title :)
i tried to set the font-family in the attributes to use font awesome, but when i try to set the text:

layer.setText(' \f1b0 ', {repeat: false , center :true,offset:8, attributes: {fill: 'red', 'font-size': '24','font-family': 'FontAwesome'}});
but the text shows as 1b0.

Thanks

@leplatrem
Copy link
Collaborator

You might want to try with XHTML entities instead of raw unicode...

@Talkless
Copy link

Talkless commented May 9, 2017

@avados It should work with \uf1b0 format.

@h0lg
Copy link

h0lg commented Dec 16, 2019

@avados It should work with \uf1b0 format.

It does! This technique for icon fonts deserves a mention in the README.md IMO.

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

4 participants