docx
docx copied to clipboard
Font size dont match style
When i set the font size in code the actual word document i generate is not matching the size
Example:
}, heading1: { run: { font: "Calibri", size: 36, bold: true, color: "#1f4e79" } }, heading2: { run: { font: "Calibri", size: 36, bold: true }, paragraph: { spacing: { line: 340 } } },
This will result in word document where h1 size is 16 and h2 size is 15.
Is there a definition of size that im missing or is this a bug?
Just had this issue myself--turns out you have to double the size value.
From the docs: size(halfPts): Set the font size, measured in half-points
https://docx.js.org/#/usage/styling-with-js?id=run-formatting
@sampl So is this issue a non-issue?