コード例 #1
0
ファイル: ServerPicture.cpp プロジェクト: naveedasmat/haiku
static void
set_font_family(DrawingContext* context, const char* family)
{
	FontStyle* fontStyle = gFontManager->GetStyleByIndex(family, 0);
	ServerFont font;
	font.SetStyle(fontStyle);
	context->CurrentState()->SetFont(font, B_FONT_FAMILY_AND_STYLE);
}
コード例 #2
0
ファイル: ServerPicture.cpp プロジェクト: simonsouth/haiku
static void
set_font_family(void* _context, const char* _family, size_t length)
{
	DrawingContext* context = reinterpret_cast<DrawingContext *>(_context);
	BString family(_family, length);

	FontStyle* fontStyle = gFontManager->GetStyleByIndex(family, 0);
	ServerFont font;
	font.SetStyle(fontStyle);
	context->CurrentState()->SetFont(font, B_FONT_FAMILY_AND_STYLE);
}