Index: uspace/lib/gfxfont/src/text.c
===================================================================
--- uspace/lib/gfxfont/src/text.c	(revision 5c27e77a873b434a25145576e18fe857dc490921)
+++ uspace/lib/gfxfont/src/text.c	(revision c38ab6cd2a0a1e00ae1a0c294a7f8f7389d4d2eb)
@@ -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;
 }
 
