@effing/canvas 0.23.0 → 0.23.1

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/index.js CHANGED
@@ -644,14 +644,7 @@ function layoutText(text, style, maxWidth, ctx, emojiEnabled) {
644
644
  fontStyle,
645
645
  ctx
646
646
  );
647
- let baselineY;
648
- if (fontMetrics) {
649
- const typoAscent = fontMetrics.sTypoAscender / fontMetrics.unitsPerEm * fontSize;
650
- const typoDescent = -fontMetrics.sTypoDescender / fontMetrics.unitsPerEm * fontSize;
651
- baselineY = totalHeight + (lineHeightPx + typoAscent - typoDescent) / 2;
652
- } else {
653
- baselineY = totalHeight + (lineHeightPx + metrics.ascent - metrics.descent) / 2;
654
- }
647
+ const baselineY = totalHeight + (lineHeightPx + metrics.ascent - metrics.descent) / 2;
655
648
  segments.push({
656
649
  text: line,
657
650
  x,