summaryrefslogtreecommitdiff
path: root/navit/osd.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-01-07 19:41:50 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-01-07 19:41:50 +0000
commita37c68e3c523945ad33ac1b945ca096c26bfdc0e (patch)
tree22b745e41be8bbf342fc4c94dd5e86f8a2b87e1b /navit/osd.c
parentc7d859c6605b55934180ceb67da4ccfff299859e (diff)
downloadnavit-a37c68e3c523945ad33ac1b945ca096c26bfdc0e.tar.gz
Add:Core:Possibility to specify font name for OSDs
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3877 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd.c')
-rw-r--r--navit/osd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/navit/osd.c b/navit/osd.c
index 051b4e4d1..40c56a60b 100644
--- a/navit/osd.c
+++ b/navit/osd.c
@@ -247,6 +247,9 @@ osd_set_std_attr(struct attr **attrs, struct osd_item *item, int flags)
attr=attr_search(attrs, NULL, attr_accesskey);
if (attr)
item->accesskey = g_strdup(attr->u.str);
+ attr=attr_search(attrs, NULL, attr_font);
+ if (attr)
+ item->font_name = g_strdup(attr->u.str);
}
void
@@ -296,7 +299,7 @@ osd_set_std_graphic(struct navit *nav, struct osd_item *item, struct osd_priv *p
graphics_gc_set_foreground(item->graphic_fg_white, &item->color_white);
if (item->flags & 2) {
- item->font = graphics_font_new(item->gr, item->font_size, 1);
+ item->font = graphics_named_font_new(item->gr, item->font_name, item->font_size, 1);
item->graphic_fg_text = graphics_gc_new(item->gr);
graphics_gc_set_foreground(item->graphic_fg_text, &item->text_color);
}