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

renderface/renderstring! for Ptr{FreeType.LibFreeType.FT_FaceRec_} face type? #38

Open
iuliancioarca opened this issue Mar 15, 2020 · 9 comments

Comments

@iuliancioarca
Copy link
Contributor

iuliancioarca commented Mar 15, 2020

I tried the examples in the readme but the face = newface("hack_regular.ttf") return type is Ptr{FreeType.LibFreeType.FT_FaceRec_} and it's not compatible with renderface/renderstring!, which needs ::FreeTypeAbstraction.FTFont.

As workaround I used face = FreeTypeAbstraction.FTFont(newface("DroidSansMono.ttf"))

@SimonDanisch
Copy link
Member

We should just deprecate newface!

face = FTFont("DroidSansMono.ttf")

Is the new way of doing things!

@SimonDanisch
Copy link
Member

If you want to make a PR to update the readme, that would help a lot :)

@iuliancioarca
Copy link
Contributor Author

Awesome! Thank you! Should I also export FTFont in FreeTypeAbstraction.jl?

@SimonDanisch
Copy link
Member

Yeah, sounds like a good idea!

@bjarthur
Copy link
Member

is a deprecations for newface in the works? i just encountered this error too.

@SimonDanisch
Copy link
Member

Yes, sorry... I didn't do this very cleanly :(

@bjarthur
Copy link
Member

i also got a renderstring! error about pixelsize now being a scalar instead of a tuple...

@SimonDanisch
Copy link
Member

You mean warning? https://github.com/JuliaGraphics/FreeTypeAbstraction.jl/blob/master/src/rendering.jl#L48
Yeah, I found out, that one can only reasonably set the size as 1 number

@bjarthur
Copy link
Member

warning, right. sorry.

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