Index: uspace/lib/gfxfont/src/text.c
===================================================================
--- uspace/lib/gfxfont/src/text.c	(revision 901b302e49c28f53b3b6002b374091c08eb75984)
+++ uspace/lib/gfxfont/src/text.c	(revision f2d4a46fb4506a376cf7cd0f623121df842b5348)
@@ -97,24 +97,39 @@
 /** Print string using text characters in text mode.
  *
- * @param font Font
  * @param pos Position of top-left corner of text
- * @param color Text color
+ * @param fmt Formatting
  * @param str String
  * @return EOK on success or an error code
  */
-static errno_t gfx_puttext_textmode(gfx_font_t *font, gfx_coord2_t *pos,
-    gfx_color_t *color, const char *str)
-{
-	gfx_context_t *gc = font->typeface->gc;
+static errno_t gfx_puttext_textmode(gfx_coord2_t *pos, gfx_text_fmt_t *fmt,
+    const char *str)
+{
+	gfx_context_t *gc = fmt->font->typeface->gc;
 	gfx_bitmap_params_t params;
 	gfx_bitmap_t *bitmap;
 	gfx_bitmap_alloc_t alloc;
+	gfx_coord_t width;
 	uint8_t attr;
 	pixelmap_t pmap;
 	gfx_coord_t x;
+	gfx_coord_t rmargin;
 	pixel_t pixel;
 	char32_t c;
 	size_t off;
+	bool ellipsis;
 	errno_t rc;
+
+	width = str_width(str);
+	if (fmt->abbreviate && width > fmt->width) {
+		ellipsis = true;
+		width = fmt->width;
+		if (width > 3)
+			rmargin = width - 3;
+		else
+			rmargin = width;
+	} else {
+		ellipsis = false;
+		rmargin = width;
+	}
 
 	/*
@@ -123,10 +138,10 @@
 	 */
 
-	gfx_color_get_ega(color, &attr);
+	gfx_color_get_ega(fmt->color, &attr);
 
 	gfx_bitmap_params_init(&params);
 	params.rect.p0.x = 0;
 	params.rect.p0.y = 0;
-	params.rect.p1.x = str_width(str);
+	params.rect.p1.x = width;
 	params.rect.p1.y = 1;
 
@@ -151,5 +166,5 @@
 
 	off = 0;
-	for (x = 0; x < params.rect.p1.x; x++) {
+	for (x = 0; x < rmargin; x++) {
 		c = str_decode(str, &off, STR_NO_LIMIT);
 		pixel = PIXEL(attr,
@@ -158,4 +173,15 @@
 		    c & 0xff);
 		pixelmap_put_pixel(&pmap, x, 0, pixel);
+	}
+
+	if (ellipsis) {
+		for (x = rmargin; x < params.rect.p1.x; x++) {
+			c = '.';
+			pixel = PIXEL(attr,
+			    (c >> 16) & 0xff,
+			    (c >> 8) & 0xff,
+			    c & 0xff);
+			pixelmap_put_pixel(&pmap, x, 0, pixel);
+		}
 	}
 
@@ -246,5 +272,5 @@
 	/* Text mode */
 	if ((fmt->font->finfo->props.flags & gff_text_mode) != 0)
-		return gfx_puttext_textmode(fmt->font, &spos, fmt->color, str);
+		return gfx_puttext_textmode(&spos, fmt, str);
 
 	rc = gfx_set_color(fmt->font->typeface->gc, fmt->color);
