[cairo] Question on accessing Cairo font

Xi Yang jiandingzhe at 163.com
Thu Jul 1 00:19:50 PDT 2010


Hi everyone!




I'm making a program that needs to calculate layouts of many short texts, and their display width are required for calculation. I found that object cairo_scaled_font_t has function cairo_scaled_font_text_extents which can tell the text width in specific font and size. However, cairo_scaled_font_tcan only be acquired by calling cairo_get_scaled_font on a cairo drawing context, or created from font files. But my program don't have a cairo context at arranging phase, and I don't want to create font from file name. Is there any way to create a cairo_font_face_t by font name?





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20100701/194deba2/attachment.html>


More information about the cairo mailing list