Index: uspace/lib/gfxfont/include/gfx/font.h
===================================================================
--- uspace/lib/gfxfont/include/gfx/font.h	(revision 38a4b6d4f3574501c671c319810b1eab274a388b)
+++ uspace/lib/gfxfont/include/gfx/font.h	(revision d8846725cd651519da2edb3b2d9d777f6b999cdf)
@@ -56,4 +56,6 @@
 extern gfx_glyph_t *gfx_font_first_glyph(gfx_font_t *);
 extern gfx_glyph_t *gfx_font_next_glyph(gfx_glyph_t *);
+extern gfx_glyph_t *gfx_font_last_glyph(gfx_font_t *);
+extern gfx_glyph_t *gfx_font_prev_glyph(gfx_glyph_t *);
 extern errno_t gfx_font_search_glyph(gfx_font_t *, const char *, gfx_glyph_t **,
     size_t *);
Index: uspace/lib/gfxfont/src/font.c
===================================================================
--- uspace/lib/gfxfont/src/font.c	(revision 38a4b6d4f3574501c671c319810b1eab274a388b)
+++ uspace/lib/gfxfont/src/font.c	(revision d8846725cd651519da2edb3b2d9d777f6b999cdf)
@@ -274,4 +274,36 @@
 }
 
+/** Get last glyph in font.
+ *
+ * @param font Font
+ * @return Last glyph or @c NULL if there are none
+ */
+gfx_glyph_t *gfx_font_last_glyph(gfx_font_t *font)
+{
+	link_t *link;
+
+	link = list_last(&font->glyphs);
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, gfx_glyph_t, lglyphs);
+}
+
+/** Get previous glyph in font.
+ *
+ * @param cur Current glyph
+ * @return Previous glyph in font or @c NULL if @a cur was the last one
+ */
+gfx_glyph_t *gfx_font_prev_glyph(gfx_glyph_t *cur)
+{
+	link_t *link;
+
+	link = list_prev(&cur->lglyphs, &cur->font->glyphs);
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, gfx_glyph_t, lglyphs);
+}
+
 /** Search for glyph that should be set for the beginning of a string.
  *
Index: uspace/lib/gfxfont/src/glyph.c
===================================================================
--- uspace/lib/gfxfont/src/glyph.c	(revision 38a4b6d4f3574501c671c319810b1eab274a388b)
+++ uspace/lib/gfxfont/src/glyph.c	(revision d8846725cd651519da2edb3b2d9d777f6b999cdf)
@@ -38,4 +38,5 @@
 #include <errno.h>
 #include <gfx/bitmap.h>
+#include <gfx/font.h>
 #include <gfx/glyph.h>
 #include <io/pixelmap.h>
@@ -73,4 +74,5 @@
 {
 	gfx_glyph_t *glyph;
+	gfx_glyph_t *last;
 	errno_t rc;
 
@@ -88,7 +90,22 @@
 	}
 
+	last = gfx_font_last_glyph(font);
+
 	glyph->metrics = *metrics;
 	list_append(&glyph->lglyphs, &glyph->font->glyphs);
 	list_initialize(&glyph->patterns);
+
+	if (last != NULL)
+		glyph->rect.p0.x = last->rect.p1.x;
+	else
+		glyph->rect.p0.x = 0;
+
+	glyph->rect.p0.y = 0;
+	glyph->rect.p1.x = glyph->rect.p0.x;
+	glyph->rect.p1.y = glyph->rect.p1.y;
+
+	glyph->origin.x = glyph->rect.p0.x;
+	glyph->origin.y = glyph->rect.p0.y;
+
 	*rglyph = glyph;
 	return EOK;
Index: uspace/lib/gfxfont/test/font.c
===================================================================
--- uspace/lib/gfxfont/test/font.c	(revision 38a4b6d4f3574501c671c319810b1eab274a388b)
+++ uspace/lib/gfxfont/test/font.c	(revision d8846725cd651519da2edb3b2d9d777f6b999cdf)
@@ -287,4 +287,106 @@
 }
 
+/** Test gfx_font_last_glyph() */
+PCUT_TEST(last_glyph)
+{
+	gfx_font_props_t props;
+	gfx_font_metrics_t metrics;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_typeface_t *tface;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	gfx_glyph_t *glyph;
+	gfx_glyph_t *glast;
+	test_gc_t tgc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, (void *)&tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics);
+
+	rc = gfx_typeface_create(gc, &tface);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_props_init(&props);
+	gfx_font_metrics_init(&metrics);
+	rc = gfx_font_create(tface, &props, &metrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* Should get NULL since there is no glyph in the font */
+	glyph = gfx_font_last_glyph(font);
+	PCUT_ASSERT_NULL(glyph);
+
+	/* Now add one */
+	gfx_glyph_metrics_init(&gmetrics);
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* gfx_font_last_glyph() should return the same */
+	glast = gfx_font_last_glyph(font);
+	PCUT_ASSERT_EQUALS(glyph, glast);
+
+	gfx_glyph_destroy(glyph);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_font_prev_glyph() */
+PCUT_TEST(prev_glyph)
+{
+	gfx_font_props_t props;
+	gfx_font_metrics_t metrics;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_typeface_t *tface;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	gfx_glyph_t *glyph1;
+	gfx_glyph_t *glyph2;
+	gfx_glyph_t *gfirst;
+	gfx_glyph_t *gsecond;
+	test_gc_t tgc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, (void *)&tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics);
+
+	rc = gfx_typeface_create(gc, &tface);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_props_init(&props);
+	gfx_font_metrics_init(&metrics);
+	rc = gfx_font_create(tface, &props, &metrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* Add first glyph */
+	gfx_glyph_metrics_init(&gmetrics);
+	rc = gfx_glyph_create(font, &gmetrics, &glyph1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* Add second glyph */
+	gfx_glyph_metrics_init(&gmetrics);
+	rc = gfx_glyph_create(font, &gmetrics, &glyph2);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	/* gfx_font_last_glyph() should return glyph2 */
+	gsecond = gfx_font_last_glyph(font);
+	PCUT_ASSERT_EQUALS(glyph2, gsecond);
+
+	/* gfx_font_prev_glyph() should return glyph1 */
+	gfirst = gfx_font_prev_glyph(gsecond);
+	PCUT_ASSERT_EQUALS(glyph1, gfirst);
+
+	gfx_glyph_destroy(glyph1);
+	gfx_glyph_destroy(glyph2);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
 /** Test gfx_font_search_glyph() */
 PCUT_TEST(search_glyph)
