From f67a204feedb25b09c28c7ba5b0007435ef95767 Mon Sep 17 00:00:00 2001 From: Daniel Sperl Date: Tue, 12 Sep 2017 14:37:38 +0200 Subject: [PATCH] fixed that BitmapFont was not drawn if lineHeight exceeded TextField height (refs #1002) Instead, the last line now only verifies that there's enough room for the _font size_. --- starling/src/starling/text/BitmapFont.as | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/starling/src/starling/text/BitmapFont.as b/starling/src/starling/text/BitmapFont.as index 49bcf5588..552aa10d7 100644 --- a/starling/src/starling/text/BitmapFont.as +++ b/starling/src/starling/text/BitmapFont.as @@ -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; @@ -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;