Index: uspace/lib/gfxfont/include/gfx/glyph.h
===================================================================
--- uspace/lib/gfxfont/include/gfx/glyph.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/include/gfx/glyph.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -40,5 +40,6 @@
 #include <types/gfx/font.h>
 #include <types/gfx/glyph.h>
-#include <types/gfx/glyph_bmp.h>
+#include <stdbool.h>
+#include <stddef.h>
 
 extern void gfx_glyph_metrics_init(gfx_glyph_metrics_t *);
@@ -50,5 +51,8 @@
 extern errno_t gfx_glyph_set_pattern(gfx_glyph_t *, const char *);
 extern void gfx_glyph_clear_pattern(gfx_glyph_t *, const char *);
-extern errno_t gfx_glyph_open_bmp(gfx_glyph_t *, gfx_glyph_bmp_t **);
+extern bool gfx_glyph_matches(gfx_glyph_t *, const char *, size_t *);
+extern gfx_glyph_pattern_t *gfx_glyph_first_pattern(gfx_glyph_t *);
+extern gfx_glyph_pattern_t *gfx_glyph_next_pattern(gfx_glyph_pattern_t *);
+extern const char *gfx_glyph_pattern_str(gfx_glyph_pattern_t *);
 
 #endif
Index: uspace/lib/gfxfont/include/gfx/glyph_bmp.h
===================================================================
--- uspace/lib/gfxfont/include/gfx/glyph_bmp.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/include/gfx/glyph_bmp.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -39,6 +39,8 @@
 #include <errno.h>
 #include <gfx/coord.h>
+#include <types/gfx/glyph.h>
 #include <types/gfx/glyph_bmp.h>
 
+extern errno_t gfx_glyph_bmp_open(gfx_glyph_t *, gfx_glyph_bmp_t **);
 extern errno_t gfx_glyph_bmp_save(gfx_glyph_bmp_t *);
 extern void gfx_glyph_bmp_close(gfx_glyph_bmp_t *);
Index: uspace/lib/gfxfont/include/types/gfx/font.h
===================================================================
--- uspace/lib/gfxfont/include/types/gfx/font.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/include/types/gfx/font.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -45,5 +45,5 @@
 typedef struct {
 	/** Ascent */
-	gfx_coord_t acent;
+	gfx_coord_t ascent;
 	/** Descent */
 	gfx_coord_t descent;
Index: uspace/lib/gfxfont/include/types/gfx/glyph.h
===================================================================
--- uspace/lib/gfxfont/include/types/gfx/glyph.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/include/types/gfx/glyph.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -42,4 +42,7 @@
 typedef struct gfx_glyph gfx_glyph_t;
 
+struct gfx_glyph_pattern;
+typedef struct gfx_glyph_pattern gfx_glyph_pattern_t;
+
 /** Glyph metrics */
 typedef struct {
Index: uspace/lib/gfxfont/private/font.h
===================================================================
--- uspace/lib/gfxfont/private/font.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/private/font.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -38,4 +38,5 @@
 #define _GFX_PRIVATE_FONT_H
 
+#include <adt/list.h>
 #include <types/gfx/context.h>
 #include <types/gfx/font.h>
@@ -50,4 +51,6 @@
 	/** Font metrics */
 	gfx_font_metrics_t metrics;
+	/** Glyphs */
+	list_t glyphs;
 };
 
Index: uspace/lib/gfxfont/private/glyph.h
===================================================================
--- uspace/lib/gfxfont/private/glyph.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/private/glyph.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -49,7 +49,22 @@
 	struct gfx_font *font;
 	/** Link to list of glyphs in the font */
-	list_t lglyphs;
+	link_t lglyphs;
 	/** Glyph metrics */
 	gfx_glyph_metrics_t metrics;
+	/** Text patterns (of gfx_glyph_pattern_t) */
+	list_t patterns;
+};
+
+/** Glyph pattern.
+ *
+ * Glyph is set if pattern is found in text.
+ */
+struct gfx_glyph_pattern {
+	/** Containing glyph */
+	struct gfx_glyph *glyph;
+	/** Link to gfx_glyph.patterns */
+	link_t lpatterns;
+	/** Pattern text */
+	char *text;
 };
 
Index: uspace/lib/gfxfont/private/glyph_bmp.h
===================================================================
--- uspace/lib/gfxfont/private/glyph_bmp.h	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/private/glyph_bmp.h	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -38,4 +38,6 @@
 #define _GFX_PRIVATE_GLYPH_BMP_H
 
+#include <gfx/coord.h>
+
 /** Glyph bitmap
  *
@@ -49,4 +51,8 @@
 	/** Containing glyph */
 	struct gfx_glyph *glyph;
+	/** Rectangle covered by bitmap */
+	gfx_rect_t rect;
+	/** Pixel array */
+	int *pixels;
 };
 
Index: uspace/lib/gfxfont/src/font.c
===================================================================
--- uspace/lib/gfxfont/src/font.c	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/src/font.c	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -34,10 +34,13 @@
  */
 
+#include <adt/list.h>
 #include <assert.h>
 #include <errno.h>
 #include <gfx/font.h>
+#include <gfx/glyph.h>
 #include <mem.h>
 #include <stdlib.h>
 #include "../private/font.h"
+#include "../private/glyph.h"
 
 /** Initialize font metrics structure.
@@ -83,4 +86,5 @@
 
 	font->metrics = *metrics;
+	list_initialize(&font->glyphs);
 	*rfont = font;
 	return EOK;
@@ -93,4 +97,12 @@
 void gfx_font_destroy(gfx_font_t *font)
 {
+	gfx_glyph_t *glyph;
+
+	glyph = gfx_font_first_glyph(font);
+	while (glyph != NULL) {
+		gfx_glyph_destroy(glyph);
+		glyph = gfx_font_first_glyph(font);
+	}
+
 	free(font);
 }
@@ -125,5 +137,11 @@
 gfx_glyph_t *gfx_font_first_glyph(gfx_font_t *font)
 {
-	return NULL;
+	link_t *link;
+
+	link = list_first(&font->glyphs);
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, gfx_glyph_t, lglyphs);
 }
 
@@ -135,5 +153,11 @@
 gfx_glyph_t *gfx_font_next_glyph(gfx_glyph_t *cur)
 {
-	return NULL;
+	link_t *link;
+
+	link = list_next(&cur->lglyphs, &cur->font->glyphs);
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, gfx_glyph_t, lglyphs);
 }
 
@@ -149,5 +173,19 @@
     gfx_glyph_t **rglyph, size_t *rsize)
 {
-	return EOK;
+	gfx_glyph_t *glyph;
+	size_t msize;
+
+	glyph = gfx_font_first_glyph(font);
+	while (glyph != NULL) {
+		if (gfx_glyph_matches(glyph, str, &msize)) {
+			*rglyph = glyph;
+			*rsize = msize;
+			return EOK;
+		}
+
+		glyph = gfx_font_next_glyph(glyph);
+	}
+
+	return ENOENT;
 }
 
Index: uspace/lib/gfxfont/src/glyph.c
===================================================================
--- uspace/lib/gfxfont/src/glyph.c	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/src/glyph.c	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -39,4 +39,6 @@
 #include <mem.h>
 #include <stdlib.h>
+#include <str.h>
+#include "../private/font.h"
 #include "../private/glyph.h"
 
@@ -83,4 +85,6 @@
 
 	glyph->metrics = *metrics;
+	list_append(&glyph->lglyphs, &glyph->font->glyphs);
+	list_initialize(&glyph->patterns);
 	*rglyph = glyph;
 	return EOK;
@@ -93,4 +97,5 @@
 void gfx_glyph_destroy(gfx_glyph_t *glyph)
 {
+	list_remove(&glyph->lglyphs);
 	free(glyph);
 }
@@ -130,4 +135,28 @@
 errno_t gfx_glyph_set_pattern(gfx_glyph_t *glyph, const char *pattern)
 {
+	gfx_glyph_pattern_t *pat;
+
+	pat = gfx_glyph_first_pattern(glyph);
+	while (pat != NULL) {
+		if (str_cmp(pat->text, pattern) == 0) {
+			/* Already set */
+			return EOK;
+		}
+
+		pat = gfx_glyph_next_pattern(pat);
+	}
+
+	pat = calloc(1, sizeof(gfx_glyph_pattern_t));
+	if (pat == NULL)
+		return ENOMEM;
+
+	pat->glyph = glyph;
+	pat->text = str_dup(pattern);
+	if (pat->text == NULL) {
+		free(pat);
+		return ENOMEM;
+	}
+
+	list_append(&pat->lpatterns, &glyph->patterns);
 	return EOK;
 }
@@ -142,15 +171,83 @@
 void gfx_glyph_clear_pattern(gfx_glyph_t *glyph, const char *pattern)
 {
-}
-
-/** Open glyph bitmap for editing.
- *
- * @param glyph Glyph
- * @param rbmp Place to store glyph bitmap
- * @return EOK on success, ENOMEM if out of memory
- */
-errno_t gfx_glyph_open_bmp(gfx_glyph_t *glyph, gfx_glyph_bmp_t **rbmp)
-{
-	return EOK;
+	gfx_glyph_pattern_t *pat;
+
+	pat = gfx_glyph_first_pattern(glyph);
+	while (pat != NULL) {
+		if (str_cmp(pat->text, pattern) == 0) {
+			list_remove(&pat->lpatterns);
+			free(pat->text);
+			free(pat);
+			return;
+		}
+
+		pat = gfx_glyph_next_pattern(pat);
+	}
+}
+
+/** Determine if glyph maches the beginning of a string.
+ *
+ * @param glyph Glyph
+ * @param str String
+ * @param rsize Place to store number of bytes in the matching pattern
+ * @return @c true iff glyph matches the beginning of the string
+ */
+bool gfx_glyph_matches(gfx_glyph_t *glyph, const char *str, size_t *rsize)
+{
+	gfx_glyph_pattern_t *pat;
+
+	pat = gfx_glyph_first_pattern(glyph);
+	while (pat != NULL) {
+		if (str_test_prefix(str, pat->text)) {
+			*rsize = str_size(pat->text);
+			return true;
+		}
+
+		pat = gfx_glyph_next_pattern(pat);
+	}
+
+	return false;
+}
+
+/** Get first glyph pattern.
+ *
+ * @param glyph Glyph
+ * @return First pattern or @c NULL if there are none
+ */
+gfx_glyph_pattern_t *gfx_glyph_first_pattern(gfx_glyph_t *glyph)
+{
+	link_t *link;
+
+	link = list_first(&glyph->patterns);
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, gfx_glyph_pattern_t, lpatterns);
+}
+
+/** Get next glyph pattern.
+ *
+ * @param cur Current pattern
+ * @return Next pattern or @c NULL if there are none
+ */
+gfx_glyph_pattern_t *gfx_glyph_next_pattern(gfx_glyph_pattern_t *cur)
+{
+	link_t *link;
+
+	link = list_next(&cur->lpatterns, &cur->glyph->patterns);
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, gfx_glyph_pattern_t, lpatterns);
+}
+
+/** Return pattern string.
+ *
+ * @param pattern Pattern
+ * @return Pattern string (owned by @a pattern)
+ */
+const char *gfx_glyph_pattern_str(gfx_glyph_pattern_t *pattern)
+{
+	return pattern->text;
 }
 
Index: uspace/lib/gfxfont/src/glyph_bmp.c
===================================================================
--- uspace/lib/gfxfont/src/glyph_bmp.c	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/src/glyph_bmp.c	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -35,7 +35,35 @@
 
 #include <errno.h>
+#include <gfx/coord.h>
 #include <gfx/glyph_bmp.h>
 #include <stdlib.h>
 #include "../private/glyph_bmp.h"
+
+static errno_t gfx_glyph_bmp_extend(gfx_glyph_bmp_t *, gfx_coord2_t *);
+
+/** Open glyph bitmap for editing.
+ *
+ * @param glyph Glyph
+ * @param rbmp Place to store glyph bitmap
+ * @return EOK on success, ENOMEM if out of memory
+ */
+errno_t gfx_glyph_bmp_open(gfx_glyph_t *glyph, gfx_glyph_bmp_t **rbmp)
+{
+	gfx_glyph_bmp_t *bmp;
+
+	bmp = calloc(1, sizeof(gfx_glyph_bmp_t));
+	if (bmp == NULL)
+		return ENOMEM;
+
+	bmp->rect.p0.x = 0;
+	bmp->rect.p0.y = 0;
+	bmp->rect.p1.x = 0;
+	bmp->rect.p1.y = 0;
+	bmp->pixels = NULL;
+
+	bmp->glyph = glyph;
+	*rbmp = bmp;
+	return EOK;
+}
 
 /** Save glyph bitmap.
@@ -55,4 +83,6 @@
 void gfx_glyph_bmp_close(gfx_glyph_bmp_t *bmp)
 {
+	free(bmp->pixels);
+	free(bmp);
 }
 
@@ -66,5 +96,15 @@
 int gfx_glyph_bmp_getpix(gfx_glyph_bmp_t *bmp, gfx_coord_t x, gfx_coord_t y)
 {
-	return 0;
+	gfx_coord2_t pos;
+	size_t pitch;
+
+	pos.x = x;
+	pos.y = y;
+	if (!gfx_pix_inside_rect(&pos, &bmp->rect))
+		return 0;
+
+	pitch = bmp->rect.p1.x - bmp->rect.p0.x;
+	return bmp->pixels[(y - bmp->rect.p0.y) * pitch +
+	    (x - bmp->rect.p0.x)];
 }
 
@@ -80,4 +120,68 @@
     gfx_coord_t y, int value)
 {
+	gfx_coord2_t pos;
+	size_t pitch;
+	errno_t rc;
+
+	pos.x = x;
+	pos.y = y;
+	if (!gfx_pix_inside_rect(&pos, &bmp->rect)) {
+		rc = gfx_glyph_bmp_extend(bmp, &pos);
+		if (rc != EOK)
+			return rc;
+	}
+
+	pitch = bmp->rect.p1.x - bmp->rect.p0.x;
+	bmp->pixels[(y - bmp->rect.p0.y) * pitch +
+	    (x - bmp->rect.p0.x)] = value;
+	return EOK;
+}
+
+/** Extend glyph bitmap to cover a patricular pixel.
+ *
+ * @param bmp Glyph bitmap
+ * @param pos Pixel position
+ *
+ * @return EOK on sucesss, ENOMEM if out of memory
+ */
+static errno_t gfx_glyph_bmp_extend(gfx_glyph_bmp_t *bmp, gfx_coord2_t *pos)
+{
+	gfx_rect_t prect;
+	gfx_rect_t nrect;
+	int *npixels;
+	size_t npitch;
+	size_t opitch;
+	gfx_coord_t x, y;
+
+	/* Compute new rectangle enveloping current rectangle and new pixel */
+	prect.p0 = *pos;
+	prect.p1.x = prect.p0.x + 1;
+	prect.p1.y = prect.p0.y + 1;
+
+	gfx_rect_envelope(&bmp->rect, &prect, &nrect);
+
+	/* Allocate new pixel array */
+	npixels = calloc(sizeof(int), (nrect.p1.x - nrect.p0.x) *
+	    (nrect.p1.y - nrect.p0.y));
+	if (npixels == NULL)
+		return ENOMEM;
+
+	/* Transfer pixel data */
+	opitch = bmp->rect.p1.x - bmp->rect.p0.x;
+	npitch = nrect.p1.x - nrect.p0.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++) {
+			npixels[(y - nrect.p0.y) * npitch + x - nrect.p0.x] =
+			    bmp->pixels[(y - bmp->rect.p0.y) * opitch +
+				x - bmp->rect.p0.x];
+		}
+	}
+
+	/* Switch new and old data */
+	free(bmp->pixels);
+	bmp->pixels = npixels;
+	bmp->rect = nrect;
+
 	return EOK;
 }
Index: uspace/lib/gfxfont/test/font.c
===================================================================
--- uspace/lib/gfxfont/test/font.c	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/test/font.c	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -27,4 +27,5 @@
  */
 
+#include <gfx/context.h>
 #include <gfx/font.h>
 #include <pcut/pcut.h>
@@ -34,6 +35,166 @@
 PCUT_TEST_SUITE(font);
 
-PCUT_TEST(dummy)
-{
+static errno_t testgc_set_color(void *, gfx_color_t *);
+static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+
+static gfx_context_ops_t test_ops = {
+	.set_color = testgc_set_color,
+	.fill_rect = testgc_fill_rect
+};
+
+/** Test creating and destroying font */
+PCUT_TEST(create_destroy)
+{
+	gfx_font_metrics_t metrics;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics);
+	rc = gfx_font_create(gc, &metrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_font_get_metrics() */
+PCUT_TEST(get_metrics)
+{
+	gfx_font_metrics_t metrics;
+	gfx_font_metrics_t gmetrics;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics);
+	metrics.ascent = 1;
+	metrics.descent = 2;
+	metrics.leading = 3;
+
+	rc = gfx_font_create(gc, &metrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_get_metrics(font, &gmetrics);
+	PCUT_ASSERT_INT_EQUALS(metrics.ascent, gmetrics.ascent);
+	PCUT_ASSERT_INT_EQUALS(metrics.descent, gmetrics.descent);
+	PCUT_ASSERT_INT_EQUALS(metrics.leading, gmetrics.leading);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_font_set_metrics() */
+PCUT_TEST(set_metrics)
+{
+	gfx_font_metrics_t metrics1;
+	gfx_font_metrics_t metrics2;
+	gfx_font_metrics_t gmetrics;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics1);
+	metrics1.ascent = 1;
+	metrics1.descent = 2;
+	metrics1.leading = 3;
+
+	rc = gfx_font_create(gc, &metrics1, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics2);
+	metrics1.ascent = 4;
+	metrics1.descent = 5;
+	metrics1.leading = 6;
+
+	rc = gfx_font_set_metrics(font, &metrics2);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_get_metrics(font, &gmetrics);
+	PCUT_ASSERT_INT_EQUALS(metrics2.ascent, gmetrics.ascent);
+	PCUT_ASSERT_INT_EQUALS(metrics2.descent, gmetrics.descent);
+	PCUT_ASSERT_INT_EQUALS(metrics2.leading, gmetrics.leading);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_font_first_glyph() */
+PCUT_TEST(first_glyph)
+{
+	gfx_font_metrics_t metrics;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	gfx_glyph_t *glyph;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics);
+
+	rc = gfx_font_create(gc, &metrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	glyph = gfx_font_first_glyph(font);
+	PCUT_ASSERT_NULL(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_font_next_glyph() */
+PCUT_TEST(next_glyph)
+{
+	/* TODO */
+}
+
+/** Test gfx_font_search_glyph() */
+PCUT_TEST(search_glyph)
+{
+	gfx_font_metrics_t metrics;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	gfx_glyph_t *glyph;
+	size_t bytes;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&metrics);
+
+	rc = gfx_font_create(gc, &metrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_font_search_glyph(font, "Hello", &glyph, &bytes);
+	PCUT_ASSERT_ERRNO_VAL(ENOENT, rc);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+static errno_t testgc_set_color(void *arg, gfx_color_t *color)
+{
+	return EOK;
+}
+
+static errno_t testgc_fill_rect(void *arg, gfx_rect_t *rect)
+{
+	return EOK;
 }
 
Index: uspace/lib/gfxfont/test/glyph.c
===================================================================
--- uspace/lib/gfxfont/test/glyph.c	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/test/glyph.c	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -27,6 +27,10 @@
  */
 
+#include <gfx/context.h>
+#include <gfx/font.h>
 #include <gfx/glyph.h>
 #include <pcut/pcut.h>
+#include <stdbool.h>
+#include <str.h>
 
 PCUT_INIT;
@@ -34,6 +38,351 @@
 PCUT_TEST_SUITE(glyph);
 
-PCUT_TEST(dummy)
-{
+static errno_t testgc_set_color(void *, gfx_color_t *);
+static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+
+static gfx_context_ops_t test_ops = {
+	.set_color = testgc_set_color,
+	.fill_rect = testgc_fill_rect
+};
+
+/** Test creating and destroying glyph */
+PCUT_TEST(create_destroy)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_get_metrics() */
+PCUT_TEST(get_metrics)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_glyph_metrics_t rmetrics;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 42;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_get_metrics(glyph, &rmetrics);
+	PCUT_ASSERT_INT_EQUALS(gmetrics.advance, rmetrics.advance);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_set_metrics() */
+PCUT_TEST(set_metrics)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics1;
+	gfx_glyph_metrics_t gmetrics2;
+	gfx_glyph_t *glyph;
+	gfx_glyph_metrics_t rmetrics;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics1);
+	gmetrics1.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics1, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics2);
+	gmetrics2.advance = 2;
+
+	gfx_glyph_set_metrics(glyph, &gmetrics2);
+
+	gfx_glyph_get_metrics(glyph, &rmetrics);
+	PCUT_ASSERT_INT_EQUALS(gmetrics2.advance, rmetrics.advance);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_set_pattern() */
+PCUT_TEST(set_pattern)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Set a pattern */
+	rc = gfx_glyph_set_pattern(glyph, "A");
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Setting the same pattern again should be OK */
+	rc = gfx_glyph_set_pattern(glyph, "A");
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_clear_pattern() */
+PCUT_TEST(clear_pattern)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Set a pattern */
+	rc = gfx_glyph_set_pattern(glyph, "A");
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Now clear a different pattern - should be OK */
+	gfx_glyph_clear_pattern(glyph, "AA");
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Now clear the pattern which has been set */
+	gfx_glyph_clear_pattern(glyph, "A");
+	PCUT_ASSERT_NULL(gfx_glyph_first_pattern(glyph));
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_matches() */
+PCUT_TEST(matches)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	bool match;
+	size_t msize;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Set a pattern */
+	rc = gfx_glyph_set_pattern(glyph, "AB");
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	match = gfx_glyph_matches(glyph, "A", &msize);
+	PCUT_ASSERT_FALSE(match);
+
+	match = gfx_glyph_matches(glyph, "AB", &msize);
+	PCUT_ASSERT_TRUE(match);
+	PCUT_ASSERT_INT_EQUALS(2, msize);
+
+	match = gfx_glyph_matches(glyph, "ABC", &msize);
+	PCUT_ASSERT_TRUE(match);
+	PCUT_ASSERT_INT_EQUALS(2, msize);
+
+	match = gfx_glyph_matches(glyph, "BAB", &msize);
+	PCUT_ASSERT_FALSE(match);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_first_pattern(), gfx_glyph_next_pattern() */
+PCUT_TEST(first_next_pattern)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_pattern_t *pat;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Set a pattern */
+	rc = gfx_glyph_set_pattern(glyph, "A");
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	pat = gfx_glyph_first_pattern(glyph);
+	PCUT_ASSERT_NOT_NULL(pat);
+
+	pat = gfx_glyph_next_pattern(pat);
+	PCUT_ASSERT_NULL(pat);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test gfx_glyph_pattern_str() */
+PCUT_TEST(pattern_str)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_pattern_t *pat;
+	const char *pstr;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	PCUT_ASSERT_NULL(gfx_glyph_first_pattern(glyph));
+
+	/* Set a pattern */
+	rc = gfx_glyph_set_pattern(glyph, "A");
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(gfx_glyph_first_pattern(glyph));
+
+	pat = gfx_glyph_first_pattern(glyph);
+	PCUT_ASSERT_NOT_NULL(pat);
+
+	pstr = gfx_glyph_pattern_str(pat);
+	PCUT_ASSERT_INT_EQUALS(0, str_cmp("A", pstr));
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+static errno_t testgc_set_color(void *arg, gfx_color_t *color)
+{
+	return EOK;
+}
+
+static errno_t testgc_fill_rect(void *arg, gfx_rect_t *rect)
+{
+	return EOK;
 }
 
Index: uspace/lib/gfxfont/test/glyph_bmp.c
===================================================================
--- uspace/lib/gfxfont/test/glyph_bmp.c	(revision 703c7432cc61dc07793ec073c67444b07dbdb2ac)
+++ uspace/lib/gfxfont/test/glyph_bmp.c	(revision c78a03d166adbe46f1f107a84c70f0ed13cd4a94)
@@ -27,5 +27,8 @@
  */
 
+#include <gfx/context.h>
+#include <gfx/font.h>
 #include <gfx/glyph.h>
+#include <gfx/glyph_bmp.h>
 #include <pcut/pcut.h>
 
@@ -34,6 +37,268 @@
 PCUT_TEST_SUITE(glyph_bmp);
 
-PCUT_TEST(dummy)
-{
+static errno_t testgc_set_color(void *, gfx_color_t *);
+static errno_t testgc_fill_rect(void *, gfx_rect_t *);
+
+static gfx_context_ops_t test_ops = {
+	.set_color = testgc_set_color,
+	.fill_rect = testgc_fill_rect
+};
+
+/** Test opening and closing glyph bitmap */
+PCUT_TEST(open_close)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_bmp_t *bmp;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	bmp = NULL;
+
+	rc = gfx_glyph_bmp_open(glyph, &bmp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(bmp);
+
+	gfx_glyph_bmp_close(bmp);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test glyph_bmp_save() */
+PCUT_TEST(save)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_bmp_t *bmp;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	bmp = NULL;
+
+	rc = gfx_glyph_bmp_open(glyph, &bmp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(bmp);
+
+	/* TODO: Need a test to verify that save actually worked */
+	rc = gfx_glyph_bmp_save(bmp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_bmp_close(bmp);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test glyph_bmp_getpix() */
+PCUT_TEST(getpix)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_bmp_t *bmp;
+	int pix;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	bmp = NULL;
+
+	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(0, pix);
+
+	gfx_glyph_bmp_close(bmp);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test glyph_bmp_setpix() can flip pixel value both ways */
+PCUT_TEST(setpix_flip)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_bmp_t *bmp;
+	int pix;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	bmp = NULL;
+
+	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(0, pix);
+
+	rc = gfx_glyph_bmp_setpix(bmp, 0, 0, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 0, 0);
+	PCUT_ASSERT_INT_EQUALS(1, pix);
+
+	rc = gfx_glyph_bmp_setpix(bmp, 0, 0, 0);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	pix = gfx_glyph_bmp_getpix(bmp, 0, 0);
+	PCUT_ASSERT_INT_EQUALS(0, pix);
+
+	gfx_glyph_bmp_close(bmp);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+/** Test glyph_bmp_setpix() properly extends pixel array */
+PCUT_TEST(setpix_externd)
+{
+	gfx_font_metrics_t fmetrics;
+	gfx_font_t *font;
+	gfx_glyph_metrics_t gmetrics;
+	gfx_glyph_t *glyph;
+	gfx_context_t *gc;
+	gfx_glyph_bmp_t *bmp;
+	gfx_coord_t x, y;
+	int pix;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, NULL, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_metrics_init(&fmetrics);
+	rc = gfx_font_create(gc, &fmetrics, &font);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_glyph_metrics_init(&gmetrics);
+	gmetrics.advance = 1;
+
+	rc = gfx_glyph_create(font, &gmetrics, &glyph);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	bmp = NULL;
+
+	rc = gfx_glyph_bmp_open(glyph, &bmp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(bmp);
+
+	/*
+	 * Fill the rectangle [0, 0]..[3, 3] with alternating pixel pattern
+	 * and then check it.
+	 */
+
+	rc = gfx_glyph_bmp_setpix(bmp, 0, 0, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_glyph_bmp_setpix(bmp, 1, 1, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_glyph_bmp_setpix(bmp, 2, 0, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_glyph_bmp_setpix(bmp, 0, 2, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_glyph_bmp_setpix(bmp, 2, 2, 1);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	for (y = 0; y <= 2; y++) {
+		for (x = 0; x <= 2; x++) {
+			pix = gfx_glyph_bmp_getpix(bmp, x, y);
+			PCUT_ASSERT_INT_EQUALS((x & 1) ^ (y & 1) ^ 1, pix);
+		}
+	}
+
+	gfx_glyph_bmp_close(bmp);
+
+	gfx_glyph_destroy(glyph);
+
+	gfx_font_destroy(font);
+	rc = gfx_context_delete(gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+}
+
+static errno_t testgc_set_color(void *arg, gfx_color_t *color)
+{
+	return EOK;
+}
+
+static errno_t testgc_fill_rect(void *arg, gfx_rect_t *rect)
+{
+	return EOK;
 }
 
