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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user