FreeTypeAbstraction.jl icon indicating copy to clipboard operation
FreeTypeAbstraction.jl copied to clipboard

have `renderstring!` return text bound box?

Open bjarthur opened this issue 7 years ago • 2 comments

currently renderstring! returns the img that is input. more useful i think would be to return the bounding box of the rendered text. if that makes sense, i could create a PR. let me know.

bjarthur avatar May 01 '17 19:05 bjarthur

We do have a boundingbox function now: https://github.com/JuliaGraphics/FreeTypeAbstraction.jl/blob/master/src/layout.jl#L55

SimonDanisch avatar Feb 29 '20 16:02 SimonDanisch

Does this work on strings? I was able to get the proper size for chars, but for strings it does not work:

    img, extent = FreeTypeAbstraction.renderface(face,"test",100)
    hb = FreeTypeAbstraction.inkboundingbox(extent)

davibarreira avatar May 25 '24 13:05 davibarreira