1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00

Whitespace

This commit is contained in:
jules 2018-02-24 13:40:56 +00:00
parent 5d9eabb084
commit edbeb50eeb
2 changed files with 29 additions and 29 deletions

View file

@ -119,40 +119,40 @@ void LookAndFeel::setDefaultLookAndFeel (LookAndFeel* newDefaultLookAndFeel) noe
Typeface::Ptr LookAndFeel::getTypefaceForFont (const Font& font)
{
if (font.getTypefaceName() == Font::getDefaultSansSerifFontName())
{
if (defaultTypeface != nullptr)
return defaultTypeface;
if (defaultSans.isNotEmpty())
{
if (defaultTypeface != nullptr)
return defaultTypeface;
if (defaultSans.isNotEmpty())
{
Font f (font);
f.setTypefaceName (defaultSans);
return Typeface::createSystemTypefaceFor (f);
return Typeface::createSystemTypefaceFor (f);
}
}
return Font::getDefaultTypefaceForFont (font);
}
void LookAndFeel::setDefaultSansSerifTypeface (Typeface::Ptr newDefaultTypeface)
{
if (defaultTypeface != newDefaultTypeface)
{
defaultTypeface = newDefaultTypeface;
Typeface::clearTypefaceCache();
}
}
void LookAndFeel::setDefaultSansSerifTypeface (Typeface::Ptr newDefaultTypeface)
{
if (defaultTypeface != newDefaultTypeface)
{
defaultTypeface = newDefaultTypeface;
Typeface::clearTypefaceCache();
}
}
void LookAndFeel::setDefaultSansSerifTypefaceName (const String& newName)
{
if (defaultSans != newName)
{
{
defaultTypeface = {};
Typeface::clearTypefaceCache();
defaultSans = newName;
}
}
//==============================================================================
MouseCursor LookAndFeel::getMouseCursorFor (Component& component)
{

View file

@ -163,24 +163,24 @@ public:
//==============================================================================
/** Returns the typeface that should be used for a given font.
The default implementation just does what you'd expect it to, but you can override
this if you want to intercept fonts and use your own custom typeface object.
this if you want to intercept fonts and use your own custom typeface object.
@see setDefaultTypeface
*/
virtual Typeface::Ptr getTypefaceForFont (const Font&);
/** Allows you to supply a default typeface that will be returned as the default
sans-serif font.
Instead of a typeface object, you can specify a typeface by name using the
setDefaultSansSerifTypefaceName() method.
You can perform more complex typeface substitutions by overloading
getTypefaceForFont() but this lets you easily set a global typeface.
*/
void setDefaultSansSerifTypeface (Typeface::Ptr newDefaultTypeface);
/** Allows you to supply a default typeface that will be returned as the default
sans-serif font.
Instead of a typeface object, you can specify a typeface by name using the
setDefaultSansSerifTypefaceName() method.
You can perform more complex typeface substitutions by overloading
getTypefaceForFont() but this lets you easily set a global typeface.
*/
void setDefaultSansSerifTypeface (Typeface::Ptr newDefaultTypeface);
/** Allows you to change the default sans-serif font.
If you need to supply your own Typeface object for any of the default fonts, rather
than just supplying the name (e.g. if you want to use an embedded font), then
you can instead call setDefaultSansSerifTypeface() with an object to use.
you can instead call setDefaultSansSerifTypeface() with an object to use.
*/
void setDefaultSansSerifTypefaceName (const String& newName);
@ -232,7 +232,7 @@ private:
};
SortedSet<ColourSetting> colours;
String defaultSans, defaultSerif, defaultFixed;
String defaultSans, defaultSerif, defaultFixed;
Typeface::Ptr defaultTypeface;
bool useNativeAlertWindows = false;