Skip to content

Commit

Permalink
fixed that BitmapFont was not drawn if lineHeight exceeded TextField …
Browse files Browse the repository at this point in the history
…height (refs #1002)

Instead, the last line now only verifies that there's enough room for the _font size_.
  • Loading branch information
PrimaryFeather committed Sep 12, 2017
1 parent 1fb1029 commit f67a204
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starling/src/starling/text/BitmapFont.as
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ package starling.text
containerWidth = (width - 2 * _padding) / scale;
containerHeight = (height - 2 * _padding) / scale;

if (_lineHeight <= containerHeight)
if (fontSize <= containerHeight)
{
var lastWhiteSpace:int = -1;
var lastCharID:int = -1;
Expand Down Expand Up @@ -411,7 +411,7 @@ package starling.text
if (lastWhiteSpace == i)
currentLine.pop();

if (currentY + leading + 2 * _lineHeight <= containerHeight)
if (currentY + _lineHeight + leading + fontSize <= containerHeight)
{
currentLine = CharLocation.vectorFromPool();
currentX = 0;
Expand Down

0 comments on commit f67a204

Please sign in to comment.