If the font style isn't found, try to scan for fonts as well. The same is done
for families. This fixes the bug that when a font family was already loaded, but some of its styles haven't been loaded yet, the app_server would fail to set the system fonts to those styles. Fixes bug #4148. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31904 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1038,8 +1038,14 @@ FontManager::GetStyle(const char* familyName, const char* styleName,
|
||||
return fontStyle;
|
||||
|
||||
// before we fail, we try the mappings for a match
|
||||
if (_AddMappedFont(family->Name(), styleName) == B_OK)
|
||||
return family->GetStyle(styleName);
|
||||
if (_AddMappedFont(family->Name(), styleName) == B_OK) {
|
||||
fontStyle = family->GetStyle(styleName);
|
||||
if (fontStyle != NULL)
|
||||
return fontStyle;
|
||||
}
|
||||
|
||||
_ScanFonts();
|
||||
return family->GetStyle(styleName);
|
||||
}
|
||||
|
||||
if (styleID != 0xffff)
|
||||
|
||||
Reference in New Issue
Block a user