From 35a32074111d70d56d24bf4de4013a36ff3c5f24 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 12 Apr 2020 14:55:14 +0100 Subject: Document value of w:sz --- lib/docx/body-reader.js | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 45f6a33..94034d1 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -59,6 +59,7 @@ function BodyReader(options) { function readRunProperties(element) { return readRunStyle(element).map(function(style) { var fontSizeString = element.firstOrEmpty("w:sz").attributes["w:val"]; + // w:sz gives the font size in half points, so halve the value to get the size in points var fontSize = fontSizeString ? parseInt(fontSizeString, 10) / 2 : null; return { -- cgit v1.2.3