photopea/Typr.js

"newline" character support for Typr Path

vinaydotblog opened this issue · 1 comments

Is there any way to add support for "newline" characters. So that glyphs after "↵" (newline) gets Typr path as if it's in a new line. Can you point me to the function which can be modified to support this.

Basically I'm trying to get a SVG path of given text string with newline support.

Hi, and do you want to align your text to the left, to the center, or to the right? And what should be the line height? Do you see where I am going? :)

I recommend you to split your string by newlines: str.split("\n"), compute the path for each part, move parts vertically, and merge them together.