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

svg text #21

Closed
danielbot opened this issue Jan 6, 2021 · 3 comments
Closed

svg text #21

danielbot opened this issue Jan 6, 2021 · 3 comments
Labels
question Further information is requested

Comments

@danielbot
Copy link

No description provided.

@danielbot danielbot changed the title If I try to display some text like this: document.appendContent("<text x='100' y='100' fill='red'>This Is Some Text</text>") If I try to display some text like this: document.appendContent("<text x='100' y='100' fill='red'>This Is Some Text</text>") nothing is displayed. Is it supposed to work? Jan 6, 2021
@danielbot danielbot changed the title If I try to display some text like this: document.appendContent("<text x='100' y='100' fill='red'>This Is Some Text</text>") nothing is displayed. Is it supposed to work? svg text Jan 6, 2021
@sammycage
Copy link
Owner

Text rendering requires font. Take a look at this issue #8

@danielbot
Copy link
Author

danielbot commented Jan 6, 2021

Yes, that does it. For the record (and the next person who comes along with the same question) I added this:
document.loadFontFromFile("/usr/share/vlc/skins2/fonts/FreeSans.ttf");
and I got text. Thanks much for the quick response.
(edit) But of course you should use fontconfig to get the font path, not a hardcoded path in the vast majority of cases.

@sammycage sammycage added the question Further information is requested label Jan 6, 2021
@sammycage
Copy link
Owner

But of course you should use fontconfig to get the font path, not a hardcoded path in the vast majority of cases.

I am currently working on it. It will be available in the next big update.

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

No branches or pull requests

2 participants