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.
@@ -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 = previousTallestToken.bounds?.height ?? 0;
911
- tallestAscent = previousTallestToken.fontProperties?.ascent ?? 0;
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;