Browse Source

Fix for single-character TextLayout width.

tags/2021-05-28
jules 12 years ago
parent
commit
b0e1cbd0ee
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/juce_graphics/fonts/juce_TextLayout.cpp

+ 1
- 1
modules/juce_graphics/fonts/juce_TextLayout.cpp View File

@@ -104,7 +104,7 @@ Range<float> TextLayout::Line::getLineBoundsX() const noexcept
float minX = run.glyphs.getReference(0).anchor.x; float minX = run.glyphs.getReference(0).anchor.x;
float maxX = minX; float maxX = minX;
for (int j = run.glyphs.size(); --j > 0;)
for (int j = run.glyphs.size(); --j >= 0;)
{ {
const Glyph& glyph = run.glyphs.getReference (j); const Glyph& glyph = run.glyphs.getReference (j);
const float x = glyph.anchor.x; const float x = glyph.anchor.x;


Loading…
Cancel
Save