Now also uses the fallback family when the usual default font couldn't be found.

This hides a problem with the view states that the next commit will fix :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14674 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-04 09:49:25 +00:00
parent e0d7d87fc4
commit 7490bd32f1
+3
View File
@@ -119,11 +119,14 @@ void
FontManager::_SetDefaultFont() FontManager::_SetDefaultFont()
{ {
FontStyle* style = GetStyle(DEFAULT_PLAIN_FONT_FAMILY, DEFAULT_PLAIN_FONT_STYLE); FontStyle* style = GetStyle(DEFAULT_PLAIN_FONT_FAMILY, DEFAULT_PLAIN_FONT_STYLE);
if (style == NULL) {
style = GetStyle(FALLBACK_PLAIN_FONT_FAMILY, DEFAULT_PLAIN_FONT_STYLE);
if (style == NULL) { if (style == NULL) {
style = FindStyleMatchingFace(B_REGULAR_FACE); style = FindStyleMatchingFace(B_REGULAR_FACE);
if (style == NULL) if (style == NULL)
style = FamilyAt(0)->StyleAt(0); style = FamilyAt(0)->StyleAt(0);
} }
}
fDefaultFont = new ServerFont(*style, DEFAULT_PLAIN_FONT_SIZE); fDefaultFont = new ServerFont(*style, DEFAULT_PLAIN_FONT_SIZE);
} }