[cairo] Pango cairo target surface size

Rob Kramer teegee at gmail.com
Mon Mar 23 21:24:46 PDT 2015


On 03/24/2015 12:13 PM, Lawrence D'Oliveiro wrote:
> On Tue, 24 Mar 2015 12:06:39 +0800, Rob Kramer wrote:
>
>> On 03/24/2015 11:21 AM, Lawrence D'Oliveiro wrote:
>>
>>> On Tue, 24 Mar 2015 10:41:40 +0800, Rob Kramer wrote:
>>>
>>>> What I want to do is paint a string to a surface the same size as
>>>> the text's logical extents -- without doing the text layouting
>>>> twice
>>> Why is it important that it is not done twice?
>> Efficiency, elegance, etc. I'm just trying to find out if cairo pango
>> has a better way to do this..
> How do other graphics APIs do it?

My current implementation uses a helper library called SDL-pango, which 
just handles all Pango stuff and has full control over layouting etc. It 
can do all extent calculations, and then create a bitmap surface. The 
library is not maintained however, and doesn't deal with SDL2 textures 
-- which led me to investigate cairo-pango.



More information about the cairo mailing list