Ver código fonte

fix: Revert use `ideographic` textBaseline to improve layout shift when editing text" (#6400)

Revert "fix: use `ideographic` textBaseline to improve layout shift when editing text (#6384)"

This reverts commit 9e52c30ce86d7f7e61ffdb5ecad2523e179f620e.
Aakansha Doshi 2 anos atrás
pai
commit
f8e65bb77e
1 arquivos alterados com 1 adições e 8 exclusões
  1. 1 8
      src/renderer/renderElement.ts

+ 1 - 8
src/renderer/renderElement.ts

@@ -34,7 +34,6 @@ import { AppState, BinaryFiles, Zoom } from "../types";
 import { getDefaultAppState } from "../appState";
 import {
   BOUND_TEXT_PADDING,
-  FONT_FAMILY,
   MAX_DECIMALS_FOR_SVG_EXPORT,
   MIME_TYPES,
   SVG_NS,
@@ -287,13 +286,7 @@ const drawElementOnCanvas = (
             : element.textAlign === "right"
             ? element.width
             : 0;
-
-        // FIXME temporary hack
-        context.textBaseline =
-          element.fontFamily === FONT_FAMILY.Virgil ||
-          element.fontFamily === FONT_FAMILY.Cascadia
-            ? "ideographic"
-            : "bottom";
+        context.textBaseline = "bottom";
 
         const lineHeightPx = getLineHeightInPx(
           element.fontSize,