shadow: initial font rendering
[platform/upstream/freerdp.git] / server / shadow / shadow_server.c
index caf6d95..c4acec3 100644 (file)
@@ -41,6 +41,8 @@
 
 #define TAG SERVER_TAG("shadow")
 
+rdpShadowFont* g_Font = NULL;
+
 static COMMAND_LINE_ARGUMENT_A shadow_args[] =
 {
        { "port", COMMAND_LINE_VALUE_REQUIRED, "<number>", NULL, NULL, -1, NULL, "Server port" },
@@ -529,11 +531,16 @@ int shadow_server_init_certificate(rdpShadowServer* server)
 
 int shadow_server_init_fonts(rdpShadowServer* server)
 {
+       char* fontPath;
        rdpShadowFont* font;
 
-       font = shadow_font_new("source_serif_pro_regular_12");
+       fontPath = GetCombinedPath(server->ConfigPath, "shadow/fonts");
+
+       font = shadow_font_new(fontPath, "source_serif_pro_regular_12");
+
+       g_Font = font;
 
-       shadow_font_free(font);
+       free(fontPath);
 
        return 1;
 }
@@ -562,7 +569,7 @@ int shadow_server_init(rdpShadowServer* server)
        if (status < 0)
                return -1;
 
-       //shadow_server_init_fonts(server);
+       shadow_server_init_fonts(server);
 
        server->listener = freerdp_listener_new();