Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
ebddf597b4
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/juce_appframework/gui/graphics/fonts/juce_Typeface.cpp

+ 10
- 1
src/juce_appframework/gui/graphics/fonts/juce_Typeface.cpp View File

@@ -302,7 +302,16 @@ const TypefaceGlyphInfo* Typeface::getGlyph (const juce_wchar character) throw()
if (CharacterFunctions::isWhitespace (character) && character != L' ')
{
return getGlyph (L' ');
const TypefaceGlyphInfo* spaceGlyph = getGlyph (L' ');
if (spaceGlyph != 0)
{
// Add a copy of the empty glyph, mapped onto this character
addGlyph (character, spaceGlyph->getPath(), spaceGlyph->getHorizontalSpacing (0));
spaceGlyph = (const TypefaceGlyphInfo*) glyphs [(int) lookupTable [character]];
}
return spaceGlyph;
}
else if (character != defaultCharacter)
{


Loading…
Cancel
Save