@polotno/pdf-export 0.1.33 → 0.1.34
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/lib/text.js +4 -1
- package/package.json +1 -1
package/lib/text.js
CHANGED
|
@@ -935,7 +935,10 @@ async function prepareLineForRendering(doc, element, line, lineIndex, yOffset, l
|
|
|
935
935
|
: doc.heightOfString(strippedLineText, textOptions);
|
|
936
936
|
const contentStartX = calculateTextContentXOffset(element, line);
|
|
937
937
|
const isJustify = element.align === 'justify';
|
|
938
|
-
|
|
938
|
+
// Disable justification if line contains tabs - tabs position content precisely,
|
|
939
|
+
// and justification would interfere by spreading spaces
|
|
940
|
+
const hasTabs = line.text.includes('\t');
|
|
941
|
+
const widthOption = isJustify && !hasTabs
|
|
939
942
|
? Math.max(element.width - (line.listMeta ? line.listMeta.textStartPx : 0), 1)
|
|
940
943
|
: undefined;
|
|
941
944
|
// Handle list markers if needed
|