* Small style cleanup and some comments added for clarity.
* FontManager::GetFamily() removed second call to _FindFamily() with no action in between -- why would it suddenly work the second time? git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30591 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
12483e3cbf
commit
cc0580fe34
@ -445,6 +445,7 @@ FontManager::_GetDefaultStyle(const char *familyName, const char *styleName,
|
||||
status_t
|
||||
FontManager::_SetDefaultFonts()
|
||||
{
|
||||
// plain font
|
||||
FontStyle* style = _GetDefaultStyle(DEFAULT_PLAIN_FONT_FAMILY,
|
||||
DEFAULT_PLAIN_FONT_STYLE, FALLBACK_PLAIN_FONT_FAMILY,
|
||||
DEFAULT_PLAIN_FONT_STYLE,
|
||||
@ -457,6 +458,7 @@ FontManager::_SetDefaultFonts()
|
||||
if (fDefaultPlainFont == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
// bold font
|
||||
style = _GetDefaultStyle(DEFAULT_BOLD_FONT_FAMILY, DEFAULT_BOLD_FONT_STYLE,
|
||||
FALLBACK_BOLD_FONT_FAMILY, DEFAULT_BOLD_FONT_STYLE, B_BOLD_FACE);
|
||||
|
||||
@ -465,6 +467,7 @@ FontManager::_SetDefaultFonts()
|
||||
if (fDefaultBoldFont == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
// fixed font
|
||||
style = _GetDefaultStyle(DEFAULT_FIXED_FONT_FAMILY, DEFAULT_FIXED_FONT_STYLE,
|
||||
FALLBACK_FIXED_FONT_FAMILY, DEFAULT_FIXED_FONT_STYLE, B_REGULAR_FACE);
|
||||
|
||||
@ -474,6 +477,7 @@ FontManager::_SetDefaultFonts()
|
||||
return B_NO_MEMORY;
|
||||
|
||||
fDefaultFixedFont->SetSpacing(B_FIXED_SPACING);
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@ -918,11 +922,6 @@ FontManager::GetFamily(const char* name)
|
||||
if (fScanned)
|
||||
return NULL;
|
||||
|
||||
// try again
|
||||
family = _FindFamily(name);
|
||||
if (family != NULL)
|
||||
return family;
|
||||
|
||||
// try font mappings before failing
|
||||
if (_AddMappedFont(name) == B_OK)
|
||||
return _FindFamily(name);
|
||||
|
@ -112,6 +112,6 @@ class FontManager : public BLooper {
|
||||
};
|
||||
|
||||
extern FT_Library gFreeTypeLibrary;
|
||||
extern FontManager *gFontManager;
|
||||
extern FontManager* gFontManager;
|
||||
|
||||
#endif /* FONT_MANAGER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user