|
|
@@ -211,10 +211,13 @@ Typeface::Ptr Font::getDefaultTypefaceForFont (const Font& font) |
|
|
|
|
|
|
|
|
Font f (font);
|
|
|
Font f (font);
|
|
|
|
|
|
|
|
|
const auto characteristics = defaultInfo.getRealFontCharacteristics (font.getTypefaceName());
|
|
|
|
|
|
|
|
|
const auto name = font.getTypefaceName();
|
|
|
|
|
|
const auto characteristics = defaultInfo.getRealFontCharacteristics (name);
|
|
|
f.setTypefaceName (characteristics.name);
|
|
|
f.setTypefaceName (characteristics.name);
|
|
|
|
|
|
|
|
|
if (font.getTypefaceStyle() == Font::getDefaultStyle())
|
|
|
|
|
|
|
|
|
const auto styles = findAllTypefaceStyles (name);
|
|
|
|
|
|
|
|
|
|
|
|
if (! styles.contains (font.getTypefaceStyle()))
|
|
|
f.setTypefaceStyle (characteristics.style);
|
|
|
f.setTypefaceStyle (characteristics.style);
|
|
|
|
|
|
|
|
|
return Typeface::createSystemTypefaceFor (f);
|
|
|
return Typeface::createSystemTypefaceFor (f);
|
|
|
|