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

Minor tweak to the GlyphArrangement word-splitting algorithm.

This commit is contained in:
jules 2012-12-20 13:59:51 +00:00
parent a9b177f2da
commit 6846b71ea4

View file

@ -478,7 +478,7 @@ void GlyphArrangement::addFittedText (const Font& f,
// can't find a suitable break, so try looking backwards.. // can't find a suitable break, so try looking backwards..
i = searchStartIndex; i = searchStartIndex;
for (int back = 1; back < jmin (5, i - startIndex - 1); ++back) for (int back = 1; back < jmin (7, i - startIndex - 1); ++back)
{ {
if (glyphs.getReference (i - back).isWhitespace() if (glyphs.getReference (i - back).isWhitespace()
|| glyphs.getReference (i - back).getCharacter() == '-') || glyphs.getReference (i - back).getCharacter() == '-')