JuliaGraphics / FreeTypeAbstraction.jl

A Julian abstraction layer over FreeType.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

iuliancioarca opened this issue · comments

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"))

commented

We should just deprecate newface!

face = FTFont("DroidSansMono.ttf")

Is the new way of doing things!

commented

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

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

commented

Yeah, sounds like a good idea!

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

commented

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

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

commented

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

warning, right. sorry.