+static void
+_cserve2_client_font_load(Client *client)
+{
+ Msg_Font_Load *msg = (Msg_Font_Load *)client->msg.buf;
+ char fontpath[PATH_MAX];
+
+ memcpy(fontpath, msg + 1, msg->pathlen);
+
+ INF("Received %s command: RID=%d",
+ (msg->base.type == CSERVE2_FONT_LOAD) ? "FONT_LOAD" : "FONT_UNLOAD",
+ msg->base.rid);
+ INF("Font: %s, rend_flags: %d, hint: %d, size: %d, dpi: %d",
+ fontpath, msg->rend_flags, msg->hint, msg->size, msg->dpi);
+}
+
+static void
+_cserve2_client_font_glyphs_request(Client *client)
+{
+ Msg_Font_Glyphs_Request *msg = (Msg_Font_Glyphs_Request *)client->msg.buf;
+ char fontpath[PATH_MAX];
+ Glyph_Request *glyphs;
+ unsigned int i;
+ const char *bufpos = client->msg.buf;
+
+ memcpy(fontpath, msg + 1, msg->pathlen);
+
+ bufpos = bufpos + sizeof(msg) + msg->pathlen;
+ glyphs = malloc(sizeof(*glyphs) * msg->nglyphs);
+
+ for (i = 0; i < msg->nglyphs; i++)
+ {
+ memcpy(&glyphs[i], bufpos, sizeof(*glyphs));
+ bufpos += sizeof(*glyphs);
+ }
+
+ if (msg->base.type == CSERVE2_FONT_GLYPHS_LOAD)
+ {
+ INF("Received CSERVE2_FONT_GLYPHS_LOAD command: RID=%d",
+ msg->base.rid);
+ }
+ else
+ {
+ INF("Received CSERVE2_FONT_GLYPHS_USED command: RID=%d",
+ msg->base.rid);
+ }
+}
+