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
This commit is contained in:
Stefano Ceccherini 2009-07-19 10:21:21 +00:00
parent 2fb98dccf3
commit bd09485ce9

View File

@ -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);
}