Skip to content

Commit

Permalink
UI|GL: Small adjustment to text line width compression
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jan 26, 2014
1 parent a13ba20 commit 789221e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doomsday/libappfw/src/gltextcomposer.cpp
Expand Up @@ -458,11 +458,12 @@ void GLTextComposer::makeVertices(Vertices &triStrip,
*/

Instance::Line::Segment &seg = line.segs.last();
if(seg.right() > d->wraps->maximumWidth() + 1)
int const leeway = 3;
if(seg.right() > d->wraps->maximumWidth() + leeway)
{
// Needs compressing (up to 10%).
seg.compressed = true;
seg.width = de::max(int(seg.width * .9f), d->wraps->maximumWidth() + 1 - seg.x);
seg.width = de::max(int(seg.width * .9f), d->wraps->maximumWidth() + leeway - seg.x);
}
}

Expand Down

0 comments on commit 789221e

Please sign in to comment.