<div><div>Hi everyone!</div><div><br></div><div><br></div><div>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 <i><b>cairo_scaled_font_t</b></i> has function <i><b>cairo_scaled_font_text_extents</b></i> which can tell the text width in specific font and size. However,&nbsp;<i><b>cairo_scaled_font_t</b> </i>can only be acquired by calling <b><i>cairo_get_scaled_font&nbsp;</i><span class="Apple-style-span" style="font-weight: normal;">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 </span><i>cairo_font_face_t</i><span class="Apple-style-span" style="font-weight: normal;"> by font name?</span></b></div><div><br></div><div><br></div><div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"></div><br><br><span title="neteasefooter"/></span>