[cairo] Using Pango+Cairo to layout non-standard / international text

robertk54 at aol.com robertk54 at aol.com
Thu Apr 10 07:38:02 PDT 2008


I am prototyping functionality which will be used to overlay text onto video.? The text can be of any font / language and will support various forms of animation.? I currently have Pango and Cairo working together.? Pango provides the font and layout and Cairo supports the rendering onto an ARGB surface.? Most of the basics are working.? I can select and render any installed font, scroll, fade, and resize the text.? My next effort is to be able to do 'non-standard' (horzontal / left-to-right) layouts and support international fonts.

I assumed that to handle right-to-left (i.e. Hebrew) or vertical (i.e. Chinese) fonts I would need to?adjust the gravity attribute (and possibly rotate the text?) but this does not seem to work.? I am currently using english fonts such (i.e. Arial) and would hope to?see the text rendered vertically instead of horizontally (I am not yet rotating so I guess I would expect the characters to be rotated but the text layed out horizontally?).??If I use anything but the default setting the text is rendered as small, hollow boxes.? Can anyone provide some insight into how to properly achieve this?

In addition, I would like to implement some code which could adjust the text on a character-by-character basis.? This would be to allow for wrapping text around a curved surface, etc.? Hopefully this is doable using Pango and Cairo alone.

Thanks,
Bob

p.s. thanks again to all who helped with my previous confusion related to FontConfig and FreeType.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080410/b480d1dc/attachment.html 


More information about the cairo mailing list