pixi-glyphs 4.1.3 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pixi-glyphs.js +5 -2
- package/dist/pixi-glyphs.js.map +1 -1
- package/dist/pixi-glyphs.m.js +5 -2
- package/dist/pixi-glyphs.m.js.map +1 -1
- package/dist/pixi-glyphs.modern.js +6 -3
- package/dist/pixi-glyphs.modern.js.map +1 -1
- package/dist/pixi-glyphs.umd.js +5 -2
- package/dist/pixi-glyphs.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/pixi-glyphs.js
CHANGED
|
@@ -886,6 +886,7 @@ const getTallestToken = line => {
|
|
|
886
886
|
};
|
|
887
887
|
const verticalAlignInLines = (lines, lineSpacing, overrideValign) => {
|
|
888
888
|
let previousTallestToken = createEmptySegmentToken();
|
|
889
|
+
let lastNonEmptyTallestToken = createEmptySegmentToken();
|
|
889
890
|
let previousLineBottom = 0;
|
|
890
891
|
let paragraphModifier = 0;
|
|
891
892
|
const newLines = [];
|
|
@@ -907,8 +908,10 @@ const verticalAlignInLines = (lines, lineSpacing, overrideValign) => {
|
|
|
907
908
|
}
|
|
908
909
|
tallestAscent += paragraphModifier;
|
|
909
910
|
if (tallestHeight === 0 && tallestAscent === 0) {
|
|
910
|
-
tallestHeight =
|
|
911
|
-
tallestAscent =
|
|
911
|
+
tallestHeight = lastNonEmptyTallestToken.bounds?.height ?? 0;
|
|
912
|
+
tallestAscent = lastNonEmptyTallestToken.fontProperties?.ascent ?? 0;
|
|
913
|
+
} else {
|
|
914
|
+
lastNonEmptyTallestToken = tallestToken;
|
|
912
915
|
}
|
|
913
916
|
const valignParagraphModifier = paragraphModifier;
|
|
914
917
|
paragraphModifier = 0;
|