[cairo] render text along path

Behdad Esfahbod behdad at behdad.org
Wed Nov 26 19:34:32 PST 2008


Bobby Salazar wrote:

>> The move_to issue, there's not much to do about it.  What do you want it
>> to do?
> 
> I suppose that ideally it should split the path and close the resulting two paths nicely. For instance, suppose you are running the letter 'W' through the cairotwisted code, and the path it is using to map onto is a move_to, line_to, followed by a move_to, line_to, and that these line_to's are exactly half the length of the letter 'W', so basically it's a straight horizontal line with a break in the middle. I would want it to draw the 'W' as two 'V' letters in this case. But currently what it does is draw the two 'V' letters, with connecting lines between them where they would normally join to form the 'W' letter.
> 
> I hope that description makes sense. Basically, if someone was drawing this by hand on a piece of paper, their brush should lift off the paper and resume drawing at the new move_to point. The current code does not break the text path apart to replicate the proper move_to behavior. But this does not seem very trivial either, at least not to me.

Yeah, that's not trivial to do.


More information about the cairo mailing list