Index: uspace/app/edit/edit.c
===================================================================
--- uspace/app/edit/edit.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/app/edit/edit.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -1259,4 +1259,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	fmt.color = pane->color;
 
@@ -1318,5 +1319,5 @@
 					return rc;
 
-				rc = gfx_puttext(font, &tpos, &fmt, cbuf);
+				rc = gfx_puttext(&tpos, &fmt, cbuf);
 				if (rc != EOK)
 					return rc;
Index: uspace/app/fontedit/fontedit.c
===================================================================
--- uspace/app/fontedit/fontedit.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/app/fontedit/fontedit.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -503,4 +503,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = fedit->font;
 	fmt.color = color;
 
@@ -508,5 +509,5 @@
 	pos.y = y;
 
-	return gfx_puttext(fedit->font, &pos, &fmt, str);
+	return gfx_puttext(&pos, &fmt, str);
 }
 
Index: uspace/app/gfxdemo/gfxdemo.c
===================================================================
--- uspace/app/gfxdemo/gfxdemo.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/app/gfxdemo/gfxdemo.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -238,4 +238,5 @@
 
 		gfx_text_fmt_init(&fmt);
+		fmt.font = font;
 		fmt.color = color;
 		fmt.halign = gfx_halign_center;
@@ -244,5 +245,5 @@
 		pos.x = w / 2;
 		pos.y = h - 1;
-		rc = gfx_puttext(font, &pos, &fmt, text);
+		rc = gfx_puttext(&pos, &fmt, text);
 		if (rc != EOK) {
 			printf("Error rendering text.\n");
@@ -689,9 +690,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	fmt.color = color;
 
 	pos.x = rect.p0.x;
 	pos.y = rect.p0.y;
-	rc = gfx_puttext(font, &pos, &fmt, "Top left");
+	rc = gfx_puttext(&pos, &fmt, "Top left");
 	if (rc != EOK) {
 		printf("Error rendering text.\n");
@@ -702,5 +704,5 @@
 	pos.y = rect.p0.y;
 	fmt.halign = gfx_halign_center;
-	rc = gfx_puttext(font, &pos, &fmt, "Top center");
+	rc = gfx_puttext(&pos, &fmt, "Top center");
 	if (rc != EOK)
 		goto error;
@@ -709,5 +711,5 @@
 	pos.y = rect.p0.y;
 	fmt.halign = gfx_halign_right;
-	rc = gfx_puttext(font, &pos, &fmt, "Top right");
+	rc = gfx_puttext(&pos, &fmt, "Top right");
 	if (rc != EOK)
 		goto error;
@@ -718,5 +720,5 @@
 	pos.y = (rect.p0.y + rect.p1.y - 1) / 2;
 	fmt.halign = gfx_halign_left;
-	rc = gfx_puttext(font, &pos, &fmt, "Center left");
+	rc = gfx_puttext(&pos, &fmt, "Center left");
 	if (rc != EOK)
 		goto error;
@@ -725,5 +727,5 @@
 	pos.y = (rect.p0.y + rect.p1.y - 1) / 2;
 	fmt.halign = gfx_halign_center;
-	rc = gfx_puttext(font, &pos, &fmt, "Center");
+	rc = gfx_puttext(&pos, &fmt, "Center");
 	if (rc != EOK)
 		goto error;
@@ -732,5 +734,5 @@
 	pos.y = (rect.p0.y + rect.p1.y - 1) / 2;
 	fmt.halign = gfx_halign_right;
-	rc = gfx_puttext(font, &pos, &fmt, "Center right");
+	rc = gfx_puttext(&pos, &fmt, "Center right");
 	if (rc != EOK)
 		goto error;
@@ -741,5 +743,5 @@
 	pos.y = rect.p1.y - 1;
 	fmt.halign = gfx_halign_left;
-	rc = gfx_puttext(font, &pos, &fmt, "Bottom left");
+	rc = gfx_puttext(&pos, &fmt, "Bottom left");
 	if (rc != EOK)
 		goto error;
@@ -748,5 +750,5 @@
 	pos.y = rect.p1.y;
 	fmt.halign = gfx_halign_center;
-	rc = gfx_puttext(font, &pos, &fmt, "Bottom center");
+	rc = gfx_puttext(&pos, &fmt, "Bottom center");
 	if (rc != EOK)
 		goto error;
@@ -755,5 +757,5 @@
 	pos.y = rect.p1.y;
 	fmt.halign = gfx_halign_right;
-	rc = gfx_puttext(font, &pos, &fmt, "Bottom right");
+	rc = gfx_puttext(&pos, &fmt, "Bottom right");
 	if (rc != EOK)
 		goto error;
@@ -762,4 +764,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 
 	for (i = 0; i < 8; i++) {
@@ -780,5 +783,5 @@
 		pos.x = w / 20;
 		pos.y = (6 + i) * h / 15;
-		rc = gfx_puttext(font, &pos, &fmt, "The quick brown fox jumps over the lazy dog.");
+		rc = gfx_puttext(&pos, &fmt, "The quick brown fox jumps over the lazy dog.");
 		if (rc != EOK)
 			goto error;
Index: uspace/app/nav/panel.c
===================================================================
--- uspace/app/nav/panel.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/app/nav/panel.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -175,4 +175,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	rows = panel_page_size(panel);
 
@@ -219,5 +220,5 @@
 		return rc;
 
-	rc = gfx_puttext(font, &pos, &fmt, entry->name);
+	rc = gfx_puttext(&pos, &fmt, entry->name);
 	if (rc != EOK) {
 		(void) gfx_set_clip_rect(gc, NULL);
@@ -236,5 +237,4 @@
 	gfx_context_t *gc = ui_window_get_gc(panel->window);
 	ui_resource_t *res = ui_window_get_res(panel->window);
-	gfx_text_fmt_t fmt;
 	panel_entry_t *entry;
 	ui_box_style_t bstyle;
@@ -242,6 +242,4 @@
 	int i, lines;
 	errno_t rc;
-
-	gfx_text_fmt_init(&fmt);
 
 	rc = gfx_set_color(gc, panel->color);
Index: uspace/lib/gfxfont/include/gfx/text.h
===================================================================
--- uspace/lib/gfxfont/include/gfx/text.h	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/gfxfont/include/gfx/text.h	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -45,14 +45,13 @@
 extern void gfx_text_fmt_init(gfx_text_fmt_t *);
 extern gfx_coord_t gfx_text_width(gfx_font_t *, const char *);
-extern errno_t gfx_puttext(gfx_font_t *, gfx_coord2_t *, gfx_text_fmt_t *,
-    const char *);
-extern void gfx_text_start_pos(gfx_font_t *, gfx_coord2_t *, gfx_text_fmt_t *,
-    const char *, gfx_coord2_t *);
-extern size_t gfx_text_find_pos(gfx_font_t *, gfx_coord2_t *, gfx_text_fmt_t *,
-    const char *, gfx_coord2_t *);
-extern void gfx_text_cont(gfx_font_t *, gfx_coord2_t *, gfx_text_fmt_t *,
-    const char *, gfx_coord2_t *, gfx_text_fmt_t *);
-extern void gfx_text_rect(gfx_font_t *, gfx_coord2_t *, gfx_text_fmt_t *,
-    const char *, gfx_rect_t *);
+extern errno_t gfx_puttext(gfx_coord2_t *, gfx_text_fmt_t *, const char *);
+extern void gfx_text_start_pos(gfx_coord2_t *, gfx_text_fmt_t *, const char *,
+    gfx_coord2_t *);
+extern size_t gfx_text_find_pos(gfx_coord2_t *, gfx_text_fmt_t *, const char *,
+    gfx_coord2_t *);
+extern void gfx_text_cont(gfx_coord2_t *, gfx_text_fmt_t *, const char *,
+    gfx_coord2_t *, gfx_text_fmt_t *);
+extern void gfx_text_rect(gfx_coord2_t *, gfx_text_fmt_t *, const char *,
+    gfx_rect_t *);
 
 #endif
Index: uspace/lib/gfxfont/include/types/gfx/text.h
===================================================================
--- uspace/lib/gfxfont/include/types/gfx/text.h	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/gfxfont/include/types/gfx/text.h	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -67,4 +67,6 @@
 /** Text formatting */
 typedef struct {
+	/** Text font */
+	struct gfx_font *font;
 	/** Text color */
 	gfx_color_t *color;
Index: uspace/lib/gfxfont/src/text.c
===================================================================
--- uspace/lib/gfxfont/src/text.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/gfxfont/src/text.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -168,5 +168,4 @@
 /** Get text starting position.
  *
- * @param font Font
  * @param pos Anchor position
  * @param fmt Text formatting
@@ -174,6 +173,6 @@
  * @param spos Place to store starting position
  */
-void gfx_text_start_pos(gfx_font_t *font, gfx_coord2_t *pos,
-    gfx_text_fmt_t *fmt, const char *str, gfx_coord2_t *spos)
+void gfx_text_start_pos(gfx_coord2_t *pos, gfx_text_fmt_t *fmt,
+    const char *str, gfx_coord2_t *spos)
 {
 	gfx_font_metrics_t fmetrics;
@@ -184,5 +183,5 @@
 	/* Adjust position for horizontal alignment */
 	if (fmt->halign != gfx_halign_left) {
-		width = gfx_text_width(font, str);
+		width = gfx_text_width(fmt->font, str);
 		switch (fmt->halign) {
 		case gfx_halign_center:
@@ -198,5 +197,5 @@
 
 	/* Adjust position for vertical alignment */
-	gfx_font_get_metrics(font, &fmetrics);
+	gfx_font_get_metrics(fmt->font, &fmetrics);
 
 	if (fmt->valign != gfx_valign_baseline) {
@@ -219,5 +218,4 @@
 /** Render text.
  *
- * @param font Font
  * @param pos Anchor position
  * @param fmt Text formatting
@@ -225,6 +223,5 @@
  * @return EOK on success or an error code
  */
-errno_t gfx_puttext(gfx_font_t *font, gfx_coord2_t *pos,
-    gfx_text_fmt_t *fmt, const char *str)
+errno_t gfx_puttext(gfx_coord2_t *pos, gfx_text_fmt_t *fmt, const char *str)
 {
 	gfx_glyph_metrics_t gmetrics;
@@ -238,11 +235,11 @@
 	errno_t rc;
 
-	gfx_text_start_pos(font, pos, fmt, str, &spos);
+	gfx_text_start_pos(pos, fmt, str, &spos);
 
 	/* Text mode */
-	if ((font->finfo->props.flags & gff_text_mode) != 0)
-		return gfx_puttext_textmode(font, &spos, fmt->color, str);
-
-	rc = gfx_set_color(font->typeface->gc, fmt->color);
+	if ((fmt->font->finfo->props.flags & gff_text_mode) != 0)
+		return gfx_puttext_textmode(fmt->font, &spos, fmt->color, str);
+
+	rc = gfx_set_color(fmt->font->typeface->gc, fmt->color);
 	if (rc != EOK)
 		return rc;
@@ -251,5 +248,5 @@
 	cp = str;
 	while (*cp != '\0') {
-		rc = gfx_font_search_glyph(font, cp, &glyph, &stradv);
+		rc = gfx_font_search_glyph(fmt->font, cp, &glyph, &stradv);
 		if (rc != EOK) {
 			++cp;
@@ -269,5 +266,5 @@
 	/* Text underlining */
 	if (fmt->underline) {
-		gfx_font_get_metrics(font, &fmetrics);
+		gfx_font_get_metrics(fmt->font, &fmetrics);
 
 		rect.p0.x = spos.x;
@@ -276,5 +273,5 @@
 		rect.p1.y = spos.y + fmetrics.underline_y1;
 
-		rc = gfx_fill_rect(font->typeface->gc, &rect);
+		rc = gfx_fill_rect(fmt->font->typeface->gc, &rect);
 		if (rc != EOK)
 			return rc;
@@ -286,5 +283,4 @@
 /** Find character position in string by X coordinate.
  *
- * @param font Font
  * @param pos Anchor position
  * @param fmt Text formatting
@@ -298,6 +294,6 @@
  *         offset of the following character.
  */
-size_t gfx_text_find_pos(gfx_font_t *font, gfx_coord2_t *pos,
-    gfx_text_fmt_t *fmt, const char *str, gfx_coord2_t *fpos)
+size_t gfx_text_find_pos(gfx_coord2_t *pos, gfx_text_fmt_t *fmt,
+    const char *str, gfx_coord2_t *fpos)
 {
 	gfx_glyph_metrics_t gmetrics;
@@ -310,8 +306,8 @@
 	errno_t rc;
 
-	gfx_text_start_pos(font, pos, fmt, str, &cpos);
+	gfx_text_start_pos(pos, fmt, str, &cpos);
 
 	/* Text mode */
-	if ((font->finfo->props.flags & gff_text_mode) != 0) {
+	if ((fmt->font->finfo->props.flags & gff_text_mode) != 0) {
 		off = 0;
 		strsize = str_size(str);
@@ -329,5 +325,5 @@
 	off = 0;
 	while (*cp != '\0') {
-		rc = gfx_font_search_glyph(font, cp, &glyph, &stradv);
+		rc = gfx_font_search_glyph(fmt->font, cp, &glyph, &stradv);
 		if (rc != EOK) {
 			++cp;
@@ -355,5 +351,4 @@
  * to the same objects, respectively.
  *
- * @param font Font
  * @param pos Anchor position
  * @param fmt Text formatting
@@ -362,7 +357,6 @@
  * @param cfmt Place to store format for continuation
  */
-void gfx_text_cont(gfx_font_t *font, gfx_coord2_t *pos,
-    gfx_text_fmt_t *fmt, const char *str, gfx_coord2_t *cpos,
-    gfx_text_fmt_t *cfmt)
+void gfx_text_cont(gfx_coord2_t *pos, gfx_text_fmt_t *fmt, const char *str,
+    gfx_coord2_t *cpos, gfx_text_fmt_t *cfmt)
 {
 	gfx_coord2_t spos;
@@ -370,6 +364,6 @@
 
 	/* Continuation should start where the current string ends */
-	gfx_text_start_pos(font, pos, fmt, str, &spos);
-	cpos->x = spos.x + gfx_text_width(font, str);
+	gfx_text_start_pos(pos, fmt, str, &spos);
+	cpos->x = spos.x + gfx_text_width(fmt->font, str);
 	cpos->y = spos.y;
 
@@ -387,5 +381,4 @@
 /** Get text bounding rectangle.
  *
- * @param font Font
  * @param pos Anchor position
  * @param fmt Text formatting
@@ -393,15 +386,15 @@
  * @param rect Place to store bounding rectangle
  */
-void gfx_text_rect(gfx_font_t *font, gfx_coord2_t *pos,
-    gfx_text_fmt_t *fmt, const char *str, gfx_rect_t *rect)
+void gfx_text_rect(gfx_coord2_t *pos, gfx_text_fmt_t *fmt, const char *str,
+    gfx_rect_t *rect)
 {
 	gfx_coord2_t spos;
 
-	gfx_text_start_pos(font, pos, fmt, str, &spos);
+	gfx_text_start_pos(pos, fmt, str, &spos);
 
 	rect->p0.x = spos.x;
-	rect->p0.y = spos.y - font->metrics.ascent;
-	rect->p1.x = spos.x + gfx_text_width(font, str);
-	rect->p1.y = spos.y + font->metrics.descent + 1;
+	rect->p0.y = spos.y - fmt->font->metrics.ascent;
+	rect->p1.x = spos.x + gfx_text_width(fmt->font, str);
+	rect->p1.y = spos.y +  fmt->font->metrics.descent + 1;
 }
 
Index: uspace/lib/gfxfont/test/text.c
===================================================================
--- uspace/lib/gfxfont/test/text.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/gfxfont/test/text.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -135,9 +135,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	fmt.color = color;
 	pos.x = 0;
 	pos.y = 0;
 
-	rc = gfx_puttext(font, &pos, &fmt, "Hello world!");
+	rc = gfx_puttext(&pos, &fmt, "Hello world!");
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -181,9 +182,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	fmt.color = color;
 	pos.x = 0;
 	pos.y = 0;
 
-	rc = gfx_puttext(font, &pos, &fmt, "Hello world!");
+	rc = gfx_puttext(&pos, &fmt, "Hello world!");
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -245,4 +247,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	anchor.x = 10;
 	anchor.y = 0;
@@ -250,35 +253,35 @@
 	fpos.x = 9;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(0, off);
 
 	fpos.x = 10;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(0, off);
 
 	fpos.x = 11;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(0, off);
 
 	fpos.x = 19;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(1, off);
 
 	fpos.x = 20;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(2, off);
 
 	fpos.x = 21;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(3, off);
 
 	fpos.x = 22;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Aii", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Aii", &fpos);
 	PCUT_ASSERT_INT_EQUALS(3, off);
 
@@ -318,33 +321,34 @@
 	anchor.y = 0;
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 
 	fpos.x = 9;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
 	PCUT_ASSERT_INT_EQUALS(0, off);
 
 	fpos.x = 10;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
 	PCUT_ASSERT_INT_EQUALS(0, off);
 
 	fpos.x = 11;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
 	PCUT_ASSERT_INT_EQUALS(1, off);
 
 	fpos.x = 12;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
 	PCUT_ASSERT_INT_EQUALS(2, off);
 
 	fpos.x = 13;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
 	PCUT_ASSERT_INT_EQUALS(3, off);
 
 	fpos.x = 14;
 	fpos.y = 0;
-	off = gfx_text_find_pos(font, &anchor, &fmt, "Abc", &fpos);
+	off = gfx_text_find_pos(&anchor, &fmt, "Abc", &fpos);
 	PCUT_ASSERT_INT_EQUALS(3, off);
 
@@ -385,7 +389,8 @@
 	anchor.y = 20;
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	fmt.color = color;
 
-	gfx_text_cont(font, &anchor, &fmt, "Abc", &cpos, &cfmt);
+	gfx_text_cont(&anchor, &fmt, "Abc", &cpos, &cfmt);
 
 	PCUT_ASSERT_INT_EQUALS(13, cpos.x);
@@ -431,7 +436,8 @@
 	anchor.y = 20;
 	gfx_text_fmt_init(&fmt);
+	fmt.font = font;
 	fmt.color = color;
 
-	gfx_text_rect(font, &anchor, &fmt, "Abc", &rect);
+	gfx_text_rect(&anchor, &fmt, "Abc", &rect);
 
 	PCUT_ASSERT_INT_EQUALS(10, rect.p0.x);
Index: uspace/lib/ui/src/checkbox.c
===================================================================
--- uspace/lib/ui/src/checkbox.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/checkbox.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -192,9 +192,10 @@
 
 		gfx_text_fmt_init(&fmt);
+		fmt.font = checkbox->res->font;
 		fmt.color = checkbox->res->entry_fg_color;
 		fmt.halign = gfx_halign_center;
 		fmt.valign = gfx_valign_center;
 
-		rc = gfx_puttext(checkbox->res->font, &box_center, &fmt, "X");
+		rc = gfx_puttext(&box_center, &fmt, "X");
 		if (rc != EOK)
 			goto error;
@@ -207,9 +208,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = checkbox->res->font;
 	fmt.color = checkbox->res->wnd_text_color;
 	fmt.halign = gfx_halign_left;
 	fmt.valign = gfx_valign_center;
 
-	rc = gfx_puttext(checkbox->res->font, &pos, &fmt, checkbox->caption);
+	rc = gfx_puttext(&pos, &fmt, checkbox->caption);
 	if (rc != EOK)
 		goto error;
@@ -244,4 +246,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = checkbox->res->font;
 	fmt.color = depressed ? checkbox->res->entry_act_bg_color :
 	    checkbox->res->wnd_text_color;
@@ -249,6 +252,5 @@
 	fmt.valign = gfx_valign_top;
 
-	rc = gfx_puttext(checkbox->res->font, &pos, &fmt,
-	    checkbox->checked ? "[X]" : "[ ]");
+	rc = gfx_puttext(&pos, &fmt, checkbox->checked ? "[X]" : "[ ]");
 	if (rc != EOK)
 		goto error;
@@ -259,5 +261,5 @@
 	fmt.color = checkbox->res->wnd_text_color;
 
-	rc = gfx_puttext(checkbox->res->font, &pos, &fmt, checkbox->caption);
+	rc = gfx_puttext(&pos, &fmt, checkbox->caption);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/entry.c
===================================================================
--- uspace/lib/ui/src/entry.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/entry.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -314,4 +314,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = res->font;
 	fmt.color = res->entry_fg_color;
 	fmt.halign = gfx_halign_left;
@@ -329,5 +330,5 @@
 	entry->text[off1] = '\0';
 
-	rc = gfx_puttext(res->font, &pos, &fmt, entry->text);
+	rc = gfx_puttext(&pos, &fmt, entry->text);
 	if (rc != EOK) {
 		(void) gfx_set_clip_rect(res->gc, NULL);
@@ -335,5 +336,5 @@
 	}
 
-	gfx_text_cont(res->font, &pos, &fmt, entry->text, &cpos, &cfmt);
+	gfx_text_cont(&pos, &fmt, entry->text, &cpos, &cfmt);
 	entry->text[off1] = c;
 
@@ -345,5 +346,5 @@
 		cfmt.color = res->entry_sel_text_fg_color;
 
-		gfx_text_rect(res->font, &cpos, &cfmt, entry->text + off1, &sel);
+		gfx_text_rect(&cpos, &cfmt, entry->text + off1, &sel);
 		sel.p0.x -= ui_entry_sel_hpad;
 		sel.p0.y -= ui_entry_sel_vpad;
@@ -359,5 +360,5 @@
 			goto error;
 
-		rc = gfx_puttext(res->font, &cpos, &cfmt, entry->text + off1);
+		rc = gfx_puttext(&cpos, &cfmt, entry->text + off1);
 		if (rc != EOK) {
 			(void) gfx_set_clip_rect(res->gc, NULL);
@@ -365,6 +366,5 @@
 		}
 
-		gfx_text_cont(res->font, &cpos, &cfmt, entry->text + off1,
-		    &cpos, &cfmt);
+		gfx_text_cont(&cpos, &cfmt, entry->text + off1, &cpos, &cfmt);
 
 		entry->text[off2] = c;
@@ -374,5 +374,5 @@
 	cfmt.color = res->entry_fg_color;
 
-	rc = gfx_puttext(res->font, &cpos, &cfmt, entry->text + off2);
+	rc = gfx_puttext(&cpos, &cfmt, entry->text + off2);
 	if (rc != EOK) {
 		(void) gfx_set_clip_rect(res->gc, NULL);
@@ -421,9 +421,9 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = res->font;
 	fmt.halign = gfx_halign_left;
 	fmt.valign = gfx_valign_top;
 
-	return gfx_text_find_pos(res->font, &geom.text_pos, &fmt,
-	    entry->text, fpos);
+	return gfx_text_find_pos(&geom.text_pos, &fmt, entry->text, fpos);
 }
 
@@ -1111,7 +1111,7 @@
 		anchor.y = 0;
 		gfx_text_fmt_init(&fmt);
+		fmt.font = res->font;
 		fmt.halign = entry->halign;
-		gfx_text_start_pos(res->font, &anchor, &fmt, entry->text,
-		    &tpos);
+		gfx_text_start_pos(&anchor, &fmt, entry->text, &tpos);
 		entry->scroll_pos = tpos.x - geom.text_rect.p0.x;
 	} else if (geom.text_pos.x + width < geom.text_rect.p1.x &&
Index: uspace/lib/ui/src/label.c
===================================================================
--- uspace/lib/ui/src/label.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/label.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -215,9 +215,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = label->res->font;
 	fmt.color = label->res->wnd_text_color;
 	fmt.halign = label->halign;
 	fmt.valign = label->valign;
 
-	rc = gfx_puttext(label->res->font, &pos, &fmt, label->text);
+	rc = gfx_puttext(&pos, &fmt, label->text);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/menubar.c
===================================================================
--- uspace/lib/ui/src/menubar.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/menubar.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -185,4 +185,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = res->font;
 	fmt.halign = gfx_halign_left;
 	fmt.valign = gfx_valign_top;
@@ -215,5 +216,5 @@
 			goto error;
 
-		rc = gfx_puttext(res->font, &tpos, &fmt, caption);
+		rc = gfx_puttext(&tpos, &fmt, caption);
 		if (rc != EOK)
 			goto error;
Index: uspace/lib/ui/src/menuentry.c
===================================================================
--- uspace/lib/ui/src/menuentry.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/menuentry.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -351,4 +351,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = res->font;
 	fmt.halign = gfx_halign_left;
 	fmt.valign = gfx_valign_top;
@@ -371,5 +372,5 @@
 		goto error;
 
-	rc = gfx_puttext(res->font, &geom.caption_pos, &fmt, mentry->caption);
+	rc = gfx_puttext(&geom.caption_pos, &fmt, mentry->caption);
 	if (rc != EOK)
 		goto error;
@@ -377,5 +378,5 @@
 	fmt.halign = gfx_halign_right;
 
-	rc = gfx_puttext(res->font, &geom.shortcut_pos, &fmt, mentry->shortcut);
+	rc = gfx_puttext(&geom.shortcut_pos, &fmt, mentry->shortcut);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/paint.c
===================================================================
--- uspace/lib/ui/src/paint.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/paint.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -402,4 +402,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = resource->font;
 	fmt.color = color;
 
@@ -427,5 +428,5 @@
 
 	pos = rect->p0;
-	rc = gfx_puttext(resource->font, &pos, &fmt, str);
+	rc = gfx_puttext(&pos, &fmt, str);
 	if (rc != EOK)
 		goto error;
@@ -436,12 +437,10 @@
 
 		pos.x = rect->p0.x;
-		rc = gfx_puttext(resource->font, &pos, &fmt,
-		    boxc->c[1][0]);
+		rc = gfx_puttext(&pos, &fmt, boxc->c[1][0]);
 		if (rc != EOK)
 			goto error;
 
 		pos.x = rect->p1.x - 1;
-		rc = gfx_puttext(resource->font, &pos, &fmt,
-		    boxc->c[1][2]);
+		rc = gfx_puttext(&pos, &fmt, boxc->c[1][2]);
 		if (rc != EOK)
 			goto error;
@@ -464,5 +463,5 @@
 	pos.x = rect->p0.x;
 	pos.y = rect->p1.y - 1;
-	rc = gfx_puttext(resource->font, &pos, &fmt, str);
+	rc = gfx_puttext(&pos, &fmt, str);
 	if (rc != EOK)
 		goto error;
@@ -519,4 +518,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = resource->font;
 	fmt.color = color;
 
@@ -542,5 +542,5 @@
 
 	pos = rect->p0;
-	rc = gfx_puttext(resource->font, &pos, &fmt, str);
+	rc = gfx_puttext(&pos, &fmt, str);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/pbutton.c
===================================================================
--- uspace/lib/ui/src/pbutton.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/pbutton.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -307,9 +307,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = pbutton->res->font;
 	fmt.color = pbutton->res->btn_text_color;
 	fmt.halign = gfx_halign_center;
 	fmt.valign = gfx_valign_center;
 
-	rc = gfx_puttext(pbutton->res->font, &pos, &fmt, pbutton->caption);
+	rc = gfx_puttext(&pos, &fmt, pbutton->caption);
 	if (rc != EOK)
 		goto error;
@@ -379,9 +380,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = pbutton->res->font;
 	fmt.color = pbutton->res->btn_text_color;
 	fmt.halign = gfx_halign_center;
 	fmt.valign = gfx_valign_center;
 
-	rc = gfx_puttext(pbutton->res->font, &pos, &fmt, pbutton->caption);
+	rc = gfx_puttext(&pos, &fmt, pbutton->caption);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/rbutton.c
===================================================================
--- uspace/lib/ui/src/rbutton.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/rbutton.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -278,10 +278,10 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = rbutton->group->res->font;
 	fmt.color = rbutton->group->res->wnd_text_color;
 	fmt.halign = gfx_halign_left;
 	fmt.valign = gfx_valign_center;
 
-	rc = gfx_puttext(rbutton->group->res->font, &pos, &fmt,
-	    rbutton->caption);
+	rc = gfx_puttext(&pos, &fmt, rbutton->caption);
 	if (rc != EOK)
 		goto error;
@@ -316,4 +316,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = rbutton->group->res->font;
 	fmt.color = depressed ? rbutton->group->res->entry_act_bg_color :
 	    rbutton->group->res->wnd_text_color;
@@ -321,6 +322,6 @@
 	fmt.valign = gfx_valign_top;
 
-	rc = gfx_puttext(rbutton->group->res->font, &pos, &fmt,
-	    rbutton->group->selected == rbutton ? "(\u2022)" : "( )");
+	rc = gfx_puttext(&pos, &fmt, rbutton->group->selected == rbutton ?
+	    "(\u2022)" : "( )");
 	if (rc != EOK)
 		goto error;
@@ -332,6 +333,5 @@
 	fmt.color = rbutton->group->res->wnd_text_color;
 
-	rc = gfx_puttext(rbutton->group->res->font, &pos, &fmt,
-	    rbutton->caption);
+	rc = gfx_puttext(&pos, &fmt, rbutton->caption);
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/slider.c
===================================================================
--- uspace/lib/ui/src/slider.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/slider.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -341,4 +341,5 @@
 
 	gfx_text_fmt_init(&fmt);
+	fmt.font = slider->res->font;
 	fmt.color = slider->res->wnd_text_color;
 	fmt.halign = gfx_halign_left;
@@ -357,5 +358,5 @@
 	buf[w * gcharsz] = '\0';
 
-	rc = gfx_puttext(slider->res->font, &pos, &fmt, buf);
+	rc = gfx_puttext(&pos, &fmt, buf);
 	free(buf);
 	if (rc != EOK)
@@ -366,6 +367,5 @@
 	pos.x += slider->pos;
 
-	rc = gfx_puttext(slider->res->font, &pos, &fmt,
-	    "[O]");
+	rc = gfx_puttext(&pos, &fmt, "[O]");
 	if (rc != EOK)
 		goto error;
Index: uspace/lib/ui/src/wdecor.c
===================================================================
--- uspace/lib/ui/src/wdecor.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/ui/src/wdecor.c	(revision 458301502f6afa8083247442aa9832ffb402f9f9)
@@ -242,4 +242,5 @@
 
 		gfx_text_fmt_init(&fmt);
+		fmt.font = wdecor->res->font;
 		fmt.color = wdecor->active ?
 		    wdecor->res->tbar_act_text_color :
@@ -253,6 +254,5 @@
 		if (wdecor->res->textmode) {
 			/* Make space around caption text */
-			gfx_text_rect(wdecor->res->font, &pos, &fmt,
-			    wdecor->caption, &text_rect);
+			gfx_text_rect(&pos, &fmt, wdecor->caption, &text_rect);
 
 			/* Only make space if caption is non-empty */
@@ -273,5 +273,5 @@
 		}
 
-		rc = gfx_puttext(wdecor->res->font, &pos, &fmt, wdecor->caption);
+		rc = gfx_puttext(&pos, &fmt, wdecor->caption);
 		if (rc != EOK)
 			return rc;
