[cairo] Custom UserFont sizing questions [RESOLVED]

Behdad Esfahbod behdad at behdad.org
Fri Dec 12 11:33:41 PST 2008


Ian Britten wrote:
> Behdad Esfahbod wrote:
> 
>> Ok, I suggest:
>>
>>   cairo_glyph_path()
>>   cairo_copy_path()
>>   cairo_new_path()
>>   process path here and add back to cairo_t
>>   cairo_stroke()
>>
>> All this in your UserFont render callback.
> 
> Ding! Ding!  That works, and if you're happy with it, then so am I!
> :)
> 
> [ Although that 'process path' part ends up being pretty hairy...
> There doesn't seem to be any easy way to remove stuff from a path,
> and I also got tripped up by the extra CAIRO_PATH_CLOSE_PATH (and
> subsequent CAIRO_PATH_MOVE_TO) entries I found in there...  :P
> Anyways, I just copied the points out that I wanted... ]

Did you read the docs?  You just need to call cairo_line_to, etc from inside
your loop directly...

Anyway, glad it works both ways now.

behdad


> Again Behdad, many thanks for all your help and patience.
> Ian
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
> 


More information about the cairo mailing list