Skip to content

Commit eb79777

Browse files
committed
consistent font line-spacing for Label
changes multi-line Label line-spacing basis from per-label max-glyph-height to font-size
1 parent e3b7e2a commit eb79777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Scene/LabelCollection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ function repositionAllGlyphs(label) {
407407
horizontalOrigin,
408408
backgroundPadding
409409
);
410-
var lineSpacing = label._lineHeight / label._relativeSize || defaultLineSpacingPercent * maxLineHeight;
410+
var lineSpacing = (defined(label._lineHeight) ? label._lineHeight : (defaultLineSpacingPercent * label._fontSize)) / label._relativeSize;
411411
var otherLinesHeight = lineSpacing * (numberOfLines - 1);
412412
var totalLineWidth = maxLineWidth;
413413
var totalLineHeight = maxLineHeight + otherLinesHeight;

0 commit comments

Comments
 (0)