InterviewSolution
| 1. |
How Do I Use Pango Instead Of Gdkfont For Font Handling In A Gtkdrawingarea? |
|
Answer» Create a font description with pango. You will then need a pango layout for the text you want to DISPLAY. You have to tell the layout which font description to use and DRAW it with the draw_layout() method instead of the draw_text() method. import pango You can FIND out about the size of the text by using the get_pixel_size() method from your pango layout object. e.g.: # GET the pixel size of a layout Create a font description with pango. You will then need a pango layout for the text you want to display. You have to tell the layout which font description to use and draw it with the draw_layout() method instead of the draw_text() method. import pango You can find out about the size of the text by using the get_pixel_size() method from your pango layout object. e.g.: # get the pixel size of a layout |
|