mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Move pango_cairo_font_map_set_default() to font.c
This commit is contained in:
parent
2f44e954aa
commit
58fdf9776f
3 changed files with 14 additions and 4 deletions
|
|
@ -7,4 +7,10 @@
|
|||
*/
|
||||
int font_height(const char *font_description);
|
||||
|
||||
/**
|
||||
* font_finish - free some font related resources
|
||||
* Note: use on exit
|
||||
*/
|
||||
void font_finish(void);
|
||||
|
||||
#endif /* __LABWC_FONT_H */
|
||||
|
|
|
|||
|
|
@ -42,3 +42,9 @@ font_height(const char *font_description)
|
|||
rectangle = font_extents(font_description, "abcdefg");
|
||||
return rectangle.height;
|
||||
}
|
||||
|
||||
void
|
||||
font_finish(void)
|
||||
{
|
||||
pango_cairo_font_map_set_default(NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
#include "common/spawn.h"
|
||||
#include "common/font.h"
|
||||
#include "config/session.h"
|
||||
#include "labwc.h"
|
||||
#include "theme/theme.h"
|
||||
#include "xbm/xbm.h"
|
||||
#include "menu/menu.h"
|
||||
|
||||
#include <cairo.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
struct rcxml rc = { 0 };
|
||||
struct theme theme = { 0 };
|
||||
|
||||
|
|
@ -95,6 +93,6 @@ main(int argc, char *argv[])
|
|||
server_finish(&server);
|
||||
rcxml_finish();
|
||||
menu_finish(server.rootmenu);
|
||||
pango_cairo_font_map_set_default(NULL);
|
||||
font_finish();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue