[cairo] how to get text size ?

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Fri Jul 8 21:34:11 UTC 2016


On Fri, 08 Jul 2016 15:04:34 +0200, Stefan Salewski wrote:

> https://cairographics.org/manual/cairo-text.html#cairo-text-extents

Also, I just added the ability to write

    ctx.text_extents(some_text).bounds
      # returns bounds as a Rect

and

    ctx.text_extents(some_text).advance
      # returns advance as a Vector

to Qahirah <https://github.com/ldo/qahirah>.


More information about the cairo mailing list