Index: uspace/lib/gfxfont/test/font.c
===================================================================
--- uspace/lib/gfxfont/test/font.c	(revision d2100e23b019a7ed116b6d3d17c17625196dc4f7)
+++ uspace/lib/gfxfont/test/font.c	(revision 06b8383847ae4de1f2e464710f9877a9fbea7bc9)
@@ -30,6 +30,8 @@
 #include <gfx/font.h>
 #include <gfx/glyph.h>
+#include <gfx/typeface.h>
 #include <pcut/pcut.h>
 #include "../private/font.h"
+#include "../private/typeface.h"
 
 PCUT_INIT;
@@ -70,18 +72,26 @@
 PCUT_TEST(create_destroy)
 {
+	gfx_font_props_t props;
 	gfx_font_metrics_t metrics;
-	gfx_font_t *font;
-	gfx_context_t *gc;
-	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_font_create(gc, &metrics, &font);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
-
-	gfx_font_destroy(font);
+	gfx_typeface_t *tface;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	test_gc_t tgc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, (void *)&tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	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);
+
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
+
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -91,6 +101,8 @@
 PCUT_TEST(get_metrics)
 {
+	gfx_font_props_t props;
 	gfx_font_metrics_t metrics;
 	gfx_font_metrics_t gmetrics;
+	gfx_typeface_t *tface;
 	gfx_font_t *font;
 	gfx_context_t *gc;
@@ -106,5 +118,10 @@
 	metrics.leading = 3;
 
-	rc = gfx_font_create(gc, &metrics, &font);
+	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);
 
@@ -114,5 +131,6 @@
 	PCUT_ASSERT_INT_EQUALS(metrics.leading, gmetrics.leading);
 
-	gfx_font_destroy(font);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -122,14 +140,21 @@
 PCUT_TEST(set_metrics)
 {
+	gfx_font_props_t props;
 	gfx_font_metrics_t metrics1;
 	gfx_font_metrics_t metrics2;
 	gfx_font_metrics_t gmetrics;
-	gfx_font_t *font;
-	gfx_context_t *gc;
-	test_gc_t tgc;
-	errno_t rc;
-
-	rc = gfx_context_new(&test_ops, (void *)&tgc, &gc);
-	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	gfx_typeface_t *tface;
+	gfx_font_t *font;
+	gfx_context_t *gc;
+	test_gc_t tgc;
+	errno_t rc;
+
+	rc = gfx_context_new(&test_ops, (void *)&tgc, &gc);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	rc = gfx_typeface_create(gc, &tface);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_props_init(&props);
 
 	gfx_font_metrics_init(&metrics1);
@@ -138,5 +163,5 @@
 	metrics1.leading = 3;
 
-	rc = gfx_font_create(gc, &metrics1, &font);
+	rc = gfx_font_create(tface, &props, &metrics1, &font);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -154,5 +179,6 @@
 	PCUT_ASSERT_INT_EQUALS(metrics2.leading, gmetrics.leading);
 
-	gfx_font_destroy(font);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -162,6 +188,8 @@
 PCUT_TEST(first_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;
@@ -176,5 +204,10 @@
 	gfx_font_metrics_init(&metrics);
 
-	rc = gfx_font_create(gc, &metrics, &font);
+	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);
 
@@ -193,5 +226,6 @@
 
 	gfx_glyph_destroy(glyph);
-	gfx_font_destroy(font);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -201,6 +235,8 @@
 PCUT_TEST(next_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;
@@ -217,5 +253,10 @@
 	gfx_font_metrics_init(&metrics);
 
-	rc = gfx_font_create(gc, &metrics, &font);
+	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);
 
@@ -240,5 +281,6 @@
 	gfx_glyph_destroy(glyph1);
 	gfx_glyph_destroy(glyph2);
-	gfx_font_destroy(font);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -248,5 +290,7 @@
 PCUT_TEST(search_glyph)
 {
+	gfx_font_props_t props;
 	gfx_font_metrics_t metrics;
+	gfx_typeface_t *tface;
 	gfx_font_t *font;
 	gfx_context_t *gc;
@@ -261,5 +305,10 @@
 	gfx_font_metrics_init(&metrics);
 
-	rc = gfx_font_create(gc, &metrics, &font);
+	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);
 
@@ -267,5 +316,6 @@
 	PCUT_ASSERT_ERRNO_VAL(ENOENT, rc);
 
-	gfx_font_destroy(font);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
@@ -275,5 +325,7 @@
 PCUT_TEST(splice_at_glyph)
 {
+	gfx_font_props_t props;
 	gfx_font_metrics_t fmetrics;
+	gfx_typeface_t *tface;
 	gfx_font_t *font;
 	gfx_glyph_metrics_t gmetrics;
@@ -286,6 +338,10 @@
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
+	rc = gfx_typeface_create(gc, &tface);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	gfx_font_props_init(&props);
 	gfx_font_metrics_init(&fmetrics);
-	rc = gfx_font_create(gc, &fmetrics, &font);
+	rc = gfx_font_create(tface, &props, &fmetrics, &font);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
 
@@ -299,5 +355,6 @@
 	gfx_glyph_destroy(glyph);
 
-	gfx_font_destroy(font);
+	gfx_font_close(font);
+	gfx_typeface_destroy(tface);
 	rc = gfx_context_delete(gc);
 	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
