From bd09485ce97081bb02a25994b00694c300cb4b41 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sun, 19 Jul 2009 10:21:21 +0000 Subject: [PATCH] try to handle the SetFontFamily case in ServerPicture, although it doesn't work. Maybe I'm not doing it correctly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31638 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/app/ServerPicture.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/servers/app/ServerPicture.cpp b/src/servers/app/ServerPicture.cpp index 8550c15f3a..17b44637c3 100644 --- a/src/servers/app/ServerPicture.cpp +++ b/src/servers/app/ServerPicture.cpp @@ -610,16 +610,22 @@ set_scale(View *view, float scale) static void set_font_family(View *view, const char *family) { - // TODO: Implement - // Can we have a ServerFont::SetFamily() which accepts a string ? + FontStyle *fontStyle = gFontManager->GetStyle(family, NULL, + 0, 0, 0); + ServerFont font; + font.SetStyle(fontStyle); + view->CurrentState()->SetFont(font, B_FONT_FAMILY_AND_STYLE); } static void set_font_style(View *view, const char *style) { - // TODO: Implement - // Can we have a ServerFont::SetStyle() which accepts a string ? + FontStyle *fontStyle = gFontManager->GetStyle(NULL, style, + 0, 0, 0); + ServerFont font; + font.SetStyle(fontStyle); + view->CurrentState()->SetFont(font, B_FONT_FAMILY_AND_STYLE); }