Index: uspace/lib/gfxfont/private/font.h
===================================================================
--- uspace/lib/gfxfont/private/font.h	(revision a57c70c02b983d06f045f7ca96065e0be8a9c3bd)
+++ uspace/lib/gfxfont/private/font.h	(revision 313ac8e5226a24618b305138fc1a126ba71dc2e7)
@@ -84,5 +84,5 @@
 
 extern errno_t gfx_font_splice_at_glyph(gfx_font_t *, gfx_glyph_t *,
-    gfx_coord_t, gfx_coord_t);
+    gfx_rect_t *);
 
 #endif
Index: uspace/lib/gfxfont/src/font.c
===================================================================
--- uspace/lib/gfxfont/src/font.c	(revision a57c70c02b983d06f045f7ca96065e0be8a9c3bd)
+++ uspace/lib/gfxfont/src/font.c	(revision 313ac8e5226a24618b305138fc1a126ba71dc2e7)
@@ -271,14 +271,13 @@
  *
  * This is used to resize a glyph in the font bitmap. This changes
- * the bitmap widht and might also make the bitmap taller.
- * Width and height of the glyph is also adjusted accordingly.
+ * the bitmap widht might also make the bitmap taller.
+ * Dimensions of the glyph are also adjusted according to @a nrect.
  *
  * @param font Font
  * @param glyph Glyph to replace
- * @param width Width of replacement space
- * @param height Height of replacement space
+ * @param nrect Replacement rectangle
  */
 errno_t gfx_font_splice_at_glyph(gfx_font_t *font, gfx_glyph_t *glyph,
-    gfx_coord_t width, gfx_coord_t height)
+    gfx_rect_t *nrect)
 {
 	gfx_glyph_t *g;
@@ -286,8 +285,10 @@
 	gfx_bitmap_params_t params;
 	gfx_coord_t dwidth;
+	gfx_coord_t x0;
 	errno_t rc;
 
 	/* Change of width of glyph */
-	dwidth = width - (glyph->rect.p1.x - glyph->rect.p0.x);
+	dwidth = (nrect->p1.x - nrect->p0.x) -
+	    (glyph->rect.p1.x - glyph->rect.p0.x);
 
 	/* Create new font bitmap, wider by dwidth pixels */
@@ -295,10 +296,17 @@
 	params.rect = font->rect;
 	params.rect.p1.x += dwidth;
-	if (height > params.rect.p1.y)
-		params.rect.p1.y = height;
+	if (nrect->p1.y - nrect->p0.y > params.rect.p1.y)
+		params.rect.p1.y = nrect->p1.y - nrect->p0.y;
 
 	rc = gfx_bitmap_create(font->typeface->gc, &params, NULL, &nbitmap);
 	if (rc != EOK)
 		goto error;
+
+	/*
+	 * In x0 we compute the left margin of @a glyph. We start with
+	 * zero and then, if there are any preceding glyphs, we set it
+	 * to the right margin of the last one.
+	 */
+	x0 = 0;
 
 	/* Transfer glyphs before @a glyph */
@@ -310,4 +318,7 @@
 		if (rc != EOK)
 			goto error;
+
+		/* Left margin of the next glyph */
+		x0 = g->rect.p1.x;
 
 		g = gfx_font_next_glyph(g);
@@ -331,7 +342,8 @@
 	}
 
-	/* Update glyph width and height */
-	glyph->rect.p1.x = glyph->rect.p0.x + width;
-	glyph->rect.p1.y = glyph->rect.p0.y + height;
+	/* Place glyph rectangle inside the newly created space */
+	glyph->origin.x = x0 - nrect->p0.x;
+	glyph->origin.y = 0 - nrect->p0.y;
+	gfx_rect_translate(&glyph->origin, nrect, &glyph->rect);
 
 	/* Update font bitmap */
Index: uspace/lib/gfxfont/src/glyph_bmp.c
===================================================================
--- uspace/lib/gfxfont/src/glyph_bmp.c	(revision a57c70c02b983d06f045f7ca96065e0be8a9c3bd)
+++ uspace/lib/gfxfont/src/glyph_bmp.c	(revision 313ac8e5226a24618b305138fc1a126ba71dc2e7)
@@ -66,10 +66,9 @@
 		return ENOMEM;
 
-	bmp->rect.p0.x = 0;
-	bmp->rect.p0.y = 0;
-	bmp->rect.p1.x = glyph->rect.p1.x - glyph->rect.p0.x;
-	bmp->rect.p1.y = glyph->rect.p1.y - glyph->rect.p0.y;
-
-	bmp->pixels = calloc(bmp->rect.p1.x * bmp->rect.p1.y, sizeof(int));
+	/* Bitmap coordinates are relative to glyph origin point */
+	gfx_rect_rtranslate(&glyph->origin, &glyph->rect, &bmp->rect);
+
+	bmp->pixels = calloc((bmp->rect.p1.x - bmp->rect.p0.x) *
+	    (bmp->rect.p1.y - bmp->rect.p0.y), sizeof(int));
 	if (bmp->pixels == NULL) {
 		free(bmp);
@@ -92,10 +91,11 @@
 	/* Copy pixels from font bitmap */
 
-	for (y = 0; y < bmp->rect.p1.y; y++) {
-		for (x = 0; x < bmp->rect.p1.x; x++) {
-			pixel = pixelmap_get_pixel(&pmap, glyph->rect.p0.x + x,
-			    glyph->rect.p0.y + y);
-			bmp->pixels[y * bmp->rect.p1.x + x] =
-			    (pixel != 0) ? 1 : 0;
+	for (y = bmp->rect.p0.y; y < bmp->rect.p1.y; y++) {
+		for (x = bmp->rect.p0.x; x < bmp->rect.p1.x; x++) {
+			pixel = pixelmap_get_pixel(&pmap, glyph->origin.x + x,
+			    glyph->origin.y + y);
+			bmp->pixels[(y - bmp->rect.p0.y) *
+			    (bmp->rect.p1.x - bmp->rect.p0.x) +
+			    (x - bmp->rect.p0.x)] = (pixel != 0) ? 1 : 0;
 		}
 	}
@@ -126,6 +126,5 @@
 	 * is adjusted.
 	 */
-	rc = gfx_font_splice_at_glyph(font, glyph,
-	    bmp->rect.p1.x - bmp->rect.p0.x, bmp->rect.p1.y - bmp->rect.p0.y);
+	rc = gfx_font_splice_at_glyph(font, glyph, &bmp->rect);
 	if (rc != EOK)
 		return rc;
@@ -143,10 +142,12 @@
 	/* Copy pixels to font bitmap */
 
-	for (y = 0; y < bmp->rect.p1.y; y++) {
-		for (x = 0; x < bmp->rect.p1.x; x++) {
-			pixel = bmp->pixels[y * bmp->rect.p1.x + x] ?
+	for (y = bmp->rect.p0.y; y < bmp->rect.p1.y; y++) {
+		for (x = bmp->rect.p0.x; x < bmp->rect.p1.x; x++) {
+			pixel = bmp->pixels[(y - bmp->rect.p0.y) *
+			    (bmp->rect.p1.x - bmp->rect.p0.x) +
+			    (x - bmp->rect.p0.x)] ?
 			    PIXEL(255, 255, 255, 255) : PIXEL(0, 0, 0, 0);
-			pixelmap_put_pixel(&pmap, glyph->rect.p0.x + x,
-			    glyph->rect.p0.y + y, pixel);
+			pixelmap_put_pixel(&pmap, glyph->origin.x + x,
+			    glyph->origin.y + y, pixel);
 		}
 	}
@@ -193,4 +194,5 @@
 
 	pitch = bmp->rect.p1.x - bmp->rect.p0.x;
+
 	return bmp->pixels[(y - bmp->rect.p0.y) * pitch +
 	    (x - bmp->rect.p0.x)];
@@ -214,4 +216,5 @@
 	pos.x = x;
 	pos.y = y;
+
 	if (!gfx_pix_inside_rect(&pos, &bmp->rect)) {
 		rc = gfx_glyph_bmp_extend(bmp, &pos);
Index: uspace/lib/gfxfont/test/font.c
===================================================================
--- uspace/lib/gfxfont/test/font.c	(revision a57c70c02b983d06f045f7ca96065e0be8a9c3bd)
+++ uspace/lib/gfxfont/test/font.c	(revision 313ac8e5226a24618b305138fc1a126ba71dc2e7)
@@ -332,4 +332,5 @@
 	gfx_glyph_t *glyph;
 	gfx_context_t *gc;
+	gfx_rect_t nrect;
 	test_gc_t tgc;
 	errno_t rc;
@@ -350,5 +351,9 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
-	rc = gfx_font_splice_at_glyph(font, glyph, 10, 10);
+	nrect.p0.x = -5;
+	nrect.p0.y = -5;
+	nrect.p1.x = 5;
+	nrect.p1.y = 5;
+	rc = gfx_font_splice_at_glyph(font, glyph, &nrect);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
Index: uspace/lib/gfxfont/test/glyph_bmp.c
===================================================================
--- uspace/lib/gfxfont/test/glyph_bmp.c	(revision a57c70c02b983d06f045f7ca96065e0be8a9c3bd)
+++ uspace/lib/gfxfont/test/glyph_bmp.c	(revision 313ac8e5226a24618b305138fc1a126ba71dc2e7)
@@ -185,5 +185,38 @@
 	PCUT_ASSERT_INT_EQUALS(0, pix);
 
-	gfx_glyph_bmp_close(bmp);
+	/* ... */
+
+	rc = gfx_glyph_bmp_setpix(bmp, 1, -1, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_glyph_bmp_save(bmp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_bmp_close(bmp);
+
+	/* Once again */
+
+	rc = gfx_glyph_bmp_open(glyph, &bmp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(bmp);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 0, 0);
+	PCUT_ASSERT_INT_EQUALS(1, pix);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 1, 1);
+	PCUT_ASSERT_INT_EQUALS(1, pix);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 1, 0);
+	PCUT_ASSERT_INT_EQUALS(0, pix);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 0, 1);
+	PCUT_ASSERT_INT_EQUALS(0, pix);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 1, -1);
+	PCUT_ASSERT_INT_EQUALS(1, pix);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 0, -1);
+	PCUT_ASSERT_INT_EQUALS(0, pix);
+
 	gfx_glyph_destroy(glyph);
 
