From b00370410c0b50f4a177dc1a53c87bdad964d368 Mon Sep 17 00:00:00 2001 From: Jordi Sala Morales <jordism91@gmail.com> Date: Wed, 26 Jun 2024 10:07:56 +0200 Subject: [PATCH] Improve paragraph indent (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Additional layout properties (#190) * additional layout properties * changeset * add changelog --------- Co-authored-by: Alex Sánchez <sion333@gmail.com> --- .changeset/sixty-colts-sleep.md | 5 +++++ plugin-src/translators/text/paragraph/Paragraph.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/sixty-colts-sleep.md diff --git a/.changeset/sixty-colts-sleep.md b/.changeset/sixty-colts-sleep.md new file mode 100644 index 0000000..21837c2 --- /dev/null +++ b/.changeset/sixty-colts-sleep.md @@ -0,0 +1,5 @@ +--- +"penpot-exporter": patch +--- + +Improve paragraph indent using letter spacing diff --git a/plugin-src/translators/text/paragraph/Paragraph.ts b/plugin-src/translators/text/paragraph/Paragraph.ts index 757a26b..1488443 100644 --- a/plugin-src/translators/text/paragraph/Paragraph.ts +++ b/plugin-src/translators/text/paragraph/Paragraph.ts @@ -63,14 +63,14 @@ export class Paragraph { if (indent === 0) return; return { - text: ' '.repeat(indent), + text: ' ', fontId: 'sourcesanspro', fontVariantId: 'regular', - fontSize: '5', + fontSize: '1', fontStyle: 'normal', fontWeight: '400', lineHeight: '1', - letterSpacing: '0' + letterSpacing: indent.toString() }; }