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

render TEXT element #8

Closed
spger opened this issue Sep 23, 2020 · 5 comments
Closed

render TEXT element #8

spger opened this issue Sep 23, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@spger
Copy link

spger commented Sep 23, 2020

Hi, I would like to know if is possible read and render Text element from svg file

@sammycage
Copy link
Owner

Text elements are not implemented.

@sammycage
Copy link
Owner

Currently working on it. It might take time.

@spger
Copy link
Author

spger commented Sep 24, 2020

Okay, good to know.
Thank you

@spger spger closed this as completed Sep 24, 2020
@sammycage sammycage added the enhancement New feature or request label Sep 26, 2020
@sammycage sammycage reopened this Sep 26, 2020
@sammycage
Copy link
Owner

sammycage commented Sep 26, 2020

Added : 785c5b4

#include <lunasvg/svgdocument.h>

using namespace lunasvg;

int main()
{
    SVGDocument document;
    document.loadFontFromFile("yourfavorite.ttf");
    document.loadFromFile("filewithtext.svg");
    
    Bitmap bitmap = document.renderToBitmap();
    
    // do something useful with the bitmap.
    
    return 0;
}

@sammycage
Copy link
Owner

Thank you for reporting this issue.

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

No branches or pull requests

2 participants