diff --git a/api/classes/index.AbstractNumbering.html b/api/classes/index.AbstractNumbering.html
index 3ff4a6ca65..ee87b16e6b 100644
--- a/api/classes/index.AbstractNumbering.html
+++ b/api/classes/index.AbstractNumbering.html
@@ -35,7 +35,7 @@ Each abstract definition can contain up to 9 levels.
diff --git a/api/classes/index.Body.html b/api/classes/index.Body.html
index a0f5a1dbb9..ecd34d5488 100644
--- a/api/classes/index.Body.html
+++ b/api/classes/index.Body.html
@@ -37,7 +37,7 @@ section. The last section's properties are stored as a direct child of the body
diff --git a/api/classes/index.Bookmark.html b/api/classes/index.Bookmark.html
index cd18d86d93..02b8315057 100644
--- a/api/classes/index.Bookmark.html
+++ b/api/classes/index.Bookmark.html
@@ -31,7 +31,7 @@ of a start marker, content, and an end marker.
diff --git a/api/classes/index.BookmarkEnd.html b/api/classes/index.BookmarkEnd.html
index c3051fd42e..81b766a157 100644
--- a/api/classes/index.BookmarkEnd.html
+++ b/api/classes/index.BookmarkEnd.html
@@ -35,7 +35,7 @@ taken from bookmarkUniqueNumericId (see BookmarkStart)
diff --git a/api/classes/index.BookmarkStart.html b/api/classes/index.BookmarkStart.html
index 08466f25a7..47efc2111e 100644
--- a/api/classes/index.BookmarkStart.html
+++ b/api/classes/index.BookmarkStart.html
@@ -37,7 +37,7 @@ same as a Bookmark's.
diff --git a/api/classes/index.CellMerge.html b/api/classes/index.CellMerge.html
index 6c103115cd..53fc62f169 100644
--- a/api/classes/index.CellMerge.html
+++ b/api/classes/index.CellMerge.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.CellMergeAttributes.html b/api/classes/index.CellMergeAttributes.html
index befaab2661..0b42c0acab 100644
--- a/api/classes/index.CellMergeAttributes.html
+++ b/api/classes/index.CellMergeAttributes.html
@@ -30,7 +30,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.CheckBoxSymbolElement.html b/api/classes/index.CheckBoxSymbolElement.html
index 2f4473235a..cd2c607e11 100644
--- a/api/classes/index.CheckBoxSymbolElement.html
+++ b/api/classes/index.CheckBoxSymbolElement.html
@@ -33,7 +33,7 @@ specifying the Unicode character and font to render.
diff --git a/api/classes/index.CheckBoxUtil.html b/api/classes/index.CheckBoxUtil.html
index 22a19ee3e4..3a135b766e 100644
--- a/api/classes/index.CheckBoxUtil.html
+++ b/api/classes/index.CheckBoxUtil.html
@@ -33,7 +33,7 @@ including its checked state and the symbols used for checked and unchecked state
diff --git a/api/classes/index.CommentRangeEnd.html b/api/classes/index.CommentRangeEnd.html
index b12dc77455..a51885f671 100644
--- a/api/classes/index.CommentRangeEnd.html
+++ b/api/classes/index.CommentRangeEnd.html
@@ -36,7 +36,7 @@ Must be paired with a CommentRangeStart with the same ID.
diff --git a/api/classes/index.CommentRangeStart.html b/api/classes/index.CommentRangeStart.html
index 15e1ad0365..714669ca0b 100644
--- a/api/classes/index.CommentRangeStart.html
+++ b/api/classes/index.CommentRangeStart.html
@@ -36,7 +36,7 @@ Must be paired with a CommentRangeEnd with the same ID.
diff --git a/api/classes/index.CommentReference.html b/api/classes/index.CommentReference.html
index 33c9dd8176..961f04a8bb 100644
--- a/api/classes/index.CommentReference.html
+++ b/api/classes/index.CommentReference.html
@@ -36,7 +36,7 @@ It should be placed after the CommentRangeEnd element.
diff --git a/api/classes/index.Comments.html b/api/classes/index.Comments.html
index 6266a4edc9..b479fb3727 100644
--- a/api/classes/index.Comments.html
+++ b/api/classes/index.Comments.html
@@ -35,7 +35,7 @@ threading is activated and thread data is generated for commentsExtended.xml.
diff --git a/api/classes/index.CommentsIds.html b/api/classes/index.CommentsIds.html
index 944b1649e6..cdf738b575 100644
--- a/api/classes/index.CommentsIds.html
+++ b/api/classes/index.CommentsIds.html
@@ -27,7 +27,7 @@ to a stable w16cid:durableId preserved by Word across edits.
diff --git a/api/classes/index.ConcreteHyperlink.html b/api/classes/index.ConcreteHyperlink.html
index e85b89f36e..c7f46fdd20 100644
--- a/api/classes/index.ConcreteHyperlink.html
+++ b/api/classes/index.ConcreteHyperlink.html
@@ -30,7 +30,7 @@ Use InternalHyperlink or ExternalHyperlink for creating hyperlinks in documents.
diff --git a/api/classes/index.DeletedTableCell.html b/api/classes/index.DeletedTableCell.html
index 8878cd7500..389fe51239 100644
--- a/api/classes/index.DeletedTableCell.html
+++ b/api/classes/index.DeletedTableCell.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.DeletedTableRow.html b/api/classes/index.DeletedTableRow.html
index ce05c4a9f9..8a052b0215 100644
--- a/api/classes/index.DeletedTableRow.html
+++ b/api/classes/index.DeletedTableRow.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.DocumentDefaults.html b/api/classes/index.DocumentDefaults.html
index fc796eb0b5..eb1fee44e7 100644
--- a/api/classes/index.DocumentDefaults.html
+++ b/api/classes/index.DocumentDefaults.html
@@ -34,7 +34,7 @@ paragraphs and runs in a document unless overridden by a style or direct formatt
diff --git a/api/classes/index.DrawingPatch.html b/api/classes/index.DrawingPatch.html
index 8cca8fc6ba..191a846701 100644
--- a/api/classes/index.DrawingPatch.html
+++ b/api/classes/index.DrawingPatch.html
@@ -27,7 +27,7 @@ is one: it replaces the data of a chart made in Word.
diff --git a/api/classes/index.EndnoteIdReference.html b/api/classes/index.EndnoteIdReference.html
index 2588666a39..ca6b23c309 100644
--- a/api/classes/index.EndnoteIdReference.html
+++ b/api/classes/index.EndnoteIdReference.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.EndnoteReferenceRunAttributes.html b/api/classes/index.EndnoteReferenceRunAttributes.html
index 551a2d3c73..f3153638a9 100644
--- a/api/classes/index.EndnoteReferenceRunAttributes.html
+++ b/api/classes/index.EndnoteReferenceRunAttributes.html
@@ -30,7 +30,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.Endnotes.html b/api/classes/index.Endnotes.html
index c7764ad731..722df30c8e 100644
--- a/api/classes/index.Endnotes.html
+++ b/api/classes/index.Endnotes.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.ExternalHyperlink.html b/api/classes/index.ExternalHyperlink.html
index 2c2833dd3b..3b00cfe7fb 100644
--- a/api/classes/index.ExternalHyperlink.html
+++ b/api/classes/index.ExternalHyperlink.html
@@ -37,7 +37,7 @@ is converted to a ConcreteHyperlink with the relationship ID.
diff --git a/api/classes/index.FileChild.html b/api/classes/index.FileChild.html
index 78f5e08ae7..d6f97f50c0 100644
--- a/api/classes/index.FileChild.html
+++ b/api/classes/index.FileChild.html
@@ -28,7 +28,7 @@ to the document body. Examples include Paragraph and Table.
diff --git a/api/classes/index.FootNotes.html b/api/classes/index.FootNotes.html
index ef4837b35f..7c93d6f6e9 100644
--- a/api/classes/index.FootNotes.html
+++ b/api/classes/index.FootNotes.html
@@ -36,7 +36,7 @@ line used when footnotes continue across pages.
diff --git a/api/classes/index.FooterWrapper.html b/api/classes/index.FooterWrapper.html
index 9e0be01e58..13aa51ab62 100644
--- a/api/classes/index.FooterWrapper.html
+++ b/api/classes/index.FooterWrapper.html
@@ -29,7 +29,7 @@ Each section can have multiple footers for different page types.
diff --git a/api/classes/index.FootnoteReference.html b/api/classes/index.FootnoteReference.html
index c0c191ec16..2c7499bdb8 100644
--- a/api/classes/index.FootnoteReference.html
+++ b/api/classes/index.FootnoteReference.html
@@ -27,7 +27,7 @@ and the footnote content by using a unique identifier.
diff --git a/api/classes/index.GridSpan.html b/api/classes/index.GridSpan.html
index abf0060272..de0ed98544 100644
--- a/api/classes/index.GridSpan.html
+++ b/api/classes/index.GridSpan.html
@@ -34,7 +34,7 @@ in the table grid. This is used to merge cells horizontally (column span).
diff --git a/api/classes/index.HeaderWrapper.html b/api/classes/index.HeaderWrapper.html
index c43b4ada3e..a646a60250 100644
--- a/api/classes/index.HeaderWrapper.html
+++ b/api/classes/index.HeaderWrapper.html
@@ -29,7 +29,7 @@ Each section can have multiple headers for different page types.
diff --git a/api/classes/index.HpsMeasureElement.html b/api/classes/index.HpsMeasureElement.html
index 3a9d5d5995..66b0c90fa0 100644
--- a/api/classes/index.HpsMeasureElement.html
+++ b/api/classes/index.HpsMeasureElement.html
@@ -33,7 +33,7 @@ Values can be specified as numbers (interpreted as half-points) or with explicit
diff --git a/api/classes/index.IgnoreIfEmptyXmlComponent.html b/api/classes/index.IgnoreIfEmptyXmlComponent.html
index c66b0f7376..cde079f6a6 100644
--- a/api/classes/index.IgnoreIfEmptyXmlComponent.html
+++ b/api/classes/index.IgnoreIfEmptyXmlComponent.html
@@ -39,7 +39,7 @@ to be excluded from the output.
diff --git a/api/classes/index.ImageRun.html b/api/classes/index.ImageRun.html
index 7a402d980c..975ebfe1ec 100644
--- a/api/classes/index.ImageRun.html
+++ b/api/classes/index.ImageRun.html
@@ -33,7 +33,7 @@ including JPG, PNG, GIF, BMP, and SVG. Optionally wraps the run in
diff --git a/api/classes/index.ImportedXmlComponent.html b/api/classes/index.ImportedXmlComponent.html
index fb15e4fa50..79f42331e2 100644
--- a/api/classes/index.ImportedXmlComponent.html
+++ b/api/classes/index.ImportedXmlComponent.html
@@ -30,7 +30,7 @@ templates or when you need to include pre-existing XML fragments.
diff --git a/api/classes/index.InitializableXmlComponent.html b/api/classes/index.InitializableXmlComponent.html
index 590e4ab43a..72a3ef8c34 100644
--- a/api/classes/index.InitializableXmlComponent.html
+++ b/api/classes/index.InitializableXmlComponent.html
@@ -30,7 +30,7 @@ create a new component that shares or extends the children of an existing compon
diff --git a/api/classes/index.InsertedTableCell.html b/api/classes/index.InsertedTableCell.html
index 36e5b1d4e1..647658bf21 100644
--- a/api/classes/index.InsertedTableCell.html
+++ b/api/classes/index.InsertedTableCell.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.InsertedTableRow.html b/api/classes/index.InsertedTableRow.html
index 66b6a312b2..0d3059c01c 100644
--- a/api/classes/index.InsertedTableRow.html
+++ b/api/classes/index.InsertedTableRow.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.InsertedTextRun.html b/api/classes/index.InsertedTextRun.html
index 4b2691924d..7a8ef3674a 100644
--- a/api/classes/index.InsertedTextRun.html
+++ b/api/classes/index.InsertedTextRun.html
@@ -37,7 +37,7 @@ made the insertion and when.
diff --git a/api/classes/index.InternalHyperlink.html b/api/classes/index.InternalHyperlink.html
index a669b4487e..a3f08be80b 100644
--- a/api/classes/index.InternalHyperlink.html
+++ b/api/classes/index.InternalHyperlink.html
@@ -36,7 +36,7 @@ The bookmark must exist in the document for the hyperlink to function.
diff --git a/api/classes/index.LastRenderedPageBreak.html b/api/classes/index.LastRenderedPageBreak.html
index 698504a830..82cc03cf5e 100644
--- a/api/classes/index.LastRenderedPageBreak.html
+++ b/api/classes/index.LastRenderedPageBreak.html
@@ -23,7 +23,7 @@ This is typically generated by Word and not created manually.
diff --git a/api/classes/index.MathDegree.html b/api/classes/index.MathDegree.html
index e338bf6343..366d21313c 100644
--- a/api/classes/index.MathDegree.html
+++ b/api/classes/index.MathDegree.html
@@ -28,7 +28,7 @@ For square roots, this element is typically hidden.
diff --git a/api/classes/index.MathFunctionName.html b/api/classes/index.MathFunctionName.html
index 8958109217..8306b491a8 100644
--- a/api/classes/index.MathFunctionName.html
+++ b/api/classes/index.MathFunctionName.html
@@ -28,7 +28,7 @@ that appears before the function argument.
diff --git a/api/classes/index.MathFunctionProperties.html b/api/classes/index.MathFunctionProperties.html
index 1c221c8b4d..bcd9c1390b 100644
--- a/api/classes/index.MathFunctionProperties.html
+++ b/api/classes/index.MathFunctionProperties.html
@@ -28,7 +28,7 @@ such as function name alignment and spacing.
diff --git a/api/classes/index.MathLimitUpper.html b/api/classes/index.MathLimitUpper.html
index 3a331145b0..6f17a44563 100644
--- a/api/classes/index.MathLimitUpper.html
+++ b/api/classes/index.MathLimitUpper.html
@@ -36,7 +36,7 @@ commonly used for mathematical notation like lim with conditions above.
diff --git a/api/classes/index.MathPreSubSuperScript.html b/api/classes/index.MathPreSubSuperScript.html
index 82e0b2a934..337c49f7c7 100644
--- a/api/classes/index.MathPreSubSuperScript.html
+++ b/api/classes/index.MathPreSubSuperScript.html
@@ -36,7 +36,7 @@ positioned before (to the left of) the base, commonly used in tensor notation.
diff --git a/api/classes/index.MathRadicalProperties.html b/api/classes/index.MathRadicalProperties.html
index afa0392209..331b376e11 100644
--- a/api/classes/index.MathRadicalProperties.html
+++ b/api/classes/index.MathRadicalProperties.html
@@ -28,7 +28,7 @@ such as whether to hide the degree (for square roots).
diff --git a/api/classes/index.MathRun.html b/api/classes/index.MathRun.html
index d55327dd5f..8b6e7f7ca2 100644
--- a/api/classes/index.MathRun.html
+++ b/api/classes/index.MathRun.html
@@ -36,7 +36,7 @@ similar to how Run contains text in regular paragraphs.
diff --git a/api/classes/index.MathSubSuperScript.html b/api/classes/index.MathSubSuperScript.html
index 46f75bc7b9..5373915cf4 100644
--- a/api/classes/index.MathSubSuperScript.html
+++ b/api/classes/index.MathSubSuperScript.html
@@ -36,7 +36,7 @@ commonly used for tensor notation or indexed variables with exponents.
diff --git a/api/classes/index.Media.html b/api/classes/index.Media.html
index 6b80fe9133..d14c406893 100644
--- a/api/classes/index.Media.html
+++ b/api/classes/index.Media.html
@@ -24,7 +24,7 @@ is stored with a unique key for retrieval.
diff --git a/api/classes/index.NextAttributeComponent.html b/api/classes/index.NextAttributeComponent.html
index 1dcfa4ea9a..c37aff0a26 100644
--- a/api/classes/index.NextAttributeComponent.html
+++ b/api/classes/index.NextAttributeComponent.html
@@ -34,7 +34,7 @@ This gives more control but is more verbose than XmlAttributeComponent.
diff --git a/api/classes/index.OnOffElement.html b/api/classes/index.OnOffElement.html
index 599f6cce66..00f99975c5 100644
--- a/api/classes/index.OnOffElement.html
+++ b/api/classes/index.OnOffElement.html
@@ -34,7 +34,7 @@ it is explicitly disabled. When the value is true, the attribute is often omitte
diff --git a/api/classes/index.Packer.html b/api/classes/index.Packer.html
index 37e3bc0254..19ea230297 100644
--- a/api/classes/index.Packer.html
+++ b/api/classes/index.Packer.html
@@ -26,7 +26,7 @@ of the document structure into OOXML format and compression into a .docx ZIP arc
diff --git a/api/classes/index.PageBorders.html b/api/classes/index.PageBorders.html
index e6b80bbfa1..715c2a5ef0 100644
--- a/api/classes/index.PageBorders.html
+++ b/api/classes/index.PageBorders.html
@@ -34,7 +34,7 @@ including which pages display the borders and how they are positioned.
diff --git a/api/classes/index.PageTextDirection.html b/api/classes/index.PageTextDirection.html
index 0f67b74f14..acb4f654f4 100644
--- a/api/classes/index.PageTextDirection.html
+++ b/api/classes/index.PageTextDirection.html
@@ -30,7 +30,7 @@ for all pages in a section.
diff --git a/api/classes/index.Paragraph.html b/api/classes/index.Paragraph.html
index b5e88cc531..6af950bb3f 100644
--- a/api/classes/index.Paragraph.html
+++ b/api/classes/index.Paragraph.html
@@ -36,7 +36,7 @@ various inline elements such as text runs, images, hyperlinks, and bookmarks.
diff --git a/api/classes/index.ParagraphPropertiesChange.html b/api/classes/index.ParagraphPropertiesChange.html
index d6cb4c79b2..b64b003ecf 100644
--- a/api/classes/index.ParagraphPropertiesChange.html
+++ b/api/classes/index.ParagraphPropertiesChange.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.ParagraphPropertiesDefaults.html b/api/classes/index.ParagraphPropertiesDefaults.html
index a47a28e274..44838007a7 100644
--- a/api/classes/index.ParagraphPropertiesDefaults.html
+++ b/api/classes/index.ParagraphPropertiesDefaults.html
@@ -34,7 +34,7 @@ to all paragraphs in the document unless overridden.
diff --git a/api/classes/index.PositionalTab.html b/api/classes/index.PositionalTab.html
index b15c907cc2..a4d12b0650 100644
--- a/api/classes/index.PositionalTab.html
+++ b/api/classes/index.PositionalTab.html
@@ -37,7 +37,7 @@ an exact alignment and position within the paragraph.
diff --git a/api/classes/index.RunPropertiesDefaults.html b/api/classes/index.RunPropertiesDefaults.html
index 8ca485f6e1..71f4377b2a 100644
--- a/api/classes/index.RunPropertiesDefaults.html
+++ b/api/classes/index.RunPropertiesDefaults.html
@@ -34,7 +34,7 @@ to all text runs in the document unless overridden by styles or direct formattin
diff --git a/api/classes/index.SectionProperties.html b/api/classes/index.SectionProperties.html
index ef4658c359..15d757b530 100644
--- a/api/classes/index.SectionProperties.html
+++ b/api/classes/index.SectionProperties.html
@@ -35,7 +35,7 @@ A document can contain multiple sections with different properties.
diff --git a/api/classes/index.SectionPropertiesChange.html b/api/classes/index.SectionPropertiesChange.html
index 874e1f6cea..30e50d75e2 100644
--- a/api/classes/index.SectionPropertiesChange.html
+++ b/api/classes/index.SectionPropertiesChange.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.SimpleField.html b/api/classes/index.SimpleField.html
index f08ede8e74..06e11d2e4b 100644
--- a/api/classes/index.SimpleField.html
+++ b/api/classes/index.SimpleField.html
@@ -40,7 +40,7 @@ Simple fields are typically used for fields that don't require complex nesting.<
diff --git a/api/classes/index.SimpleMailMergeField.html b/api/classes/index.SimpleMailMergeField.html
index 560585cbde..0f6d21bb21 100644
--- a/api/classes/index.SimpleMailMergeField.html
+++ b/api/classes/index.SimpleMailMergeField.html
@@ -30,7 +30,7 @@ It creates a MERGEFIELD that will be populated with data during mail merge.
diff --git a/api/classes/index.StringContainer.html b/api/classes/index.StringContainer.html
index 8f5ac4c750..60024cc99a 100644
--- a/api/classes/index.StringContainer.html
+++ b/api/classes/index.StringContainer.html
@@ -30,7 +30,7 @@ rather than an attribute.
diff --git a/api/classes/index.StringEnumValueElement.html b/api/classes/index.StringEnumValueElement.html
index 73b0cad328..8059aa66d2 100644
--- a/api/classes/index.StringEnumValueElement.html
+++ b/api/classes/index.StringEnumValueElement.html
@@ -33,7 +33,7 @@ type parameter to enforce type safety for enum values.
diff --git a/api/classes/index.StyleForParagraph.html b/api/classes/index.StyleForParagraph.html
index 80b1a2f791..1075db3446 100644
--- a/api/classes/index.StyleForParagraph.html
+++ b/api/classes/index.StyleForParagraph.html
@@ -35,7 +35,7 @@ run-level properties (font, size, color) for text within the paragraph.
diff --git a/api/classes/index.StyleLevel.html b/api/classes/index.StyleLevel.html
index f221e68548..7e3ead073d 100644
--- a/api/classes/index.StyleLevel.html
+++ b/api/classes/index.StyleLevel.html
@@ -20,7 +20,7 @@ custom styles to be included in the table of contents at specific levels.
diff --git a/api/classes/index.Styles.html b/api/classes/index.Styles.html
index bda40ccefa..907612cfe7 100644
--- a/api/classes/index.Styles.html
+++ b/api/classes/index.Styles.html
@@ -35,7 +35,7 @@ a way to define consistent formatting across a document.
diff --git a/api/classes/index.TDirection.html b/api/classes/index.TDirection.html
index c0b62d376f..1d078ca08a 100644
--- a/api/classes/index.TDirection.html
+++ b/api/classes/index.TDirection.html
@@ -34,7 +34,7 @@ useful for creating rotated text or supporting different writing systems.
diff --git a/api/classes/index.Table.html b/api/classes/index.Table.html
index b13f8f8b06..8cf65874cb 100644
--- a/api/classes/index.Table.html
+++ b/api/classes/index.Table.html
@@ -36,7 +36,7 @@ Tables are used to organize content into a grid structure.
diff --git a/api/classes/index.TableCellBorders.html b/api/classes/index.TableCellBorders.html
index c10edabdbd..9c15f6df0e 100644
--- a/api/classes/index.TableCellBorders.html
+++ b/api/classes/index.TableCellBorders.html
@@ -34,7 +34,7 @@ can be configured independently with different styles, colors, and widths.
diff --git a/api/classes/index.TableRow.html b/api/classes/index.TableRow.html
index cd8ac4abb0..dbf7358afe 100644
--- a/api/classes/index.TableRow.html
+++ b/api/classes/index.TableRow.html
@@ -36,7 +36,7 @@ one or more table cells that hold the actual content.
diff --git a/api/classes/index.TableRowProperties.html b/api/classes/index.TableRowProperties.html
index dc454b36d7..5fc34bc7af 100644
--- a/api/classes/index.TableRowProperties.html
+++ b/api/classes/index.TableRowProperties.html
@@ -30,7 +30,7 @@ whether it can split across pages, and whether it's a header row.
diff --git a/api/classes/index.TableRowPropertiesChange.html b/api/classes/index.TableRowPropertiesChange.html
index 2cd03c1a33..58aac44f9c 100644
--- a/api/classes/index.TableRowPropertiesChange.html
+++ b/api/classes/index.TableRowPropertiesChange.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.VerticalMerge.html b/api/classes/index.VerticalMerge.html
index 10ed17d278..67efe8f139 100644
--- a/api/classes/index.VerticalMerge.html
+++ b/api/classes/index.VerticalMerge.html
@@ -35,7 +35,7 @@ This is used to create row spans in tables.
diff --git a/api/classes/index.WpsShapeRun.html b/api/classes/index.WpsShapeRun.html
index 7054d63c59..37af0e0f2d 100644
--- a/api/classes/index.WpsShapeRun.html
+++ b/api/classes/index.WpsShapeRun.html
@@ -28,7 +28,7 @@ options for fills, lines, effects and text layout, and can be any of the preset
diff --git a/api/classes/index.XmlAttributeComponent.html b/api/classes/index.XmlAttributeComponent.html
index 070784cd45..e283e908e6 100644
--- a/api/classes/index.XmlAttributeComponent.html
+++ b/api/classes/index.XmlAttributeComponent.html
@@ -41,7 +41,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.XmlComponent.html b/api/classes/index.XmlComponent.html
index ebb55b19d2..863bf9232d 100644
--- a/api/classes/index.XmlComponent.html
+++ b/api/classes/index.XmlComponent.html
@@ -129,7 +129,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/math.MathBrackets.html b/api/classes/math.MathBrackets.html
index 95075b0c87..01baf6ca48 100644
--- a/api/classes/math.MathBrackets.html
+++ b/api/classes/math.MathBrackets.html
@@ -29,7 +29,7 @@ with what they hold.
diff --git a/api/classes/math.MathLargeOperator.html b/api/classes/math.MathLargeOperator.html
index db16b3669c..b65efb5e37 100644
--- a/api/classes/math.MathLargeOperator.html
+++ b/api/classes/math.MathLargeOperator.html
@@ -28,7 +28,7 @@ it applies to. MathSum and MathIntegral are two of the
diff --git a/api/classes/math.MathMatrix.html b/api/classes/math.MathMatrix.html
index d7316d973f..d5e4cc12ee 100644
--- a/api/classes/math.MathMatrix.html
+++ b/api/classes/math.MathMatrix.html
@@ -30,7 +30,7 @@ and Pages centre every column.
diff --git a/api/classes/math.MathPhantom.html b/api/classes/math.MathPhantom.html
index 56c32206c7..6722a1972c 100644
--- a/api/classes/math.MathPhantom.html
+++ b/api/classes/math.MathPhantom.html
@@ -28,7 +28,7 @@ line things up with it. Or math that is seen but takes up no room, or less, as <
diff --git a/api/classes/shapes.ShapeCanvasRun.html b/api/classes/shapes.ShapeCanvasRun.html
index 42bc7829ae..c376d72c4b 100644
--- a/api/classes/shapes.ShapeCanvasRun.html
+++ b/api/classes/shapes.ShapeCanvasRun.html
@@ -35,7 +35,7 @@ written in mc:AlternateContent, with the group as its fallback, unl
diff --git a/api/classes/shapes.ShapeGroupRun.html b/api/classes/shapes.ShapeGroupRun.html
index 9dbd8e2c99..f5acb7f6ee 100644
--- a/api/classes/shapes.ShapeGroupRun.html
+++ b/api/classes/shapes.ShapeGroupRun.html
@@ -35,7 +35,7 @@ when shapes are moved on a
diff --git a/api/classes/shapes.ShapeRun.html b/api/classes/shapes.ShapeRun.html
index e294e496b8..1ba5e8ef33 100644
--- a/api/classes/shapes.ShapeRun.html
+++ b/api/classes/shapes.ShapeRun.html
@@ -33,7 +33,7 @@ and arrowheads, and text inside it. It sits inline with text unless floati
diff --git a/api/classes/watermarks.ImageWatermark.html b/api/classes/watermarks.ImageWatermark.html
index 394f97e69c..c964aaef58 100644
--- a/api/classes/watermarks.ImageWatermark.html
+++ b/api/classes/watermarks.ImageWatermark.html
@@ -46,7 +46,7 @@ way as an ImageRun.
diff --git a/api/classes/watermarks.TextWatermark.html b/api/classes/watermarks.TextWatermark.html
index 25f55e213d..7063d1e8e8 100644
--- a/api/classes/watermarks.TextWatermark.html
+++ b/api/classes/watermarks.TextWatermark.html
@@ -44,7 +44,7 @@ recognizes it and can remove or replace it through that command.
\n option - causes the field result to be the paragraph number without trailing periods. No information about prior numbered levels is displayed unless it is included as part of the current level.
diff --git a/api/functions/index.convertToXmlComponent.html b/api/functions/index.convertToXmlComponent.html
index ee3ebb8df3..31a5882c93 100644
--- a/api/functions/index.convertToXmlComponent.html
+++ b/api/functions/index.convertToXmlComponent.html
@@ -36,7 +36,7 @@ of the original XML.
diff --git a/api/functions/index.createEmphasisMark.html b/api/functions/index.createEmphasisMark.html
index ccf59f23f3..38259ae921 100644
--- a/api/functions/index.createEmphasisMark.html
+++ b/api/functions/index.createEmphasisMark.html
@@ -37,7 +37,7 @@ text to emphasize it. This is commonly used in East Asian typography.
diff --git a/api/functions/index.createFrameProperties.html b/api/functions/index.createFrameProperties.html
index 493578e537..bd3a7573e8 100644
--- a/api/functions/index.createFrameProperties.html
+++ b/api/functions/index.createFrameProperties.html
@@ -41,7 +41,7 @@ drop cap effects and various text wrapping options.
diff --git a/api/functions/index.createHorizontalPosition.html b/api/functions/index.createHorizontalPosition.html
index 3ccc51e353..ca33e438c3 100644
--- a/api/functions/index.createHorizontalPosition.html
+++ b/api/functions/index.createHorizontalPosition.html
@@ -40,7 +40,7 @@ object relative to a base element (page, margin, column, etc.).
diff --git a/api/functions/index.createMathAccentCharacter.html b/api/functions/index.createMathAccentCharacter.html
index fa96c91ca3..0756d1628b 100644
--- a/api/functions/index.createMathAccentCharacter.html
+++ b/api/functions/index.createMathAccentCharacter.html
@@ -31,7 +31,7 @@ such as summation (∑), integral (∫), or product (∏) symbols.
diff --git a/api/functions/index.createMathNAryProperties.html b/api/functions/index.createMathNAryProperties.html
index 415206aced..6f05ecabd8 100644
--- a/api/functions/index.createMathNAryProperties.html
+++ b/api/functions/index.createMathNAryProperties.html
@@ -31,7 +31,7 @@ and integrals, including the operator character and limit positioning.
diff --git a/api/functions/index.createMathSubScriptElement.html b/api/functions/index.createMathSubScriptElement.html
index 0f65ee7dcb..825a21e77b 100644
--- a/api/functions/index.createMathSubScriptElement.html
+++ b/api/functions/index.createMathSubScriptElement.html
@@ -31,7 +31,7 @@ script objects, and other structures that support subscripts.
diff --git a/api/functions/index.createMathSuperScriptElement.html b/api/functions/index.createMathSuperScriptElement.html
index f8768cd9f8..845f622555 100644
--- a/api/functions/index.createMathSuperScriptElement.html
+++ b/api/functions/index.createMathSuperScriptElement.html
@@ -31,7 +31,7 @@ script objects, and other structures that support superscripts.
diff --git a/api/functions/index.createPageNumberType.html b/api/functions/index.createPageNumberType.html
index c47613d243..8c218b0399 100644
--- a/api/functions/index.createPageNumberType.html
+++ b/api/functions/index.createPageNumberType.html
@@ -37,7 +37,7 @@ for all pages in a section.
diff --git a/api/functions/index.createSectionType.html b/api/functions/index.createSectionType.html
index 3abecea779..2a64fa7f29 100644
--- a/api/functions/index.createSectionType.html
+++ b/api/functions/index.createSectionType.html
@@ -37,7 +37,7 @@ where the new section begins relative to the previous section.
diff --git a/api/functions/index.createTableFloatProperties.html b/api/functions/index.createTableFloatProperties.html
index d60bce7ee8..f09a3ae4a7 100644
--- a/api/functions/index.createTableFloatProperties.html
+++ b/api/functions/index.createTableFloatProperties.html
@@ -38,7 +38,7 @@ The overlap option isn't part of it: the table properties write it as w:tblOverl
diff --git a/api/functions/index.createTableLook.html b/api/functions/index.createTableLook.html
index ae25f0d196..8a89050bb9 100644
--- a/api/functions/index.createTableLook.html
+++ b/api/functions/index.createTableLook.html
@@ -34,7 +34,7 @@ styles to apply special formatting to specific regions of the table.
diff --git a/api/functions/index.createTableRowHeight.html b/api/functions/index.createTableRowHeight.html
index 4810cab0a8..33bb2b3c2c 100644
--- a/api/functions/index.createTableRowHeight.html
+++ b/api/functions/index.createTableRowHeight.html
@@ -38,7 +38,7 @@ determining how the height should be applied.
diff --git a/api/functions/index.createWrapNone.html b/api/functions/index.createWrapNone.html
index 3e621a9960..c5b7f1ff89 100644
--- a/api/functions/index.createWrapNone.html
+++ b/api/functions/index.createWrapNone.html
@@ -23,7 +23,7 @@ without wrapping around it.
diff --git a/api/functions/index.createWrapSquare.html b/api/functions/index.createWrapSquare.html
index a3c6833472..7ca25e72e3 100644
--- a/api/functions/index.createWrapSquare.html
+++ b/api/functions/index.createWrapSquare.html
@@ -32,7 +32,7 @@ of the drawing on the specified side(s).
diff --git a/api/functions/index.createWrapThrough.html b/api/functions/index.createWrapThrough.html
index b7a8a1a049..edcfd944fc 100644
--- a/api/functions/index.createWrapThrough.html
+++ b/api/functions/index.createWrapThrough.html
@@ -36,7 +36,7 @@ fills any open space inside the drawing, such as the middle of a ring.
diff --git a/api/functions/index.createWrapTight.html b/api/functions/index.createWrapTight.html
index e9332d3a6f..b26bb76b06 100644
--- a/api/functions/index.createWrapTight.html
+++ b/api/functions/index.createWrapTight.html
@@ -36,7 +36,7 @@ of the drawing rather than its rectangular bounding box.
diff --git a/api/functions/index.dateTimeValue.html b/api/functions/index.dateTimeValue.html
index d7d801e413..f254e7d11d 100644
--- a/api/functions/index.dateTimeValue.html
+++ b/api/functions/index.dateTimeValue.html
@@ -36,7 +36,7 @@ This matches the xsd:dateTime format required by OOXML.
diff --git a/api/functions/index.fillPartPageNumbers.html b/api/functions/index.fillPartPageNumbers.html
index 08a526325b..7d1a6b99f6 100644
--- a/api/functions/index.fillPartPageNumbers.html
+++ b/api/functions/index.fillPartPageNumbers.html
@@ -35,7 +35,7 @@ are left as they are
diff --git a/api/functions/index.fillSequenceNumbers.html b/api/functions/index.fillSequenceNumbers.html
index 1c188d950d..3f6a7f1205 100644
--- a/api/functions/index.fillSequenceNumbers.html
+++ b/api/functions/index.fillSequenceNumbers.html
@@ -27,7 +27,7 @@ tables of contents are filled in from its headings, as Word leaves a heading's S
diff --git a/api/functions/index.hpsMeasureValue.html b/api/functions/index.hpsMeasureValue.html
index bc9f07c8a5..d191589ee5 100644
--- a/api/functions/index.hpsMeasureValue.html
+++ b/api/functions/index.hpsMeasureValue.html
@@ -36,7 +36,7 @@ HPS (half-points) are commonly used for font sizes.
diff --git a/api/functions/index.patchDocument.html b/api/functions/index.patchDocument.html
index 83eec5fd6f..73fb738a72 100644
--- a/api/functions/index.patchDocument.html
+++ b/api/functions/index.patchDocument.html
@@ -42,7 +42,7 @@ the original document structure and optionally the original formatting.
diff --git a/api/functions/index.universalMeasureToTwips.html b/api/functions/index.universalMeasureToTwips.html
index 784d9ba4d1..49ad137d23 100644
--- a/api/functions/index.universalMeasureToTwips.html
+++ b/api/functions/index.universalMeasureToTwips.html
@@ -35,7 +35,7 @@ Strings are converted according to their unit suffix.
diff --git a/api/functions/layout.estimatePageNumbersWith.html b/api/functions/layout.estimatePageNumbersWith.html
index fc7f0e23f4..2f56b32aa7 100644
--- a/api/functions/layout.estimatePageNumbersWith.html
+++ b/api/functions/layout.estimatePageNumbersWith.html
@@ -32,7 +32,7 @@ options say. Give what it returns to a document as its pageNumbers,
diff --git a/api/functions/layout.layoutDocument.html b/api/functions/layout.layoutDocument.html
index e91df772d6..4e886ad29a 100644
--- a/api/functions/layout.layoutDocument.html
+++ b/api/functions/layout.layoutDocument.html
@@ -40,7 +40,7 @@ text box, it stops, and gives the pages up to there, with why in stoppedAt
diff --git a/api/functions/layout.measureWithPretext.html b/api/functions/layout.measureWithPretext.html
index 48b1d1e9cd..7dd2d4a115 100644
--- a/api/functions/layout.measureWithPretext.html
+++ b/api/functions/layout.measureWithPretext.html
@@ -40,7 +40,7 @@ measures text in another, and Pretext keeps the widths it measured.
diff --git a/api/functions/math.latexToMath.html b/api/functions/math.latexToMath.html
index 052ca0cb4b..7cfc60281e 100644
--- a/api/functions/math.latexToMath.html
+++ b/api/functions/math.latexToMath.html
@@ -44,7 +44,7 @@ cases and aligned equations, with \tag for their numbers. The math
diff --git a/api/interfaces/index.IXmlableObject.html b/api/interfaces/index.IXmlableObject.html
index 28c25f7031..bfa583175f 100644
--- a/api/interfaces/index.IXmlableObject.html
+++ b/api/interfaces/index.IXmlableObject.html
@@ -31,7 +31,7 @@ to generate the final XML output. Objects typically have a structure like:
diff --git a/api/types/charts.BarChartBaseOptions.html b/api/types/charts.BarChartBaseOptions.html
index 362824acbd..54393b5935 100644
--- a/api/types/charts.BarChartBaseOptions.html
+++ b/api/types/charts.BarChartBaseOptions.html
@@ -31,7 +31,7 @@ Default is Office's: -27 for column charts and 0 for bar charts. Stacked bars al
@@ -49,14 +49,14 @@ bar, line or area chart spaces them by date
Sales. 2025: Jan 10, Feb 20.", and none for a decorative chart. An empty description removes it
+
diff --git a/api/types/charts.CategoryChartOptions.html b/api/types/charts.CategoryChartOptions.html
index 9031554248..0a7d15b743 100644
--- a/api/types/charts.CategoryChartOptions.html
+++ b/api/types/charts.CategoryChartOptions.html
@@ -59,7 +59,7 @@ in years, are labelled in rows, the groups below their categories
diff --git a/api/types/charts.ChartAxisCrossing.html b/api/types/charts.ChartAxisCrossing.html
index d51d3ff6b1..d2be0af693 100644
--- a/api/types/charts.ChartAxisCrossing.html
+++ b/api/types/charts.ChartAxisCrossing.html
@@ -20,7 +20,7 @@ the value is the category's number, from 1, or when the categories are dates, a
diff --git a/api/types/charts.ChartAxisGroup.html b/api/types/charts.ChartAxisGroup.html
index 4aa6183c5b..d93072daa5 100644
--- a/api/types/charts.ChartAxisGroup.html
+++ b/api/types/charts.ChartAxisGroup.html
@@ -19,7 +19,7 @@ chart's are along the bottom and the top.
diff --git a/api/types/charts.ChartCategoryGroup.html b/api/types/charts.ChartCategoryGroup.html
index 3b26607ff3..26bc036a28 100644
--- a/api/types/charts.ChartCategoryGroup.html
+++ b/api/types/charts.ChartCategoryGroup.html
@@ -20,7 +20,7 @@ categories, or groups of its own, such as the months of each quarter of each yea
@@ -67,21 +67,21 @@ a point, and where they fit best on a pie. A chart's position is for the series
another way keep Office's, unless their own labels give one
diff --git a/api/types/charts.ChartDataPatchOptions.html b/api/types/charts.ChartDataPatchOptions.html
index 35a05113a5..8abb39fea7 100644
--- a/api/types/charts.ChartDataPatchOptions.html
+++ b/api/types/charts.ChartDataPatchOptions.html
@@ -19,7 +19,7 @@ series' points, or for a stock chart its prices.
diff --git a/api/types/charts.ChartErrorBarsAmount.html b/api/types/charts.ChartErrorBarsAmount.html
index bf4bb349c3..74e99943b6 100644
--- a/api/types/charts.ChartErrorBarsAmount.html
+++ b/api/types/charts.ChartErrorBarsAmount.html
@@ -64,7 +64,7 @@ deviations, or the standard error.
diff --git a/api/types/charts.ChartLineDash.html b/api/types/charts.ChartLineDash.html
index 05b2ca5295..d21e20cb70 100644
--- a/api/types/charts.ChartLineDash.html
+++ b/api/types/charts.ChartLineDash.html
@@ -19,7 +19,7 @@ and so on.
diff --git a/api/types/charts.ChartPointLabel.html b/api/types/charts.ChartPointLabel.html
index b20f341faa..8eb49a86cb 100644
--- a/api/types/charts.ChartPointLabel.html
+++ b/api/types/charts.ChartPointLabel.html
@@ -19,7 +19,7 @@ format and its font. Anything left out is as the series' labels have it.
diff --git a/api/types/charts.ChartTrendline.html b/api/types/charts.ChartTrendline.html
index d69a1316c6..7f7a472373 100644
--- a/api/types/charts.ChartTrendline.html
+++ b/api/types/charts.ChartTrendline.html
@@ -20,7 +20,7 @@ forecast. It is drawn as a dotted line in the series' colour, and has an entry i
@@ -57,7 +57,7 @@ forecast. It is drawn as a dotted line in the series' colour, and has an entry i
along the x axis. Default is 0. Not for moving averages
@@ -73,35 +73,35 @@ the x axis. Default is 0. Not for moving averages
linear, exponential and polynomial trendlines, and above 0 for exponential ones
+
diff --git a/api/types/charts.ChartValueAxis.html b/api/types/charts.ChartValueAxis.html
index 6fc0d63513..3ed0c60bd5 100644
--- a/api/types/charts.ChartValueAxis.html
+++ b/api/types/charts.ChartValueAxis.html
@@ -43,7 +43,7 @@ of 0 or less can't be shown. Default is a linear scale
diff --git a/api/types/charts.ComboChartSeriesType.html b/api/types/charts.ComboChartSeriesType.html
index 830307bd13..4e04fcffec 100644
--- a/api/types/charts.ComboChartSeriesType.html
+++ b/api/types/charts.ComboChartSeriesType.html
@@ -19,7 +19,7 @@ or an area. A chart with series of more than one type is Word's "Combo"
@@ -59,14 +59,14 @@ with undefined, takes the next of the theme's accent colours
one for each slice in the order of the categories, where undefined leaves a slice in. Default is 0
+
diff --git a/api/types/charts.SplitPieChartBaseOptions.html b/api/types/charts.SplitPieChartBaseOptions.html
index 5319fd0d5b..b64f910887 100644
--- a/api/types/charts.SplitPieChartBaseOptions.html
+++ b/api/types/charts.SplitPieChartBaseOptions.html
@@ -42,7 +42,7 @@ second pie or a stacked bar, joined to the slice of the pie that stands for them
diff --git a/api/types/index.AttributePayload.html b/api/types/index.AttributePayload.html
index a6105c5f6c..0393a3f50b 100644
--- a/api/types/index.AttributePayload.html
+++ b/api/types/index.AttributePayload.html
@@ -21,7 +21,7 @@ control over attribute name mapping.
Specifies the additional length, in EMUs, which shall be added to the bottom edge of the DrawingML object to determine its actual bottom edge including effects.
Specifies the additional length, in EMUs, which shall be added to the left edge of the DrawingML object to determine its actual left edge including effects.
Specifies the additional length, in EMUs, which shall be added to the right edge of the DrawingML object to determine its actual right edge including effects.
Specifies the additional length, in EMUs, which shall be added to the top edge of the DrawingML object to determine its actual top edge including effects.
@@ -63,14 +63,14 @@ name. The page references to a bookmark that isn't in it are left blank.
the first of them on may not be Word's. Nothing of them is written into the document.
+
@@ -88,7 +88,7 @@ those in headers, footers and notes.
in headers and footers only on its pages, show. Those of a section whose number is undefined are left blank.
+
diff --git a/api/types/index.GraphicMediaData.html b/api/types/index.GraphicMediaData.html
index b4aa391738..d145e278d9 100644
--- a/api/types/index.GraphicMediaData.html
+++ b/api/types/index.GraphicMediaData.html
@@ -25,7 +25,7 @@ graphic it is. This is how docx/shapes writes its shapes.
diff --git a/api/types/index.IContext.html b/api/types/index.IContext.html
index fc954411fa..befa360b5c 100644
--- a/api/types/index.IContext.html
+++ b/api/types/index.IContext.html
@@ -18,7 +18,7 @@ during the conversion of components to XML.
diff --git a/api/types/index.ICropOptions.html b/api/types/index.ICropOptions.html
index 73fe696bb9..38fa4cee32 100644
--- a/api/types/index.ICropOptions.html
+++ b/api/types/index.ICropOptions.html
@@ -19,7 +19,7 @@ side of the image.
The grid can define a grid which snaps all East Asian characters to grid positions, but leaves Latin text with its default spacing; a grid which adds the specified character pitch to each character on each row; or a grid which affects only the line pitch for the current section.
Specifies that the paragraph (or at least part of it) should be rendered on the same page as the next paragraph when possible. If multiple paragraphs are to be kept together but they exceed a page, then the set of paragraphs begin on a new page and page breaks are used thereafter as needed.
diff --git a/api/types/index.IRunOptions.html b/api/types/index.IRunOptions.html
index ac6d3ef3a7..77bc925e8a 100644
--- a/api/types/index.IRunOptions.html
+++ b/api/types/index.IRunOptions.html
@@ -21,7 +21,7 @@ The children property can contain various inline content elements.
diff --git a/api/types/index.IRunStylePropertiesOptions.html b/api/types/index.IRunStylePropertiesOptions.html
index 842c6807d8..67bad890a3 100644
--- a/api/types/index.IRunStylePropertiesOptions.html
+++ b/api/types/index.IRunStylePropertiesOptions.html
@@ -19,7 +19,7 @@ including font, size, bold, italic, underline, color, and other character format
@@ -140,117 +140,117 @@ including font, size, bold, italic, underline, color, and other character format
highlights all the run's text. docx used to write it as w:highlightCs, which is in no schema.
diff --git a/api/types/index.ITableCellBorders.html b/api/types/index.ITableCellBorders.html
index 0dab03555e..32a647b9bc 100644
--- a/api/types/index.ITableCellBorders.html
+++ b/api/types/index.ITableCellBorders.html
@@ -22,7 +22,7 @@ can be specified for top, bottom, left, right, start, and end edges.
@@ -46,7 +46,7 @@ If relativeHorizontalPosition is also specified, then the absoluteHorizontalPosi
If the attribute is omitted, the value is assumed to be zero.
@@ -57,7 +57,7 @@ If relativeVerticalPosition is also specified, then the absoluteVerticalPosition
If the attribute is omitted, the value is assumed to be zero.
@@ -65,7 +65,7 @@ If the attribute is omitted, the value is assumed to be zero.
below the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -85,7 +85,7 @@ If omitted, the value is assumed to be page.
to the left of the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -121,7 +121,7 @@ inline - the table should be vertically aligned in line with the surrounding tex
top - the table should be vertically aligned to the top edge of the anchor
+
@@ -129,7 +129,7 @@ top - the table should be vertically aligned to the top edge of the anchor
to the right of the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -137,7 +137,7 @@ to the right of the table. The value is in twentieths of a point. If omitted, th
above the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -88,7 +88,7 @@ When true, horizontal banding (alternating row colors) is disabled.
When false or undefined, horizontal banding is enabled if defined in the table style.
+
@@ -97,7 +97,7 @@ When true, vertical banding (alternating column colors) is disabled.
When false or undefined, vertical banding is enabled if defined in the table style.
+
diff --git a/api/types/index.ITableOfContentsOptions.html b/api/types/index.ITableOfContentsOptions.html
index 6718393d89..99c931d32e 100644
--- a/api/types/index.ITableOfContentsOptions.html
+++ b/api/types/index.ITableOfContentsOptions.html
@@ -23,7 +23,7 @@ Options correspond to field switches in the TOC field code.
@@ -59,7 +59,7 @@ The identifier designated by text in this switch's field-argument corresponds to
Use captionLabelIncludingNumbers (\c) to build a table of captions with labels and numbers.
@@ -85,7 +85,7 @@ the bookmark named by text in this switch's field-argument.
that separate an entry and its page number. The default is a tab with leader dots.
+
@@ -96,21 +96,21 @@ to the style with a style ID of HeadingX (e.g. 1 corresponds to Heading1).
If no heading range is specified, all heading levels used in the document are listed.
+
@@ -119,21 +119,21 @@ Page numbers are omitted from all levels unless a range of entry levels is speci
text in this switch's field-argument. A range is specified as for \l.
+
@@ -168,7 +168,7 @@ with each doublet being a comma-separated set of style name and table of content
text in this switch's field-argument (which is typically a letter).
+
@@ -178,14 +178,14 @@ where startLevel and endLevel are integers, and startLevel has a value equal-to
TC fields that assign entries to lower levels are skipped.
+
@@ -76,64 +76,64 @@ parent cell) when the document is packed, so the table renders the same in every
consumer. Supply explicit values to take full control of the grid.
diff --git a/api/types/index.IThemeColorsOptions.html b/api/types/index.IThemeColorsOptions.html
index 91a45caedf..903aad34c1 100644
--- a/api/types/index.IThemeColorsOptions.html
+++ b/api/types/index.IThemeColorsOptions.html
@@ -21,7 +21,7 @@ when the theme's colors change. The colors not given are Office's.
diff --git a/api/types/index.IXmlAttribute.html b/api/types/index.IXmlAttribute.html
index 9377d12a7a..d93610015d 100644
--- a/api/types/index.IXmlAttribute.html
+++ b/api/types/index.IXmlAttribute.html
@@ -17,7 +17,7 @@
numbers, or booleans, which will be converted to strings in the final XML.
diff --git a/api/types/index.MathRunStyle.html b/api/types/index.MathRunStyle.html
index b7490f0b48..7c90e16bbd 100644
--- a/api/types/index.MathRunStyle.html
+++ b/api/types/index.MathRunStyle.html
@@ -23,7 +23,7 @@
alphabet other than roman is plain unless given a style, as LaTeX draws its alphabets upright.
diff --git a/api/types/index.OutputByType.html b/api/types/index.OutputByType.html
index 0bb861e358..5d4fd53bf7 100644
--- a/api/types/index.OutputByType.html
+++ b/api/types/index.OutputByType.html
@@ -24,7 +24,7 @@ format determines the return type. Based on JSZip's output types.
diff --git a/api/types/index.PageNumberEstimator.html b/api/types/index.PageNumberEstimator.html
index e74b3d54f5..222da0c519 100644
--- a/api/types/index.PageNumberEstimator.html
+++ b/api/types/index.PageNumberEstimator.html
@@ -38,7 +38,7 @@ page counts can be written with it.
diff --git a/api/types/index.ParagraphChild.html b/api/types/index.ParagraphChild.html
index 67382005af..9b3aa1d5cb 100644
--- a/api/types/index.ParagraphChild.html
+++ b/api/types/index.ParagraphChild.html
@@ -17,7 +17,7 @@ This union type represents all valid inline content elements that can appear
within a paragraph in WordprocessingML.
@@ -57,7 +57,7 @@ when it opens it, unzipped and read as the template is, by its path in the templ
(captureSpacesBetweenElements), as the spaces in a text element are its text
diff --git a/api/types/index.RelationshipType.html b/api/types/index.RelationshipType.html
index 02bf76a8ee..ee5c849afc 100644
--- a/api/types/index.RelationshipType.html
+++ b/api/types/index.RelationshipType.html
@@ -17,7 +17,7 @@
Each type corresponds to a specific kind of document component or resource.
diff --git a/api/types/index.TableRowsPatch.html b/api/types/index.TableRowsPatch.html
index a62b227f6f..78e96428d4 100644
--- a/api/types/index.TableRowsPatch.html
+++ b/api/types/index.TableRowsPatch.html
@@ -32,7 +32,7 @@ none. The other patches are applied after the rows are repeated, so a placeholde
@@ -55,14 +55,14 @@ A field's patch can repeat rows of a table in the copy in turn, whose fields are
repeated for each part, with its item's fields, and an item without parts has no row
diff --git a/api/types/index.TemplatePageNumberEstimator.html b/api/types/index.TemplatePageNumberEstimator.html
index 3938937615..c62e2d3241 100644
--- a/api/types/index.TemplatePageNumberEstimator.html
+++ b/api/types/index.TemplatePageNumberEstimator.html
@@ -33,7 +33,7 @@ pages, are written with it.
Specifies the height of the containing block of the shape. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the left of the containing block of the shape relative to the element left of it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline.
Specifies the position of the bottom of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the left of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the right of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the top of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the type of positioning used to place an element. Default is static. When the element is contained inside a group, this property must be absolute.
Specifies relative horizontal position data for objects in WordprocessingML documents. This modifies the mso-position-horizontal property. Default is text.
Specifies relative vertical position data for objects in WordprocessingML documents. This modifies the mso-position-vertical property. Default is text.
Specifies the position of the top of the containing block of the shape relative to the element above it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline.
Specifies the width of the containing block of the shape. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the distance from the bottom of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the left side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the right side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the top of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies whether the wrap coordinates were customized by the user. If the wrap coordinates are generated by an editor, this property is true; otherwise they were customized by a user. Default is false.
@@ -45,7 +45,7 @@ file is measured with the upright one. The layout stops at a character a font's
it in another font. A font the document embeds is measured from the document's own file
@@ -60,7 +60,7 @@ nearest to Word's lays it out. It still stops where it has no guess, such as at
is off, so the numbers written are Word's, as near as the layout knows, or blank.
+
@@ -70,7 +70,7 @@ break, and tabs move to their stops, as Word lays them out, and lines are as tal
width tables, so the layout stops at text in a font that isn't in them and isn't given as a file or embedded.
+
diff --git a/api/types/layout.MeasureWidth.html b/api/types/layout.MeasureWidth.html
index a02fda2939..a59191f856 100644
--- a/api/types/layout.MeasureWidth.html
+++ b/api/types/layout.MeasureWidth.html
@@ -33,7 +33,7 @@ between characters and the width of scaled text, which the document's formatting
diff --git a/api/types/shapes.ConnectorEnd.html b/api/types/shapes.ConnectorEnd.html
index 5e66938a76..ba5ea86169 100644
--- a/api/types/shapes.ConnectorEnd.html
+++ b/api/types/shapes.ConnectorEnd.html
@@ -38,7 +38,7 @@ bottom-left corner. On a shape without connection points, the connector ends at
diff --git a/api/types/shapes.CustomShapeGeometry.html b/api/types/shapes.CustomShapeGeometry.html
index dcfa6821eb..f89cc22f9b 100644
--- a/api/types/shapes.CustomShapeGeometry.html
+++ b/api/types/shapes.CustomShapeGeometry.html
@@ -50,7 +50,7 @@ fill the shape. Later paths are drawn over earlier ones
diff --git a/api/types/shapes.CustomShapePath.html b/api/types/shapes.CustomShapePath.html
index f414a85243..c2f0f0746c 100644
--- a/api/types/shapes.CustomShapePath.html
+++ b/api/types/shapes.CustomShapePath.html
@@ -20,7 +20,7 @@ own, so paths can overlap without cutting holes in each other.
diff --git a/api/types/shapes.CustomShapePathFill.html b/api/types/shapes.CustomShapePathFill.html
index 66a8b6187d..93cf9a7f59 100644
--- a/api/types/shapes.CustomShapePathFill.html
+++ b/api/types/shapes.CustomShapePathFill.html
@@ -19,7 +19,7 @@ fill made lighter or darker, as Word's preset shapes shade the top of a cube or
diff --git a/api/types/shapes.IShapeCanvasOptions.html b/api/types/shapes.IShapeCanvasOptions.html
index 8389dc3384..ea6492021a 100644
--- a/api/types/shapes.IShapeCanvasOptions.html
+++ b/api/types/shapes.IShapeCanvasOptions.html
@@ -64,7 +64,7 @@ The shapes are not scaled.
diff --git a/api/types/shapes.IShapeConnectorOptions.html b/api/types/shapes.IShapeConnectorOptions.html
index 1a98d0c80a..ea3b299e4b 100644
--- a/api/types/shapes.IShapeConnectorOptions.html
+++ b/api/types/shapes.IShapeConnectorOptions.html
@@ -23,7 +23,7 @@ or several connectors join the same two shapes, their ends are spread out along
@@ -64,21 +64,21 @@ or several connectors join the same two shapes, their ends are spread out along
shape, so Word doesn't move it when the connector moves
diff --git a/api/types/shapes.IShapeGroupChildOptions.html b/api/types/shapes.IShapeGroupChildOptions.html
index 40f6df6ff7..c02972af3b 100644
--- a/api/types/shapes.IShapeGroupChildOptions.html
+++ b/api/types/shapes.IShapeGroupChildOptions.html
@@ -20,7 +20,7 @@ in pixels, unless a layout places it, and id names it
diff --git a/api/types/shapes.IShapeGroupOptions.html b/api/types/shapes.IShapeGroupOptions.html
index 691ca130c2..52363fa777 100644
--- a/api/types/shapes.IShapeGroupOptions.html
+++ b/api/types/shapes.IShapeGroupOptions.html
@@ -50,7 +50,7 @@ the box around the children. A different size scales every shape in the group.
diff --git a/api/types/shapes.IShapeNestedGroupOptions.html b/api/types/shapes.IShapeNestedGroupOptions.html
index 1636be5be2..dcbe381340 100644
--- a/api/types/shapes.IShapeNestedGroupOptions.html
+++ b/api/types/shapes.IShapeNestedGroupOptions.html
@@ -47,7 +47,7 @@ box around the children, and a different size scales every child
diff --git a/api/types/shapes.IShapeOptions.html b/api/types/shapes.IShapeOptions.html
index 75eae8d92c..3e98a9aba0 100644
--- a/api/types/shapes.IShapeOptions.html
+++ b/api/types/shapes.IShapeOptions.html
@@ -23,7 +23,7 @@ or startAngle and endAngle for a "pie"
diff --git a/api/types/shapes.PresetShapeAdjustments.html b/api/types/shapes.PresetShapeAdjustments.html
index be2783e23d..1a0275d03b 100644
--- a/api/types/shapes.PresetShapeAdjustments.html
+++ b/api/types/shapes.PresetShapeAdjustments.html
@@ -21,7 +21,7 @@ allows, so a value that is too large acts like the largest allowed value.
diff --git a/api/types/shapes.ShapeAdjustments.html b/api/types/shapes.ShapeAdjustments.html
index e62bf1331e..32d27bfccd 100644
--- a/api/types/shapes.ShapeAdjustments.html
+++ b/api/types/shapes.ShapeAdjustments.html
@@ -23,7 +23,7 @@ It is never for shapes without handles, which take no adjustments.<
diff --git a/api/types/shapes.ShapeFlowLayout.html b/api/types/shapes.ShapeFlowLayout.html
index 1e03502f4e..a7b4fc51b8 100644
--- a/api/types/shapes.ShapeFlowLayout.html
+++ b/api/types/shapes.ShapeFlowLayout.html
@@ -20,7 +20,7 @@ that connect to it, and the shapes on each level are ordered so connectors cross
@@ -52,26 +52,26 @@ with a lane goes in the band of that name, and shapes without one g
across the direction the flow runs in, each with a header at the start of the flow
diff --git a/api/types/shapes.ShapeHorizontalPosition.html b/api/types/shapes.ShapeHorizontalPosition.html
index 42af3b99bc..6de4c3f47d 100644
--- a/api/types/shapes.ShapeHorizontalPosition.html
+++ b/api/types/shapes.ShapeHorizontalPosition.html
@@ -26,7 +26,7 @@ a base of the page, the space between its margins, or one of its margins
diff --git a/api/types/shapes.ShapeLayout.html b/api/types/shapes.ShapeLayout.html
index b179a38626..90cc275b49 100644
--- a/api/types/shapes.ShapeLayout.html
+++ b/api/types/shapes.ShapeLayout.html
@@ -20,7 +20,7 @@ layout, which is placed around them. Connectors are routed after the shapes are
diff --git a/api/types/shapes.ShapeSize.html b/api/types/shapes.ShapeSize.html
index 833c25433a..dc9426b449 100644
--- a/api/types/shapes.ShapeSize.html
+++ b/api/types/shapes.ShapeSize.html
@@ -19,7 +19,7 @@ percentage of the space between the page's margins, or of what floating.si
diff --git a/api/types/shapes.ShapeTextWarp.html b/api/types/shapes.ShapeTextWarp.html
index 1fcd9c947f..4cbae86753 100644
--- a/api/types/shapes.ShapeTextWarp.html
+++ b/api/types/shapes.ShapeTextWarp.html
@@ -19,7 +19,7 @@ The ...Filled arches, circle and button spread the text over the wh
diff --git a/api/types/shapes.ShapeThemeColor.html b/api/types/shapes.ShapeThemeColor.html
index 0b10358cd4..e2dc634df6 100644
--- a/api/types/shapes.ShapeThemeColor.html
+++ b/api/types/shapes.ShapeThemeColor.html
@@ -20,7 +20,7 @@ same as docx's ThemeColor, which text, borders and sha
diff --git a/api/types/shapes.ShapeTransformation.html b/api/types/shapes.ShapeTransformation.html
index 37c991e109..b03476c61a 100644
--- a/api/types/shapes.ShapeTransformation.html
+++ b/api/types/shapes.ShapeTransformation.html
@@ -30,7 +30,7 @@ between the margins for a floating shape, such as "100%"<
diff --git a/api/types/shapes.ShapeTreeLayout.html b/api/types/shapes.ShapeTreeLayout.html
index 762b5fb6fa..00b477605b 100644
--- a/api/types/shapes.ShapeTreeLayout.html
+++ b/api/types/shapes.ShapeTreeLayout.html
@@ -20,7 +20,7 @@ children are placed side by side below their parent, which is centred over them.
diff --git a/api/types/shapes.ShapeVerticalPosition.html b/api/types/shapes.ShapeVerticalPosition.html
index 2bd0126172..a3f58da9c5 100644
--- a/api/types/shapes.ShapeVerticalPosition.html
+++ b/api/types/shapes.ShapeVerticalPosition.html
@@ -26,7 +26,7 @@ a base of the page, the space between its margins, or one of its margins
diff --git a/api/variables/index.CharacterSet.html b/api/variables/index.CharacterSet.html
index 3259083cc7..a9b58e310b 100644
--- a/api/variables/index.CharacterSet.html
+++ b/api/variables/index.CharacterSet.html
@@ -60,7 +60,7 @@ Maps character set names to their hexadecimal identifiers.
diff --git a/api/variables/index.DocumentAttributeNamespaces.html b/api/variables/index.DocumentAttributeNamespaces.html
index 41e8158e36..3ddd4235ee 100644
--- a/api/variables/index.DocumentAttributeNamespaces.html
+++ b/api/variables/index.DocumentAttributeNamespaces.html
@@ -94,7 +94,7 @@ in a document, including WordprocessingML, DrawingML, VML, and others.
When this value is set, the input specified via the user interface may be restricted to the number of lines per page and characters per line, with the consumer or producer translating this information based on the current font data to get the resulting line and character pitch values
diff --git a/api/variables/index.DropCapType.html b/api/variables/index.DropCapType.html
index 5982106ef7..a03502161b 100644
--- a/api/variables/index.DropCapType.html
+++ b/api/variables/index.DropCapType.html
@@ -32,7 +32,7 @@ beginning of a paragraph. This enum defines how the drop cap should be positione
diff --git a/api/variables/index.EMPTY_OBJECT.html b/api/variables/index.EMPTY_OBJECT.html
index ff4791622c..f79d277d2b 100644
--- a/api/variables/index.EMPTY_OBJECT.html
+++ b/api/variables/index.EMPTY_OBJECT.html
@@ -20,7 +20,7 @@ has no children or attributes.
diff --git a/api/variables/index.EmphasisMarkType.html b/api/variables/index.EmphasisMarkType.html
index aac7ab911e..2da896d280 100644
--- a/api/variables/index.EmphasisMarkType.html
+++ b/api/variables/index.EmphasisMarkType.html
@@ -31,7 +31,7 @@ Emphasis marks are commonly used in East Asian typography.
Specifies that this header or footer shall appear on the first page in this section. The appearance of this header or footer is contingent on the setting of the titlePg element (§2.10.6).
diff --git a/api/variables/index.LevelFormat.html b/api/variables/index.LevelFormat.html
index 6a30a85419..8ef69181fc 100644
--- a/api/variables/index.LevelFormat.html
+++ b/api/variables/index.LevelFormat.html
@@ -281,7 +281,7 @@ decimal, roman numerals, letters, and various international formats.
diff --git a/api/variables/index.PageTextDirectionType.html b/api/variables/index.PageTextDirectionType.html
index 2adbf3332c..190c54a6cc 100644
--- a/api/variables/index.PageTextDirectionType.html
+++ b/api/variables/index.PageTextDirectionType.html
@@ -28,7 +28,7 @@ vertically (top-to-bottom), commonly used for East Asian languages.
Top-to-bottom, right-to-left (vertical East Asian text flow)
diff --git a/api/variables/index.ShadingType.html b/api/variables/index.ShadingType.html
index b7cda4a0bd..c43ea9b7bb 100644
--- a/api/variables/index.ShadingType.html
+++ b/api/variables/index.ShadingType.html
@@ -103,7 +103,7 @@ color and the pattern color.
diff --git a/api/variables/index.TextEffect.html b/api/variables/index.TextEffect.html
index bd6c1df017..4729262583 100644
--- a/api/variables/index.TextEffect.html
+++ b/api/variables/index.TextEffect.html
@@ -56,7 +56,7 @@ these effects are deprecated and may not be supported by all applications.
diff --git a/api/variables/index.VerticalAlign.html b/api/variables/index.VerticalAlign.html
index eb7a403d09..5c855fa85b 100644
--- a/api/variables/index.VerticalAlign.html
+++ b/api/variables/index.VerticalAlign.html
@@ -32,7 +32,7 @@ backward-compatibility and will be removed in the next major release.
diff --git a/api/variables/index.VerticalAlignTable.html b/api/variables/index.VerticalAlignTable.html
index 98a082e01c..ed0fd8b65e 100644
--- a/api/variables/index.VerticalAlignTable.html
+++ b/api/variables/index.VerticalAlignTable.html
@@ -28,7 +28,7 @@ are valid according to ECMA-376 (§17.18.87 ST_VerticalJc within <w:tcP
diff --git a/api/variables/index.VerticalMergeType.html b/api/variables/index.VerticalMergeType.html
index 6374ec5ec6..4d38764780 100644
--- a/api/variables/index.VerticalMergeType.html
+++ b/api/variables/index.VerticalMergeType.html
@@ -29,7 +29,7 @@ This cell continues a vertical merge started by a cell above it.
This cell begins a new vertical merge region.
diff --git a/api/variables/index.bookmarkUniqueNumericId.html b/api/variables/index.bookmarkUniqueNumericId.html
index 9b8672174d..a36a970f90 100644
--- a/api/variables/index.bookmarkUniqueNumericId.html
+++ b/api/variables/index.bookmarkUniqueNumericId.html
@@ -27,7 +27,7 @@ than a generator per instance.
diff --git a/api/variables/index.docPropertiesUniqueNumericId.html b/api/variables/index.docPropertiesUniqueNumericId.html
index 5d607a3f50..fe133c533d 100644
--- a/api/variables/index.docPropertiesUniqueNumericId.html
+++ b/api/variables/index.docPropertiesUniqueNumericId.html
@@ -28,7 +28,7 @@ one counter rather than a generator per instance.
diff --git a/api/variables/layout.estimatePageNumbers.html b/api/variables/layout.estimatePageNumbers.html
index fec1f0073f..fc69d52097 100644
--- a/api/variables/layout.estimatePageNumbers.html
+++ b/api/variables/layout.estimatePageNumbers.html
@@ -50,7 +50,7 @@ written, and the numbers left blank stay blank, without asking to update the fie
diff --git a/live-examples/lib/layout.iife.js b/live-examples/lib/layout.iife.js
index 56e9a551b7..58f6a2fe44 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -5799,6 +5799,145 @@ var docxLayout = (function(exports) {
return first === void 0 || second === void 0 ? NaN : (_shaping$pairs$get = shaping.pairs.get(first * 4096 + second)) !== null && _shaping$pairs$get !== void 0 ? _shaping$pairs$get : 0;
};
//#endregion
+ //#region src/text-layout/more-widths.ts
+ /**
+ * How wide Word draws the characters of Hebrew, the Arabic-Indic and Devanagari digits, Thai, box drawing, blocks,
+ * geometric shapes, symbols and dingbats in the fonts of the width tables, plain and bold, the font it draws each in, and
+ * how far above and below the baseline those fonts make room in a line.
+ *
+ * Generated by scripts/generate-more-widths.ts from Word's PDF of scripts/layout-probes/stops2/word-stops-more-widths.ts,
+ * saved from Word 16 for Mac. Do not edit by hand.
+ *
+ * @module
+ */
+ /**
+ * The characters the widths are for, as ranges of code points: Hebrew; the Arabic-Indic and Eastern Arabic-Indic digits;
+ * the Devanagari full stops and digits; Thai; and box drawing, block elements, geometric shapes, miscellaneous symbols and
+ * dingbats.
+ */
+ var MORE_WIDTH_RANGES = [
+ [1424, 1535],
+ [1632, 1641],
+ [1776, 1785],
+ [2404, 2415],
+ [3584, 3711],
+ [9472, 10175]
+ ];
+ var FALLBACK_FONTS = [
+ {
+ name: "Mangal",
+ ascent: 1241,
+ descent: 438
+ },
+ {
+ name: "Tahoma",
+ ascent: 1e3,
+ descent: 207
+ },
+ {
+ name: "MS Gothic",
+ ascent: 1008,
+ descent: 289
+ },
+ {
+ name: "Segoe UI Symbol",
+ ascent: 1079,
+ descent: 251
+ },
+ {
+ name: "Arial",
+ ascent: 905,
+ descent: 212
+ },
+ {
+ name: "Cambria Math",
+ ascent: 950,
+ descent: 222
+ },
+ {
+ name: "Apple Color Emoji",
+ ascent: 1e3,
+ descent: 313
+ },
+ {
+ name: "Times New Roman",
+ ascent: 891,
+ descent: 216
+ },
+ {
+ name: "Angsana New",
+ ascent: 941,
+ descent: 410
+ },
+ {
+ name: "MS Mincho",
+ ascent: 1008,
+ descent: 289
+ },
+ {
+ name: "Angsana New",
+ ascent: 964,
+ descent: 421
+ }
+ ];
+ var MORE_WIDTHS = [
+ {
+ name: "Calibri",
+ regular: {
+ widths: "!000*0I0LR0000Au0000000FQ0000000V0000!*071jT1d80VC15w1p20Aa0Jp1q71mx0Aa15B1ak13M1rp1qK0Aa0V01oL1hU1h61ky13W1bS1jT15B1Im1uy!*0418q*020C/11o!*0a1fm*0j11a1vH1hu*09!1t01vM1Ck1w91w91F81cW1mV1wV1x+1Hw26G2201x31x31mV1+r28h25j1w91w91rp1LS1kp1vD1yr1yr1yK1yK1KE1J61x31tE1qv1341oB1wi1x31bN1w91Qh1u/1EH1LJ1t01t01iE1630001bN1bN000*06!*031fc0PU1su1cW1531fV1bN1d/000*071u51u51yK1H21Hw1Ox1Ox1AY1UX1UX1LJ1Iq2Cq!*0z1e82sg1e82sg1e8*0a2sg1e8*022sg1e8*022sg1e8*022sg*021e81e82sg1e81e82sg*021e81e82sg1e81e82sg2sg1e81e82sg2sg1e81e82sg2sg1e81e82sg2sg1e81e82sg2sg1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*021KJ2011JA1r11KJ0S10zu0h11KJ*021NW2iz*0b1uo1uo26B*070Tk0Tk2sg2dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041fQ1lW1sS26B26B1uo26B*071uo1uo26B*0b0Tk26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg*0323I1pc1pc1m42sg1m42sg1Ua1jE1KX20O1nw2sg*0o1GZ1GZ2sg1GZ2sg2sg1GZ2sg0Zh1iX2352dD16w10l13n1vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf3fx*091/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*230*0b-1*0L-11-*0b1*06-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*0O3*034*0s3*0i453343*0243*0243*024*033*0b4-3*07--453*03453363*024343*0263*0243*04-*0233-3*07443*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a66336366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I0LR0000Ct0000000H70000000Wj000!*071lS1dM0Xd16w1pP0C/0Mj1rb1ow0C/15K1ap14n1sp1sb0C/0Wj1rA1ka1j01l/18b1eV1nr15K1MW1vW!*041e3*020Ej13/!*0a1fm*0j11a1vH1hu*09!1Gi1Jh1Ma1Hr1Hr1On1k/1ws1E+1Qh1Uu2jY2ly1IT1IT1uo23I2tk2wD1Hr1Hr1Gi1NM1tj1G81Gr1Gr1O41O41Z81Z81IT1ER1DX1i11Gi1Av1IT1iY1Hw1KE1Av1KX20q1yU1yU1n+1ap0001iY1iY000*06!*031fc0RA1yB1b91b91hU1iX1kS000*071wC1yK1LS1Vp1Ku1VS1VS1Gr2mX1UX24H1VS2z8!*0z1e82vj1e82vj1hb*071e81hb1hb2vj1e81hb1hb2vj1e81hb1hb2vj1e81hb1hb2vj*021hb1hb2vj1hb1hb2vj*021hb1hb2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ2782lI2lI1KJ2lI*021KJ23a1MI1ua1KJ0V90CD0k91KJ*021NW2lI*0b1uo1uo29K*070Tk0Tk2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041jp1lW1sS29K29K1uo29K*071uo1uo29K*0b0Tk29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo*0326Q1sk1sk1pc2vo1pc2vo1Xj1mM1O423W1qF2vo*0o1K61K62vo1K62vo2vo1K62vo10p1m426d2gL19E13s16w1yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn3fx*0922D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*230*0b-1*0L-11-*0b1*06-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*0O3*034*0s3*0i453343*0243*0243*024*033*0b4-3*07--453*03453363*024343*0263*0243*04-*0233-3*07443*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a66336366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Cambria",
+ regular: {
+ widths: "!000*0I0TD0000Ju0000000Hq0000000LD000!*071be1770Qr11t19E0HA0IK1au1ak0FG16G13C13s1fh1bS0GU0LD1af16Z16Z14Q1bo17U1a119f1vn1e8!*041n31le1jk0wG0W4!*0a1ib*0j!*0c0ZU0+c16Z0+c0+v1bC0Nd0Tu12U0/i14L1f51hz11D12r0X31hU1hq1jr0+v0+F0ZK16k0Xn17U16k16k0Z70Z718x18x10J11D0RC0Rs0ZK0ZK10S0Tk0YX14V14M18+1770ZA0V+0+v0TX0000Iy0Iy000*06!*031mx0qf0WW0Rs0LP0RM0JE12r000*0712U0+R0/81oN1fJ1g01ix12K1jL1es0/L19B1/v!*0z1C12sg1C12sg1e8*071C01e81e82sg1C01e81e82sg1C01e81e82sg1C11e81e82sg1C12sg1e81e82sg1e81e82sg1C02sg1e81e82sg1e81e82sg1G31e81e82sg2sg1e81e82sg1G31e81e82sg2sg1e81e82sg2sg1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*0223/2011JA1r11KJ0S10zu0h11KJ1KJ23/1NW2iz*0b1uo1uo26B*072sg*022dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041kf1tS1iY26B26B1uo26B*071uo1uo26B*0b0Tp26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg*0323I1pc1pc1m42sg1m42sg1Ua1jE1KX20O1nw2sg*0n1pr1tS1GZ2sg1GZ2sg2sg1GZ2sg0Zh1iX2352dD16w10l13n1vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*0J7-7--7--7-*087*0q-*047*04-*0a7*0j-*0c8*0L-88-*0b8*06-*078*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*0m3*037*0s3*0i7-3373*02-3*0273*0277-73*0b773*0766753*03753363*027373*0263*0273*04-*023373*07773*0b73*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a6--36366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I0UN0000Q20000000Q20000000Nn000!*071il17J0Vj18A1g20KE0NC1eQ1iJ0My17v15K13/1fV1jk0OV0Nn1aI1fh1c/17q1od1gr1bt18v1HB1gZ!*041te1v91x30DV17U!*0a1nM*0j!*0c0XS10S16N0/811t1d/0OE0Xn12A0+/19r1in1l915p16a0Yk1ib1nH1kS10d11k0+c15T0XS17U15315p10J10J1db1db13H13/0VR0SA0Yu0XS14i0Uh11a15311D18b1oN0XS0Wt14M0SJ0000Io0Io000*06!*031sz0rd0TD0De0Af0Ju0KV0QP000*070TN0Xn0TX1iH1dR1dx1fo0TD1gt1eB0YE1cK20i!*0z1C12vj1C12vj1hb*071C01hb1hb2vj1C01hb1hb2vj1C01hb1hb2vj1C11hb1hb2vj!2vj1hb1hb2vj1hb1hb2vj!2vj1hb1hb2vj1hb1hb2vj!1hb1hb2vj2vj1hb1hb2vj!1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ!2lI2lI1KJ2lI*02!23a1MI1ua1KJ0V90CD0k91KJ1KJ!1NW2lI*0b1uo1uo29K*072vo2vo2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041ni1tS1iY29K29K1uo29K*071uo1uo29K*0b0Tp29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo*0326Q1sk1sk1pc2vo1pc2vo1Xj1mM1O423W1qF2vo*0o!1K62vo1K62vo2vo1K62vo10p1m426d2gL19E13s16w1yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2XD*0922D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*0J7-7--7--7-*087*0q-*047*04-*0a7*0j-*0ca*0L-aa-*0ba*06-*07a*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*0m3*037*0s3*0i7-3373*02-3*0273*0277-73*0b773*0766753*03753363*027373*0263*0273*04-*023373*07773*0b73*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a66-36366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Arial",
+ regular: {
+ widths: "!000*0I0XQ0000GZ0000000Hq0000000T5000!*071n+1kI0+m1fr1u50Cy0XL1tz1sb0Cy1fA18218l1tz1tX0Cy0T51pL1iJ1ow1lo1871aN1lW1fA1Iv1Aq!*041d41d41d30AT11a!*0a1ib*0j11a1vH1hu*09!1t01vM1Ck1w91w91F81cW1mV1wV1x+1Hw26G2201x31x31mV1+r28h25j1w91w91rp1LS1kp1vD1yr1yr1yK1yK1KE1J61x31tE1qv1341oB1wi1x31bN1w91Qh1u/1EH1LJ1t01t01iE1630001bN1bN000*06!*031s10PU1su1cW1531fV1bN1d/000*071u51u51yK1H21Hw1Ox1Ox1AY1UX1UX1LJ1Iq2Cq!*0z1KJ2sg1xG2sg1e8*071KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*021KJ2011JA1r11KJ0S10zu0h11KJ*021NW2iz*0b1uo1uo26B*070Tp0Tp2sg2dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041dd1uo1sS26B26B1uo26B*071uo1uo26B*0b0Tp26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg2sg2vy2Ar2fd1pc1pc1m41Rc1m41Rc1Ua1jE1KX20O1nw2sg*0n1j11GZ1GZ1Cz1GZ1sO1fL1GZ2sg0Zh1e81Rc2dD16w10l1e81vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*02-2*06-2*06-2*06-2*06-2*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I15Q0000KN0000000Q20000000Yi000!*071r11pZ17l1lW1v/0GG10z1wd1xV0GG1hu1cH1dx1vt1yr0GG0Yi1vR1kW1sN1rK1e31f+1pw1hu1LJ1Fd!*041lj*020Hc1eQ!*0a1nM*0j11a1vH1hu*09!1Gi1Jh1Ma1Hr1Hr1On1k/1ws1E+1Qh1Uu2jY2ly1IT1IT1uo23I2tk2wD1Hr1Hr1Gi1NM1tj1G81Gr1Gr1O41O41Z81Z81IT1ER1DX1i11Gi1Av1IT1iY1Hw1KE1Av1KX20q1yU1yU1n+1ap0001iY1iY000*06!*031Hc0RA1yB1b91b91hU1iX1kS000*071wC1yK1LS1Vp1Ku1VS1VS1Gr2mX1UX24H1VS2z8!*0z1KJ2vj1xG2vj1hb*071KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ2782lI2lI1KJ2lI*021KJ23a1MI1ua1KJ0V90CD0k91KJ*021NW2lI*0b1uo1uo29K*070Tp0Tp2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041dd1uo1sS29K29K1uo29K*071uo1uo29K*0b0Tp29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo2vo2vy2Ar2fd1sk1sk1pc1Rc1pc1Rc1Xj1mM1O423W1qF2vo*0n1j11K61K61Cz1K61sO1fL1K62vo10p1e81Rc2gL19E13s1e81yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2++*022/32++*0522D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*02-2*06-2*06-2*06-2*06-2*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Times New Roman",
+ regular: {
+ widths: "!000*0I0TD0000Ju0000000Hq0000000LD000!*071be1770Qr11t19E0HA0IK1au1ak0FG16G13C13s1fh1bS0GU0LD1af16Z16Z14Q1bo17U1a119f1vn1e8!*041n31le1jk0wG0W4!*0a1ib*0j!*0c0ZU0+c16Z0+c0+v1bC0Nd0Tu12U0/i14L1f51hz11D12r0X31hU1hq1jr0+v0+F0ZK16k0Xn17U16k16k0Z70Z718x18x10J11D0RC0Rs0ZK0ZK10S0Tk0YX14V14M18+1770ZA0V+0+v0TX0000Iy0Iy000*06!*0314O0qf0WW0Rs0LP0RM0JE12r000*0712U0+R0/81oN1fJ1g01ix12K1jL1es0/L19B1/v!*0z1KJ2sg1KJ2sg1e8*071KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*021KJ2011JA1r11KJ0S10zu0h11KJ*021NW2iz*0b1uo1uo26B*070Tp0Tp2sg2dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041dd1uo1sS26B26B1uo26B*071uo1uo26B*0b0Tp26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg2sg2vy2Ar2fd1pc1pc1m41Rc1m41Rc1Ua1jE1KX20O1nw2sg*0n1j11GZ1GZ1Cz1GZ1sO1fL1GZ2sg0Zh1e81Rc2dD16w10l1e81vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*2g8*0L-88-*0a8*07-*078*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I0UN0000Q20000000Q20000000Nn000!*071il17J0Vj18A1g20KE0NC1eQ1iJ0My17v15K13/1fV1jk0OV0Nn1aI1fh1c/17q1od1gr1bt18v1HB1gZ!*041te1v91x30DV17U!*0a1nM*0j!*0c0XS10S16N0/811t1d/0OE0Xn12A0+/19r1in1l915p16a0Yk1ib1nH1kS10d11k0+c15T0XS17U15315p10J10J1db1db13H13/0VR0SA0Yu0XS14i0Uh11a15311D18b1oN0XS0Wt14M0SJ0000Io0Io000*06!*0314O0rd0TD0De0Af0Ju0KV0QP000*070TN0Xn0TX1iH1dR1dx1fo0TD1gt1eB0YE1cK20i!*0z1KJ2vj1KJ2vj1hb*071KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ2782lI2lI1KJ2lI*021KJ23a1MI1ua1KJ0V90CD0k91KJ*021NW2lI*0b1uo1uo29K*070Tp0Tp2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041dd1uo1sS29K29K1uo29K*071uo1uo29K*0b0Tp29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo2vo2vy2Ar2fd1sk1sk1pc1Rc1pc1Rc1Xj1mM1O423W1qF2vo*0n1j11K61K61Cz1K61sO1fL1K62vo10p1e81Rc2gL19E13s1e81yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2++*022/32++*0522D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*2ga*0L-aa-*0aa*07-*07a*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Courier New",
+ regular: {
+ widths: "!000*0I1tN0001tN0000001tN0000001tN000!*071tN*0q!*041tN*04!*0a1tN*0j11a1vH1hu*09!1t01vM1Ck1w91w91F81cW1mV1wV1x+1Hw26G2201x31x31mV1+r28g25j1w91w91rp1LS1kp1vD1yr1yr1yK1yK1KE1J61x31tE1qv1341oB1wi1x31bN1w91Qh1u/1EH1LJ1t01t01iE1630001bN1bN000*06!*031s10PU1su1cW1531fV1bN1d/000*071u51u51yK1H21Hw1Ox1Ox1AY1UX1UX1LJ1Iq2Cq!*0z1tN2sg1tN2sg1e8*071tN1e81e82sg1tN1e81e82sg1tN1e81e82sg1tN1e81e82sg1tN2sg1e81e82sg1e81e82sg1tN2sg1e81e82sg1e81e82sg1tN1e81e82sg2sg1e81e82sg1tN1e81e82sg2sg1e81e82sg1tN1e81e82sg1e81e82sg1e8*072sg1e8*031tN*0s1e8*032sg*021e8*0b1tN23/2iz2iz1tN2iz*021tN2011JA1r11tN0S10zu0h11tN*032iz*0b1tN1tN26B*071tN*022dy2sg*031tN1N426B26B2sg26B*021tN26B1tN26B*022sg26B*021tN26B*041tN*0226B26B1tN26B*071tN1tN26B*0b1tN26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg2sg1tN*021pc1pc1m41tN1m41tN1Ua1jE1KX20O1nw2sg*0n1tN1GZ1GZ1tN1GZ1tN1tN1GZ2sg0Zh1tN1tN2dD16w10l1tN1vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I1tN0001tN0000001tN0000001tN000!*071tN*0q!*041tN*04!*0a1tN*0j11a1vH1hu*09!1Gi1Jh1Ma1Hr1Hr1On1k/1ws1E+1Qh1Uu2jY2ly1IT1IT1uo23I2tk2wD1Hr1Hr1Gi1NM1tj1G81Gr1Gr1O41O41Z81Z81IT1ER1DX1i11Gi1Av1IT1iX1Hw1KE1Av1KX20q1yU1yU1n+1ap0001iY1iY000*06!*031Hc0RA1yB1b91b91hU1iX1kS000*071wC1yK1LS1Vp1Ku1VS1VS1Gr2mX1UX24H1VS2z8!*0z1tN2vj1tN2vj1hb*071tN1hb1hb2vj1tN1hb1hb2vj1tN1hb1hb2vj1tN1hb1hb2vj1tN2vj1hb1hb2vj1hb1hb2vj1tN2vj1hb1hb2vj1hb1hb2vj1tN1hb1hb2vj2vj1hb1hb2vj1tN1hb1hb2vj2vj1hb1hb2vj1tN1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031tN*0s1hg*032vo*021hg*0b1tN2782lI2lI1tN2lI*021tN23a1MI1ua1tN0V90CD0k91tN*032lI*0b1tN1tN29K*071tN*022gG2vo*031tN1Qd29K29K2vo29K*021tN29K1tN29K*022vo29K*021tN29K*041tN*0229K29K1tN29K*071tN1tN29K*0b1tN29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo2vo1tN*021sk1sk1pc1tN1pc1tN1Xj1mM1O423W1qF2vo*0n1tN1K61K61tN1K61tN1tN1K62vo10p1tN1tN2gL19E13s1tN1yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2++*022/32++*0522D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ }
+ }
+ ];
+ //#endregion
//#region \0@oxc-project+runtime@0.150.0/helpers/esm/typeof.js
function _typeof(o) {
"@babel/helpers - typeof";
@@ -5889,8 +6028,39 @@ var docxLayout = (function(exports) {
var CHARACTERS = FONT_WIDTH_RANGES.flatMap(([first, last]) => Array.from({ length: last - first + 1 }, (_, offset) => first + offset));
var CHARACTER_INDEX = new Map(CHARACTERS.map((code, index) => [code, index]));
var AVERAGE_LETTERS = [..."abcdefghijklmnopqrstuvwxyz"].map((letter) => CHARACTER_INDEX.get(letter.codePointAt(0)));
+ var MORE_CHARACTER_INDEX = new Map(MORE_WIDTH_RANGES.flatMap(([first, last]) => Array.from({ length: last - first + 1 }, (_, offset) => first + offset)).map((code, index) => [code, index]));
+ var JOINED_SCRIPT = new RegExp("[\\p{Script=Arabic}\\p{Script=Devanagari}]", "u");
var DIGITS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/";
var decoded = /* @__PURE__ */ new Map();
+ var twoDigitsIn = (encoded, at) => DIGITS.indexOf(encoded[at]) * 64 + DIGITS.indexOf(encoded[at + 1]);
+ /**
+ * Reads what a string of `more-widths.ts` says of each character: tokens of `size` characters, or "!" for none, each with
+ * "*" and two digits repeating it that many more times.
+ */
+ var decodeTokens = (encoded, size, read) => {
+ const values = [];
+ let last;
+ for (let at = 0; at < encoded.length;) if (encoded[at] === "*") {
+ values.push(...new Array(twoDigitsIn(encoded, at + 1)).fill(last));
+ at += 3;
+ } else {
+ last = encoded[at] === "!" ? void 0 : read(encoded.slice(at, at + size));
+ values.push(last);
+ at += encoded[at] === "!" ? 1 : size;
+ }
+ return values;
+ };
+ var decodedMore = /* @__PURE__ */ new Map();
+ var decodeMore = ({ widths, fonts }) => {
+ const known = decodedMore.get(widths + fonts);
+ if (known) return known;
+ const face = {
+ widths: decodeTokens(widths, 3, (token) => (DIGITS.indexOf(token[0]) * 4096 + twoDigitsIn(token, 1)) / 10),
+ fonts: decodeTokens(fonts, 1, (token) => token === "-" ? void 0 : DIGITS.indexOf(token))
+ };
+ decodedMore.set(widths + fonts, face);
+ return face;
+ };
/**
* Reads the widths of a font's face, as {@link FontWidths} writes them: the width of each character of the tables, in
* thousandths of an em, or undefined where its width in Word isn't known.
@@ -5898,7 +6068,7 @@ var docxLayout = (function(exports) {
var decodeWidths = (encoded) => {
const known = decoded.get(encoded);
if (known) return known;
- const twoDigitsAt = (at) => DIGITS.indexOf(encoded[at]) * 64 + DIGITS.indexOf(encoded[at + 1]);
+ const twoDigitsAt = (at) => twoDigitsIn(encoded, at);
const widths = [];
let token = 0;
for (let at = 0; at < encoded.length;) {
@@ -6141,6 +6311,16 @@ var docxLayout = (function(exports) {
const widths = widthsOf(font);
return decodeWidths((_encodedFaceOf = encodedFaceOf(widths, bold, italic)) !== null && _encodedFaceOf !== void 0 ? _encodedFaceOf : encodedFaceOf(widths, false, italic));
};
+ /**
+ * The widths of Hebrew, the Arabic-Indic and Devanagari digits, Thai, box drawing, shapes, symbols and dingbats in the face
+ * text is in, and the fonts Word draws them in: its font's, plain or bold. Undefined in italic, whose widths Word's PDF
+ * doesn't show
+ */
+ var moreFaceOf = ({ font, bold, italic }) => {
+ const { name } = widthsOf(font);
+ const more = MORE_WIDTHS.find((known) => known.name === name);
+ return italic || more === void 0 ? void 0 : decodeMore(bold ? more.bold : more.regular);
+ };
var isWide = (code) => code >= 4352 && code <= 4447 || code >= 11904 && code <= 42191 || code >= 44032 && code <= 55203 || code >= 63744 && code <= 64255 || code >= 65072 && code <= 65103 || code >= 65280 && code <= 65376 || code >= 65504 && code <= 65510 || code >= 127744;
var isHalfWidth = (code) => code >= 65377 && code <= 65500;
/**
@@ -6153,14 +6333,18 @@ var docxLayout = (function(exports) {
};
var takesNoRoom = (character) => new RegExp("[\\p{Mn}\\p{Me}\\p{Cf}]", "u").test(character);
/**
- * The width of a character in thousandths of an em. Characters that aren't in the table are as wide as an average
- * lowercase letter, a whole em for wide characters and half an em for half-width ones, and marks take no space. So are
- * those the table has, but whose width in the font isn't known.
+ * The width of a character in thousandths of an em, from the tables, and those of Hebrew, the Arabic-Indic and Devanagari
+ * digits, Thai, box drawing, shapes, symbols and dingbats (`more`), which Word draws in the font, or in another when the
+ * font doesn't have them, such as Calibri's Thai in Tahoma, its Devanagari digits in Mangal and its ★ in Segoe UI Symbol
+ * (scripts/layout-probes/stops2/word-stops-more-widths.ts).
+ * Characters that aren't in them are as wide as an average lowercase letter, a whole em for wide characters and half an
+ * em for half-width ones, and marks take no space. So are those the tables have, but whose width in the font isn't known.
*/
- var characterWidth = (widths, character) => {
+ var characterWidth = (widths, more, character) => {
const code = character.codePointAt(0);
const index = CHARACTER_INDEX.get(code);
- const width = index === void 0 ? void 0 : widths[index];
+ const moreIndex = MORE_CHARACTER_INDEX.get(code);
+ const width = index !== void 0 ? widths[index] : moreIndex !== void 0 ? more === null || more === void 0 ? void 0 : more.widths[moreIndex] : void 0;
if (width !== void 0) return width;
if (isWide(code)) return 1e3;
if (isHalfWidth(code)) return 500;
@@ -6192,26 +6376,64 @@ var docxLayout = (function(exports) {
var measuresOf = (font) => {
var _font$font, _eastAsian$latin;
const eastAsian = eastAsianFontOf((_font$font = font.font) !== null && _font$font !== void 0 ? _font$font : DEFAULT_FONT);
+ const measured = _objectSpread2(_objectSpread2({}, font), {}, { font: (_eastAsian$latin = eastAsian === null || eastAsian === void 0 ? void 0 : eastAsian.latin) !== null && _eastAsian$latin !== void 0 ? _eastAsian$latin : font.font });
return {
- widths: faceOf(_objectSpread2(_objectSpread2({}, font), {}, { font: (_eastAsian$latin = eastAsian === null || eastAsian === void 0 ? void 0 : eastAsian.latin) !== null && _eastAsian$latin !== void 0 ? _eastAsian$latin : font.font })),
+ widths: faceOf(measured),
+ more: moreFaceOf(measured),
monospaced: (eastAsian === null || eastAsian === void 0 ? void 0 : eastAsian.monospaced) === true
};
};
/**
* The first character of text whose width in its font isn't known, so isn't what Word lays out: one of the tables'
- * characters that Word draws in another font when the font doesn't have it, or whose width Word's PDF doesn't show, or a
- * symbol font's own character. Undefined when the widths of all of them are known, or are measured as before: those of
+ * characters that Word draws in another font when the font doesn't have it, or whose width Word's PDF doesn't show, such
+ * as Hebrew and the symbols in italic, Arabic and Devanagari, whose letters Word joins into forms of other widths, the
+ * Devanagari digits of Cambria and Times New Roman, which Word draws in Kohinoor Devanagari, whose lines' height isn't
+ * known, and a symbol font's own character. Undefined when the widths of all of them are known, or are measured as before: those of
* characters the tables don't have, as an average letter.
*/
var unknownCharacter = (text, font = {}) => {
- const { widths, monospaced } = measuresOf(font);
+ const { widths, more, monospaced } = measuresOf(font);
return [...text].find((character) => {
const code = character.codePointAt(0);
const index = CHARACTER_INDEX.get(code);
- return index === void 0 || monospaced ? isPrivate(code) : widths[index] === void 0;
+ const moreIndex = MORE_CHARACTER_INDEX.get(code);
+ if (monospaced || index === void 0 && moreIndex === void 0) return isPrivate(code) || !monospaced && JOINED_SCRIPT.test(character) && !takesNoRoom(character);
+ return index === void 0 ? (more === null || more === void 0 ? void 0 : more.widths[moreIndex]) === void 0 : widths[index] === void 0;
});
};
/**
+ * How tall a line of text is, in points, and how far it goes below its baseline, where Word draws some of its characters
+ * in another font, which makes room for them above and below the baseline as far as it goes: the tallest ascent and
+ * deepest descent of the fonts its characters are drawn in. A line of Thai in Calibri 11 is Tahoma's, 265.5 twips, where
+ * Calibri's are 268.55, and spaces take no part (`word-stops-thai.docx` TH1, `word-stops-more-widths.docx`: lines of
+ * Calibri's ★ and the like in Segoe UI Symbol 10 are 266 twips apart, and 269.6 from a line with Calibri's letters on it).
+ * Undefined for text Word draws all in its own font, as in the tables.
+ */
+ var measureTextHeight = (text, font = {}) => {
+ const { more, monospaced } = measuresOf(font);
+ if (more === void 0 || monospaced || font.lineSize !== void 0) return;
+ const size = sizeOf$3(font);
+ const own = {
+ ascent: measureLineHeight(font) - measureDescent(font),
+ descent: measureDescent(font)
+ };
+ const heights = [...text].filter((character) => !/\s/u.test(character) && !takesNoRoom(character)).map((character) => {
+ const moreIndex = MORE_CHARACTER_INDEX.get(character.codePointAt(0));
+ const fallback = moreIndex === void 0 ? void 0 : more.fonts[moreIndex];
+ return fallback === void 0 ? own : {
+ ascent: FALLBACK_FONTS[fallback].ascent * size / 1e3,
+ descent: FALLBACK_FONTS[fallback].descent * size / 1e3
+ };
+ });
+ if (heights.every((height) => height === own)) return;
+ const ascent = Math.max(...heights.map((height) => height.ascent));
+ const descent = Math.max(...heights.map((height) => height.descent));
+ return {
+ lineHeight: ascent + descent,
+ descent
+ };
+ };
+ /**
* Whether the tables measure text in a font as another font, as they don't have the font's own widths: a font that isn't
* in them and isn't made with the same widths as one that is, such as Roboto, which they measure as the most similar
* font that is. Word draws it with its own widths when it has it, and in another font when it doesn't, such as Cambria
@@ -6241,8 +6463,8 @@ var docxLayout = (function(exports) {
* @param start - Where the text starts on its line, in points
*/
var measureTextWidth = (text, font = {}, start = 0) => {
- const { widths, monospaced } = measuresOf(font);
- const widthOf = monospaced ? monospacedWidth : (character) => characterWidth(widths, character);
+ const { widths, more, monospaced } = measuresOf(font);
+ const widthOf = monospaced ? monospacedWidth : (character) => characterWidth(widths, more, character);
const size = sizeOf$3(font);
const { characterSpacing = 0, scale = 100 } = font;
return [...text].reduce((position, character) => character === " " ? (Math.floor(position / TAB_STOP$2) + 1) * TAB_STOP$2 : position + widthOf(character) * size * scale / 1e5 + characterSpacing, start) - start;
@@ -6257,8 +6479,8 @@ var docxLayout = (function(exports) {
var measureTextWidthAsDrawn = (text, font = {}, start = 0) => {
const shaping = shapingFor(font);
if (shaping === void 0) return measureTextWidth(text, font, start);
- const { widths } = measuresOf(font);
- const widthOf = (character) => characterWidth(widths, character);
+ const { widths, more } = measuresOf(font);
+ const widthOf = (character) => characterWidth(widths, more, character);
const size = sizeOf$3(font);
const { characterSpacing = 0, scale = 100 } = font;
const kerned = kernedIn(font, shaping);
@@ -7116,6 +7338,7 @@ var docxLayout = (function(exports) {
measureWidth: (text, font) => measureTextWidthAsDrawn(text, font),
measureLineHeight,
measureDescent,
+ measureTextHeight,
unknownCharacter,
unknownFont,
unknownShaping
@@ -7392,9 +7615,12 @@ var docxLayout = (function(exports) {
tallest: 0,
picture: 0
};
- /** The heights of a line, with text in this font on it too */
- var withFont = (heights, font, measurer) => {
- var _border$room;
+ /**
+ * The heights of a line, with text in this font on it too: this text, where it is given, which Word may draw some of in
+ * another font that makes room of its own (see `measureTextHeight`)
+ */
+ var withFont = (heights, font, measurer, text) => {
+ var _measurer$measureText, _drawn$lineHeight, _drawn$descent, _border$room;
if (font.listNumber === "separator") return heights;
if (font.listNumber === "number") {
const own = withFont(_objectSpread2(_objectSpread2({}, NOTHING), heights.listNumber), _objectSpread2(_objectSpread2({}, font), {}, { listNumber: void 0 }), measurer);
@@ -7404,8 +7630,9 @@ var docxLayout = (function(exports) {
tallest: own.tallest
} });
}
- const line = measurer.measureLineHeight(font);
- const descent = measurer.measureDescent(font);
+ const drawn = text === void 0 ? void 0 : (_measurer$measureText = measurer.measureTextHeight) === null || _measurer$measureText === void 0 ? void 0 : _measurer$measureText.call(measurer, text, font);
+ const line = (_drawn$lineHeight = drawn === null || drawn === void 0 ? void 0 : drawn.lineHeight) !== null && _drawn$lineHeight !== void 0 ? _drawn$lineHeight : measurer.measureLineHeight(font);
+ const descent = (_drawn$descent = drawn === null || drawn === void 0 ? void 0 : drawn.descent) !== null && _drawn$descent !== void 0 ? _drawn$descent : measurer.measureDescent(font);
const { raise = 0, border, emphasis } = font;
const room = (_border$room = border === null || border === void 0 ? void 0 : border.room) !== null && _border$room !== void 0 ? _border$room : 0;
return _objectSpread2(_objectSpread2({}, heights), {}, {
@@ -7483,14 +7710,14 @@ var docxLayout = (function(exports) {
* and at least a height's in the middle of the grid's lines it takes, so the room below the text can go below the bottom
* of the page, as multiple spacing's can: a line of Times New Roman 8 that ends 82 twips below it is on the page, and one
* of Times New Roman 12 that would end there isn't (G1, G14a). Emphasis marks take their room in the line before it is
- * put on the grid (G11d), with line spacing in a way Word hasn't shown
+ * put on the grid (G11d), and with multiple line spacing too: lines of MS Mincho 10.5 with marks at 1.5 lines are 540
+ * twips on a grid of 360 (stops2/word-stops-east-asian.ts GR3). With at least a height, they haven't been seen
*/
var gridHeightOf = (given, spacing, pitch) => {
var _own$unsupported;
if ((spacing === null || spacing === void 0 ? void 0 : spacing.rule) === "exact") return heightOf(given, spacing);
const own = heightOf(given, void 0);
- const single = spacing === void 0 || spacing.rule === "multiple" && spacing.multiple === 1;
- const unsupported = given.marks !== void 0 && !single ? "emphasis marks on a line with line spacing on a document grid" : (_own$unsupported = own.unsupported) !== null && _own$unsupported !== void 0 ? _own$unsupported : heightOf(given, spacing).unsupported;
+ const unsupported = given.marks !== void 0 && (spacing === null || spacing === void 0 ? void 0 : spacing.rule) === "atLeast" ? "emphasis marks on a line with at least a height of line spacing on a document grid" : (_own$unsupported = own.unsupported) !== null && _own$unsupported !== void 0 ? _own$unsupported : heightOf(given, spacing).unsupported;
const gridded = Math.max(1, Math.ceil(own.height / pitch - GRID_ROUNDING)) * pitch;
const height = spacing === void 0 ? gridded : Math.max(spacing.rule === "multiple" ? spacing.multiple * pitch : spacing.height, gridded);
const below = (((spacing === null || spacing === void 0 ? void 0 : spacing.rule) === "atLeast" ? gridded : height) - own.height) / 2;
@@ -7745,12 +7972,14 @@ var docxLayout = (function(exports) {
* A paragraph's content on a grid of lines and characters, which adds its space after each character of the text on it,
* Chinese, Japanese and Korean or not, and half-width ones too: 39 ideographs of MS Mincho 10.5 on a line of 9026 twips,
* 230 apart, rather than 42, and 10 i's of Times New Roman 10.5 763 twips from the first to the end of the last, rather
- * than 583. Between a Chinese, Japanese or Korean character and a Latin letter, either way, it adds a quarter of the first's
- * size and that space more: 57 twips at 10.5 points and a point more, and 50 at a third of a point less, but nothing next
- * to a space or a note's number (scripts/layout-probes/word-grid.ts CA1 to CA4, CA9, CB1 to CB4, word-grid3.ts H4, H5). A
- * run's own space after each character adds to it (H9), and text in a run that doesn't snap to the grid is as it is
- * without it (CA5, CB5). Where Word puts a space between those characters and numbers or punctuation, or text of another
- * size, isn't known
+ * than 583. Between a Chinese, Japanese or Korean character and a Latin letter in an East Asian font, either way, it adds
+ * a quarter of the first's size and that space more: 57 twips at 10.5 points and a point more, and 50 at a third of a
+ * point less, but nothing next to a space or a note's number (scripts/layout-probes/word-grid.ts CA1 to CA4, CA9, CB1 to
+ * CB4, word-grid3.ts H4, H5). Next to text in another font it adds nothing: digits of Calibri 10.5 between ideographs of
+ * MS Mincho 10.5 are as far from them as from each other, and so are Latin words of Calibri 16 (stops2/word-stops-east-asian.ts
+ * GR4a, GR4c). A run's own space after each character adds to it (H9), and text in a run that doesn't snap to the grid is as
+ * it is without it (CA5, CB5). Where Word puts a space between those characters and numbers or punctuation in an East Asian
+ * font, or its letters of another size, isn't known
*/
var spacedOnGrid = (items, space) => {
const spaced = [];
@@ -7767,10 +7996,11 @@ var docxLayout = (function(exports) {
const font = _objectSpread2(_objectSpread2({}, item.font), {}, { characterSpacing: ((_item$font$characterS = item.font.characterSpacing) !== null && _item$font$characterS !== void 0 ? _item$font$characterS : 0) + space });
for (const character of item.text) {
const kind = item.font.lineSize === void 0 ? kindOnGrid(character) : "space";
- const boundary = kind !== void 0 && kind !== "space" && last !== void 0 && last.kind !== "space" && last.kind === "grid" !== (kind === "grid");
+ const eastAsian = isEastAsianFont(item.font.font);
+ const boundary = kind !== void 0 && kind !== "space" && last !== void 0 && last.kind !== "space" && last.kind === "grid" !== (kind === "grid") && (kind === "grid" ? last.eastAsian : eastAsian);
if (boundary && (last.kind === "other" || kind === "other" || last.size !== size)) {
var _unsupported;
- (_unsupported = unsupported) !== null && _unsupported !== void 0 || (unsupported = "a number, punctuation or text of another size next to an East Asian character on a grid of characters");
+ (_unsupported = unsupported) !== null && _unsupported !== void 0 || (unsupported = "a number, punctuation or text of another size in an East Asian font next to an East Asian character on a grid of characters");
}
if (boundary) {
const before = spaced[last.index];
@@ -7790,25 +8020,65 @@ var docxLayout = (function(exports) {
last = kind === void 0 ? last && _objectSpread2(_objectSpread2({}, last), {}, { index: spaced.length - 1 }) : {
index: spaced.length - 1,
kind,
- size
+ size,
+ eastAsian
};
}
}
return _objectSpread2({ items: spaced.filter((item) => item.type !== "text" || item.text.length > 0) }, unsupported === void 0 ? {} : { unsupported });
};
+ var GRID_TAB = "a tab on a grid that snaps to characters, but for a left one before Chinese, Japanese or Korean text";
+ /** Whether the text after a tab starts with a Chinese, Japanese or Korean character, which a grid that snaps to characters puts in its cells */
+ var startsWithGridCharacter = (tokens) => {
+ const next = tokens.find((token) => token.type !== "marker");
+ const first = (next === null || next === void 0 ? void 0 : next.type) === "word" ? [...textOf$2(next.pieces)][0] : void 0;
+ return first !== void 0 && isGridCharacter(first);
+ };
+ /**
+ * A paragraph's content with its text set across in text that runs down the page as pieces of room of their own, as long
+ * along the line as a line of their font is tall, and with its ascent and descent across it.
+ */
+ var withAcross = (items, measurer) => items.map((item) => {
+ if (item.type !== "text" || item.across !== true) return item;
+ const descent = measurer.measureDescent(item.font);
+ return {
+ type: "box",
+ width: measurer.measureLineHeight(item.font),
+ height: measurer.measureLineHeight(item.font) - descent,
+ descent,
+ font: item.font
+ };
+ });
/**
* Breaks a paragraph into lines, as Word breaks it.
*
* @param items - The paragraph's content, in order
*/
- var layoutLines = (items, { width, format = {}, tabStops = [], defaultTabStop = DEFAULT_TAB_STOP, markFont = {}, measurer = DEFAULT_MEASURER, breakRules, numberAlignment, hyphenation, grid = {}, compatibilityMode }) => {
+ var layoutLines = (paragraphItems, { width, format = {}, tabStops = [], defaultTabStop = DEFAULT_TAB_STOP, markFont = {}, measurer = DEFAULT_MEASURER, breakRules, numberAlignment, hyphenation, grid = {}, compatibilityMode }) => {
var _spaced$items, _spaced$unsupported, _content$;
const { indentLeft = 0, indentRight = 0, firstLineIndent = 0, lineSpacing, alignment } = format;
- const { linePitch, characterSpace, characterPitch: cell } = grid;
+ const items = withAcross(paragraphItems, measurer);
+ const { linePitch, characterSpace, characterPitch, characterRoom } = grid;
+ /**
+ * The width of the cells of a grid that snaps to characters on a line, from its index, when the paragraph is on one: the
+ * section's, or in columns of different widths the column's, as many as there is room for in it, as wide as fill it: 9
+ * of 222.2 twips in a column of 2000, and 29 of 225 in one of 6526, for cells of at least 221
+ * (stops2/word-stops-east-asian.ts GR12)
+ */
+ const cellOn = (line) => {
+ if (characterRoom === void 0) return characterPitch;
+ const room = typeof width === "number" ? width : width(line);
+ const column = typeof room === "number" ? room : room.end;
+ return column / Math.max(1, Math.floor(column / characterRoom + GRID_ROUNDING));
+ };
+ const snapping = characterPitch !== void 0 || characterRoom !== void 0;
const spaced = characterSpace === void 0 ? void 0 : spacedOnGrid(items, characterSpace);
const content = (_spaced$items = spaced === null || spaced === void 0 ? void 0 : spaced.items) !== null && _spaced$items !== void 0 ? _spaced$items : items;
/** The width of the cells a width of text takes on a grid that snaps to characters */
- const cellsOf = (textWidth) => textWidth <= 0 ? 0 : Math.max(1, Math.ceil(textWidth / cell - GRID_ROUNDING)) * cell;
+ const cellsOf = (textWidth) => {
+ const cell = cellOn(lines.length);
+ return textWidth <= 0 ? 0 : Math.max(1, Math.ceil(textWidth / cell - GRID_ROUNDING)) * cell;
+ };
/**
* Where a line goes on to after pieces of text, on a grid that snaps to characters, with what of it isn't Chinese,
* Japanese or Korean. Each of those characters takes as many of the grid's cells as it is wide, and the other text
@@ -7840,8 +8110,9 @@ var docxLayout = (function(exports) {
latin
};
};
- const offCells = cell !== void 0 && [indentLeft, indentLeft + firstLineIndent].some((start) => Math.abs(start / cell - Math.round(start / cell)) > TOLERANCE$2 / cell);
- const shapedOnGrid = (cell !== void 0 || characterSpace !== void 0) && items.some((item) => item.type === "text" && shaped(item.font) && item.font.snapToGrid !== false) ? "kerning or ligatures on a document grid of characters" : void 0;
+ const firstCell = cellOn(0);
+ const offCells = firstCell !== void 0 && [indentLeft, indentLeft + firstLineIndent].some((start) => Math.abs(start / firstCell - Math.round(start / firstCell)) > TOLERANCE$2 / firstCell);
+ const shapedOnGrid = items.some((item) => item.type === "text" && item.font.snapToGrid !== false && (snapping && shaped(item.font) || characterSpace !== void 0 && hasLigatures(item.font))) ? "ligatures on a document grid of characters, or kerning on one that snaps to characters" : void 0;
const unknownOnGrid = offCells ? "an indent of part of a character on a grid that snaps to characters" : (_spaced$unsupported = spaced === null || spaced === void 0 ? void 0 : spaced.unsupported) !== null && _spaced$unsupported !== void 0 ? _spaced$unsupported : shapedOnGrid;
let markHeight;
const markLineHeight = () => {
@@ -7884,7 +8155,8 @@ var docxLayout = (function(exports) {
tallest: Math.max(tallest, token.height + token.descent)
});
}
- return token.type === "tab" ? withFont(heights, token.font, measurer) : token.pieces.reduce((all, { font }) => withFont(all, font, measurer), heights);
+ if (token.type === "space") return token.pieces.reduce((all, { font }) => font.emphasis === void 0 ? all : _objectSpread2(_objectSpread2({}, all), {}, { marks: _objectSpread2(_objectSpread2({}, all.marks), {}, { [font.emphasis]: true }) }), heights);
+ return token.type === "tab" ? withFont(heights, token.font, measurer) : token.pieces.reduce((all, { font, text }) => withFont(all, font, measurer, text), heights);
};
const squeezes = alignment === "justified" || alignment === "distributed" || alignment === "thaiDistributed" || alignment === "lowKashida";
const older = compatibilityMode !== void 0;
@@ -7912,10 +8184,16 @@ var docxLayout = (function(exports) {
const given = typeof width === "number" ? width : width(line);
return typeof given === "number" ? given : given.end;
};
- /** Where a line starts, from its index, and whether it is the paragraph's first */
+ /**
+ * Where a line starts, from its index, and whether it is the paragraph's first. On a grid that snaps to characters, a
+ * line beside a drawing starts at the next of the grid's cells: right of a picture that ends 2880 twips across, on a
+ * grid of cells of 225.65, at 2933.5, the 13th (stops2/word-stops-east-asian.ts GR7b)
+ */
const startOf = (line, isFirst) => {
- var _roomOf$start, _roomOf;
- return (_roomOf$start = (_roomOf = roomOf(line)) === null || _roomOf === void 0 ? void 0 : _roomOf.start) !== null && _roomOf$start !== void 0 ? _roomOf$start : indentLeft + (isFirst ? firstLineIndent : 0);
+ const room = roomOf(line);
+ if (room === void 0) return indentLeft + (isFirst ? firstLineIndent : 0);
+ const cell = cellOn(line);
+ return cell === void 0 ? room.start : Math.ceil(room.start / cell - GRID_ROUNDING) * cell;
};
/**
* Where the line being filled ends: the margin after a tab to one of the paragraph's stops past its right indent, which
@@ -8062,19 +8340,19 @@ var docxLayout = (function(exports) {
const placeWord = (token, kern = 0) => {
var _lastBorder$room2, _lastBorder2, _token$hyphens;
/** How wide the token is on the line, which on a grid that snaps to characters depends on the text before it */
- const widthOn = (state) => token.type === "box" ? token.width : cell === void 0 ? widthOf(token.pieces, measurer) : snapped(state, token.pieces).position - state.position;
+ const widthOn = (state) => token.type === "box" ? !snapping ? token.width : cellsOf(token.width) : !snapping ? widthOf(token.pieces, measurer) : snapped(state, token.pieces).position - state.position;
let tokenWidth = widthOn(line);
const leadOf = (state, wrapped = false) => (token.type === "word" ? roomBetween(state.border, firstBorder(token.pieces)) : 0) + (wrapped ? 0 : kern);
const boxEnd = token.type === "word" ? (_lastBorder$room2 = (_lastBorder2 = lastBorder(token.pieces)) === null || _lastBorder2 === void 0 ? void 0 : _lastBorder2.room) !== null && _lastBorder$room2 !== void 0 ? _lastBorder$room2 : 0 : 0;
const needs = leadOf(line) + tokenWidth + boxEnd;
const hyphens = token.type === "word" ? ((_token$hyphens = token.hyphens) !== null && _token$hyphens !== void 0 ? _token$hyphens : []).filter(({ at }) => at > 0 && at < lengthOf(token.pieces)) : [];
- if (cell !== void 0 && (hyphens.length > 0 || roomOf(lines.length) !== void 0)) {
- var _line$unsupported2;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported2 = line.unsupported) !== null && _line$unsupported2 !== void 0 ? _line$unsupported2 : "a soft hyphen, or a line beside a drawing, on a grid that snaps to characters" });
- }
const skipped = skipRooms(needs, hyphens.length > 0);
const squeezedIn = squeezes && line.started && squeezesIn(line, needs);
if (token.type === "word" && hyphens.length > 0 && !squeezedIn && line.position + needs > endOf(line) + TOLERANCE$2) {
+ if (snapping) {
+ var _line$unsupported2;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported2 = line.unsupported) !== null && _line$unsupported2 !== void 0 ? _line$unsupported2 : "a soft hyphen at the end of a line on a grid that snaps to characters" });
+ }
if (line.started && mayHyphenate(line, token, leadOf(line))) {
var _line$unsupported3;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported3 = line.unsupported) !== null && _line$unsupported3 !== void 0 ? _line$unsupported3 : MAY_HYPHENATE });
@@ -8095,10 +8373,11 @@ var docxLayout = (function(exports) {
var _line$unsupported4;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported4 = line.unsupported) !== null && _line$unsupported4 !== void 0 ? _line$unsupported4 : token.unbroken });
}
- if (overflows && unsure(line, needs)) line = _objectSpread2(_objectSpread2({}, line), {}, { unknown: true });
- const squeezable = overflows && !line.unknown && squeezesIn(line, needs);
- if (squeezable && cell !== void 0) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a justified line on a grid that snaps to characters that only fits squeezed" });
- const squeezed = squeezable && cell === void 0;
+ const neverSqueezed = snapping && alignment === "justified";
+ if (overflows && !neverSqueezed && unsure(line, needs)) line = _objectSpread2(_objectSpread2({}, line), {}, { unknown: true });
+ const squeezable = overflows && !line.unknown && !neverSqueezed && squeezesIn(line, needs);
+ if (squeezable && snapping) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a distributed line on a grid that snaps to characters that only fits squeezed" });
+ const squeezed = squeezable && !snapping;
if (overflows && (!squeezed || alignment !== "justified") && token.type === "word" && mayHyphenate(line, token, leadOf(line))) {
var _line$unsupported5;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported5 = line.unsupported) !== null && _line$unsupported5 !== void 0 ? _line$unsupported5 : MAY_HYPHENATE });
@@ -8109,9 +8388,9 @@ var docxLayout = (function(exports) {
tokenWidth = widthOn(line);
}
line = _objectSpread2(_objectSpread2({}, place(line)), {}, { position: line.position + leadOf(line, skipped || overflows && !squeezed) });
- if (cell !== void 0 && token.type === "word" && line.position + tokenWidth > endOf(line) + TOLERANCE$2) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a word longer than its line on a grid that snaps to characters" });
if (token.type === "word" && !squeezed && line.position + tokenWidth > endOf(line) + TOLERANCE$2 && limitOf() - startOf(lines.length, false) > 0) {
let placed = false;
+ let partStart = line.position;
if (mayHyphenate(line, token, 0)) {
var _line$unsupported6;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported6 = line.unsupported) !== null && _line$unsupported6 !== void 0 ? _line$unsupported6 : MAY_HYPHENATE });
@@ -8130,6 +8409,7 @@ var docxLayout = (function(exports) {
heights: withToken(line.heights, token),
started: true
}));
+ partStart = line.position;
line = _objectSpread2(_objectSpread2({}, line), {}, { position: line.position + room });
onLine = [];
from = line.position;
@@ -8144,9 +8424,20 @@ var docxLayout = (function(exports) {
});
placed = true;
}
+ if (snapping) {
+ const latin = {
+ start: partStart,
+ width: line.position - partStart
+ };
+ line = _objectSpread2(_objectSpread2({}, line), {}, {
+ latin,
+ position: latin.start + cellsOf(latin.width),
+ end: latin.start + cellsOf(latin.width)
+ });
+ }
} else {
const text = token.type === "word" ? textOf$2(token.pieces) : "";
- line = _objectSpread2(_objectSpread2(_objectSpread2({}, line), cell !== void 0 && token.type === "word" ? { latin: snapped(line, token.pieces).latin } : {}), {}, {
+ line = _objectSpread2(_objectSpread2(_objectSpread2({}, line), snapping && token.type === "word" ? { latin: snapped(line, token.pieces).latin } : {}), {}, {
position: line.position + tokenWidth,
end: line.position + tokenWidth,
text: line.text + text,
@@ -8223,7 +8514,7 @@ var docxLayout = (function(exports) {
}
if (token.type === "space") {
const spaces = widthOf(token.pieces, measurer);
- line = _objectSpread2(_objectSpread2(_objectSpread2({}, line), cell === void 0 ? { position: line.position + roomBetween(line.border, firstBorder(token.pieces)) + kerning[index] + spaces } : snapped(line, token.pieces)), {}, {
+ line = _objectSpread2(_objectSpread2(_objectSpread2({}, line), !snapping ? { position: line.position + roomBetween(line.border, firstBorder(token.pieces)) + kerning[index] + spaces } : snapped(line, token.pieces)), {}, {
text: line.text + textOf$2(token.pieces),
spaces: line.started ? line.spaces + spaces : 0,
spaceCount: line.started ? line.spaceCount + lengthOf(token.pieces) : 0,
@@ -8237,12 +8528,13 @@ var docxLayout = (function(exports) {
position: line.position + roomBetween(line.border, void 0),
border: void 0
});
- if (cell !== void 0 && token.type !== "word") line = _objectSpread2(_objectSpread2({}, line), {}, {
- latin: void 0,
- unsupported: "a tab or picture on a grid that snaps to characters"
- });
+ if (snapping && token.type === "box" && (line.latin !== void 0 || token.descent !== void 0)) {
+ var _line$unsupported10;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported10 = line.unsupported) !== null && _line$unsupported10 !== void 0 ? _line$unsupported10 : "an equation, or a picture after text other than Chinese, Japanese or Korean, on a grid that snaps to characters" });
+ }
+ if (snapping && token.type !== "word") line = _objectSpread2(_objectSpread2({}, line), {}, { latin: void 0 });
if (token.type === "tab") {
- var _nextStop, _line$unsupported12;
+ var _nextStop, _line$unsupported15;
const numbered = numberTab ? numberTabStop(line.position, firstLineStops, format, defaultTabStop, limitOf()) : void 0;
numberTab = false;
if ((numbered === null || numbered === void 0 ? void 0 : numbered.unsupported) !== void 0) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: numbered.unsupported });
@@ -8255,12 +8547,12 @@ var docxLayout = (function(exports) {
const pastMargin = own && indentRight < 0 && next.alignment === "left" && next.position > marginOf() + TOLERANCE$2 && next.position + widthAfterTab(rest, measurer) > limitOf() + TOLERANCE$2;
const unknown = pastIndent && squeezes ? "a tab stop past the paragraph's right indent in a justified line" : pastIndent && next.alignment === "left" && next.position + widthAfterTab(rest, measurer) > marginOf() + TOLERANCE$2 ? "text after a tab stop past the paragraph's right indent that goes past the margin" : pastMargin && pastEnd === void 0 ? "text after a left tab stop past the margin, in a paragraph indented past it, that goes past the end of the line" : pastEnd === void 0 ? void 0 : pastEndUnknown(pastEnd, line.started);
if (unknown !== void 0) {
- var _line$unsupported10;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported10 = line.unsupported) !== null && _line$unsupported10 !== void 0 ? _line$unsupported10 : unknown });
+ var _line$unsupported11;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported11 = line.unsupported) !== null && _line$unsupported11 !== void 0 ? _line$unsupported11 : unknown });
}
if (older && !numbered && next.position > limitOf() + TOLERANCE$2) {
- var _line$unsupported11;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported11 = line.unsupported) !== null && _line$unsupported11 !== void 0 ? _line$unsupported11 : "a tab past the end of the line in a document in compatibility mode" });
+ var _line$unsupported12;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported12 = line.unsupported) !== null && _line$unsupported12 !== void 0 ? _line$unsupported12 : "a tab past the end of the line in a document in compatibility mode" });
}
if ((pastEnd === null || pastEnd === void 0 ? void 0 : pastEnd.alignment) === "left" && unknown === void 0) {
const below = line.started ? wrap(line) : line;
@@ -8278,19 +8570,26 @@ var docxLayout = (function(exports) {
alignment: "right"
} : pastIndent ? next : (_nextStop = nextStop(line.position, given, defaultTabStop, limitOf())) !== null && _nextStop !== void 0 ? _nextStop : line.started ? nextStop(startOf(lines.length + 1, false), stops, defaultTabStop, limitOf(lines.length + 1)) : void 0;
if (stop === void 0) {
+ var _line$unsupported13;
line = _objectSpread2(_objectSpread2({}, line), {}, {
end: line.position,
text: `${line.text}\t`,
heights: withToken(line.heights, token),
started: true
- });
+ }, !snapping ? {} : { unsupported: (_line$unsupported13 = line.unsupported) !== null && _line$unsupported13 !== void 0 ? _line$unsupported13 : GRID_TAB });
continue;
}
if (!numbered && stop.position <= line.position + TOLERANCE$2) line = wrap(line);
line = _objectSpread2(_objectSpread2({}, place(line)), pastIndent ? { pastIndent } : {});
const shift = shiftAt(stop.alignment, rest, measurer, line.border);
const misaligned = shift === void 0 ? "text at a decimal tab stop that Word hasn't been seen lining up" : void 0;
- const position = Math.max(line.position, stop.position - (shift !== null && shift !== void 0 ? shift : widthAfterTab(rest, measurer)));
+ const stopped = Math.max(line.position, stop.position - (shift !== null && shift !== void 0 ? shift : widthAfterTab(rest, measurer)));
+ const cell = cellOn(lines.length);
+ const position = cell === void 0 ? stopped : Math.ceil(stopped / cell - GRID_ROUNDING) * cell;
+ if (snapping && (stop.alignment !== "left" || !startsWithGridCharacter(rest))) {
+ var _line$unsupported14;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported14 = line.unsupported) !== null && _line$unsupported14 !== void 0 ? _line$unsupported14 : GRID_TAB });
+ }
line = _objectSpread2(_objectSpread2({}, line), {}, {
position,
end: position,
@@ -8302,7 +8601,7 @@ var docxLayout = (function(exports) {
letters: 0,
otherSpaces: 0,
started: true
- }, misaligned === void 0 ? {} : { unsupported: (_line$unsupported12 = line.unsupported) !== null && _line$unsupported12 !== void 0 ? _line$unsupported12 : misaligned });
+ }, misaligned === void 0 ? {} : { unsupported: (_line$unsupported15 = line.unsupported) !== null && _line$unsupported15 !== void 0 ? _line$unsupported15 : misaligned });
continue;
}
placeWord(token, kerning[index]);
@@ -8830,6 +9129,10 @@ var docxLayout = (function(exports) {
const face = faceOf(font);
return face ? face.descent * ((_ref3 = (_font$lineSize2 = font.lineSize) !== null && _font$lineSize2 !== void 0 ? _font$lineSize2 : font.size) !== null && _ref3 !== void 0 ? _ref3 : 10) : fallback.measureDescent(font);
},
+ measureTextHeight: (text, font) => {
+ var _fallback$measureText;
+ return faceOf(font) ? void 0 : (_fallback$measureText = fallback.measureTextHeight) === null || _fallback$measureText === void 0 ? void 0 : _fallback$measureText.call(fallback, text, font);
+ },
unknownCharacter: (text, font) => {
var _fallback$unknownChar;
const face = faceOf(font);
@@ -32754,20 +33057,38 @@ var docxLayout = (function(exports) {
var isTwoInOne = (properties) => isOn(attributesOf(find(properties, "w:eastAsianLayout"))["w:combine"]);
/**
* Why a run's own formatting changes the room its text takes in a way not yet followed, when it does: text fitted to a
- * width (`w:fitText`), text across in vertical text (`w:eastAsianLayout`), and two lines in one of other than text
- * without Chinese, Japanese or Korean characters, without brackets and at a size that halves to whole half-points. Word drew
- * "twolines" in two lines in one in a line of Calibri 11 at 5.5 points, on one row, its width the text's at that size, in
- * a line no taller (scripts/layout-probes/stops2/word-stops-text.ts RF30).
+ * width (`w:fitText`), text across in vertical text (`w:eastAsianLayout`), but for text set across in text that runs
+ * down the page, as Word sets it there (see {@link acrossOf}), unless it is compressed to fit its line (`w:vertCompress`),
+ * and two lines in one of other than text without Chinese, Japanese or Korean characters, without brackets and at a size
+ * that halves to whole half-points, across the page. Word drew "twolines" in two lines in one in a line of Calibri 11 at
+ * 5.5 points, on one row, its width the text's at that size, in a line no taller (scripts/layout-probes/stops2/word-stops-text.ts
+ * RF30). In text that runs down the page, raised text and small capitals, which Word's PDF showed taking other room than
+ * across it, aren't followed either (stops2/word-stops-east-asian.ts VD3c, VD3e: a line 14 twips wider with text raised 6
+ * points, and small capitals of 10.5 points drawn at 8.4).
*/
- var unsupportedFormatOf = (properties, children, size) => {
- const { "w:combineBrackets": brackets, "w:vert": across } = attributesOf(find(properties, "w:eastAsianLayout"));
+ var unsupportedFormatOf = (properties, children, size, format, down) => {
+ var _format$position;
+ const { "w:combineBrackets": brackets, "w:vert": across, "w:vertCompress": compressed } = attributesOf(find(properties, "w:eastAsianLayout"));
if (find(properties, "w:fitText") !== void 0) return "text fitted to a width";
if (isTwoInOne(properties)) {
const text = children.filter((child) => nameOf$1(child) === "w:t").flatMap((child) => contentOf$3(child).filter((part) => typeof part === "string"));
const shown = children.filter((child) => nameOf$1(child) !== "w:rPr" && nameOf$1(child) !== "_attr");
- return brackets !== void 0 && brackets !== "none" || shown.some((child) => nameOf$1(child) !== "w:t") || [...text.join("")].some(isEastAsian) || !Number.isInteger(size) ? "two lines in one" : void 0;
+ return down || brackets !== void 0 && brackets !== "none" || shown.some((child) => nameOf$1(child) !== "w:t") || [...text.join("")].some(isEastAsian) || !Number.isInteger(size) ? "two lines in one" : void 0;
}
- return isOn(across) ? "text across in vertical text" : void 0;
+ if (isOn(across) && (!down || isOn(compressed))) return "text across in vertical text";
+ return down && (format.smallCaps === true || ((_format$position = format.position) !== null && _format$position !== void 0 ? _format$position : 0) !== 0) ? "raised text or small capitals in text that runs down the page" : void 0;
+ };
+ var MOST_ACROSS = 2;
+ /**
+ * Whether a run's text is set across in text that runs down the page (`w:eastAsianLayout w:vert`), or why it can't be laid
+ * out as Word sets it, when it can't. Word sets two digits of Calibri 10.5 across a line of MS Mincho 10.5, in as much room
+ * along it as a line of them is tall, 257 twips, and the line no wider (stops2/word-stops-east-asian.ts VD13). More of them,
+ * and Chinese, Japanese or Korean characters, haven't been seen.
+ */
+ var acrossOf = (properties, text, down) => {
+ if (!down || !isOn(attributesOf(find(properties, "w:eastAsianLayout"))["w:vert"])) return false;
+ const characters = [...text];
+ return characters.length > MOST_ACROSS || characters.some(isGridCharacter) ? "text across in vertical text of more than two characters, or Chinese, Japanese or Korean ones" : true;
};
/**
* Reads a run (`w:r`) in the paragraph's formatting, as its character style and its own formatting change it, and when it
@@ -32786,7 +33107,8 @@ var docxLayout = (function(exports) {
const size = (_formatted$size = formatted.size) !== null && _formatted$size !== void 0 ? _formatted$size : 10;
const format = isTwoInOne(childrenOf(properties)) ? _objectSpread2(_objectSpread2({}, formatted), {}, { size: size / 2 }) : formatted;
const font = fontOf(format);
- const unsupportedFormat = (_unsupportedFormatOf = unsupportedFormatOf(childrenOf(properties), children, size)) !== null && _unsupportedFormatOf !== void 0 ? _unsupportedFormatOf : format.hidden ? void 0 : unknownRunFormatting(format);
+ const down = reader.down === true;
+ const unsupportedFormat = (_unsupportedFormatOf = unsupportedFormatOf(childrenOf(properties), children, size, format, down)) !== null && _unsupportedFormatOf !== void 0 ? _unsupportedFormatOf : format.hidden ? void 0 : unknownRunFormatting(format);
let formatGuessed = false;
const items = children.map((child) => {
const name = nameOf$1(child);
@@ -32805,17 +33127,22 @@ var docxLayout = (function(exports) {
}
switch (name) {
case "w:t":
- case "w:delText": return contentOf$3(child).filter((part) => typeof part === "string").join("").split(" ").flatMap((part, index) => [...index > 0 && !format.hidden ? [{
- type: "tab",
- font
- }] : [], ...(part.length === 0 ? [] : spansOf(part, format)).map((_ref) => {
- let { text } = _ref;
- return _objectSpread2(_objectSpread2(_objectSpread2({
- type: "text",
- text,
- font: _objectWithoutProperties(_ref, _excluded)
- }, format.eastAsianLanguage === void 0 ? {} : { language: format.eastAsianLanguage }), isEastAsianRun(format) ? { eastAsian: true } : {}), hyphenationOf(format));
- })]);
+ case "w:delText": {
+ const content = contentOf$3(child).filter((part) => typeof part === "string").join("");
+ const across = acrossOf(childrenOf(properties), content, down);
+ const read = () => content.split(" ").flatMap((part, index) => [...index > 0 && !format.hidden ? [{
+ type: "tab",
+ font
+ }] : [], ...(part.length === 0 ? [] : spansOf(part, format)).map((_ref) => {
+ let { text } = _ref;
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
+ type: "text",
+ text,
+ font: _objectWithoutProperties(_ref, _excluded)
+ }, format.eastAsianLanguage === void 0 ? {} : { language: format.eastAsianLanguage }), isEastAsianRun(format) ? { eastAsian: true } : {}), hyphenationOf(format)), across === true ? { across } : {});
+ })]);
+ return typeof across === "string" ? guessedOr(reader, across, read) : read();
+ }
case "w:tab":
case "w:ptab": return format.hidden ? [] : [{
type: "tab",
@@ -33166,7 +33493,7 @@ var docxLayout = (function(exports) {
});
return current;
};
- var THAI_OR_ARABIC = new RegExp("[\\p{Script=Thai}\\p{Script=Arabic}]", "u");
+ var ARABIC = new RegExp("\\p{Script=Arabic}", "u");
var SQUEEZED_ALIGNMENTS = /* @__PURE__ */ new Set([
"distributed",
"thaiDistributed",
@@ -33298,19 +33625,22 @@ var docxLayout = (function(exports) {
outline: JSON.stringify([...outline, ...indents])
};
};
- var HALF_WIDTH = /[\uff61-\uffdc]/u;
/**
- * Why a paragraph of text that runs down the page can't be laid out yet, when it can't: Word's PDFs showed lines of
+ * Why a paragraph of text that runs down the page can't be laid out yet, when it can't. Word's PDFs showed lines of
* ideographs, kana and punctuation in fonts whose characters are all an em, each an em down the line, and Latin text on
- * its side, as wide as it is across a page (scripts/layout-probes/word-vertical.ts V1, V4), but not the rest
+ * its side, as wide as it is across a page (scripts/layout-probes/word-vertical.ts V1, V4), and half-width katakana on
+ * their side too, half an em each; a left tab stop, borders round text and round the paragraph, emphasis marks, text in
+ * superscript and a justified line with spaces, each taking the room it takes across the page; and a footnote below the
+ * text, at the left of the page (stops2/word-stops-east-asian.ts VD1a, VD2b, VD3a, VD3b, VD3d, VD4, VD5, VD6a). Text in a
+ * font whose characters aren't all an em, which Word draws in room of their own down the line (VD2a: MS PMincho's kana
+ * 139 to 210 twips at 10.5 points), a picture in the line, which Word puts in the middle of the line (VD1c), a drawing
+ * that text wraps around, which Word places against the page as it is, not turned (VD1d), and a soft hyphen at the end of
+ * a line, aren't followed yet.
*/
- var unknownDownOf = (items, format, borders) => {
- const texts = items.flatMap((item) => item.type === "text" ? [item] : []);
- if (items.some((item) => item.type === "tab" || item.type === "box" || item.type === "softHyphen" || item.type === "drawing")) return "a tab, soft hyphen, picture or drawing in text that runs down the page";
- if (texts.some(({ text, font }) => HALF_WIDTH.test(text) || new RegExp("[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]", "u").test(text) && !isMonospacedEastAsianFont(font.font))) return "East Asian text down the page in a font whose characters aren't all an em, or half-width";
- if (texts.some(({ font }) => font.border !== void 0 || font.emphasis !== void 0 || font.raise !== void 0 || font.lineSize !== void 0)) return "run formatting in text that runs down the page that Word hasn't been seen laying out";
- if (borders !== void 0) return "a paragraph border on text that runs down the page";
- return (format.alignment === "justified" || format.alignment === "distributed") && texts.some(({ text }) => / /.test(text)) ? "a justified line with spaces down the page" : void 0;
+ var unknownDownOf = (items, tabStops) => {
+ if (items.some((item) => item.type === "box" || item.type === "softHyphen" || item.type === "drawing")) return "a soft hyphen, picture or drawing in text that runs down the page";
+ if (items.some((item) => item.type === "tab") && tabStops.some(({ alignment }) => alignment !== "left")) return "a tab to a stop other than a left one in text that runs down the page";
+ return items.some((item) => item.type === "text" && new RegExp("[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]", "u").test(item.text) && !isMonospacedEastAsianFont(item.font.font)) ? "East Asian text down the page in a font whose characters aren't all an em" : void 0;
};
/**
* The text frame a paragraph is in (`w:framePr`), its own or its style's, or why it can't be laid out: one in a table
@@ -33366,8 +33696,14 @@ var docxLayout = (function(exports) {
const paragraphGrid = sectionGrid && withoutUndefined({
linePitch: grid !== void 0 && combined.snapToGrid !== false ? grid.linePitch : void 0,
characterSpace: sectionGrid.characterSpace,
- characterPitch: sectionGrid.characterPitch
+ characterPitch: sectionGrid.characterPitch,
+ characterRoom: sectionGrid.characterRoom
});
+ const ownCells = (sectionGrid === null || sectionGrid === void 0 ? void 0 : sectionGrid.characterRoom) !== void 0 && (grid === void 0 || reader.inNote === true || [
+ combined.indentLeftChars,
+ combined.indentRightChars,
+ combined.firstLineChars
+ ].some((count) => (count !== null && count !== void 0 ? count : 0) !== 0)) ? "a table, note or indent in characters on a grid that snaps to characters in columns of different widths" : void 0;
const format = inPoints(combined, {
listNumber: list.items,
items: own
@@ -33376,13 +33712,8 @@ var docxLayout = (function(exports) {
const forThaiOrArabic = combined.alignment === "thaiDistributed" || combined.alignment === "lowKashida";
const tabStops = tabStopsOf(formats);
const otherDecimalSymbol = reader.decimalSymbol !== void 0 && reader.decimalSymbol !== "." && tabStops.some(({ alignment }) => alignment === "decimal");
- const snapping = (sectionGrid === null || sectionGrid === void 0 ? void 0 : sectionGrid.characterPitch) !== void 0;
- const unknownOnGrid = snapping && reader.inNote === true ? "a footnote on a grid that snaps to characters" : snapping && own.some((item) => {
- var _item$font$characterS;
- return item.type === "text" && ((_item$font$characterS = item.font.characterSpacing) !== null && _item$font$characterS !== void 0 ? _item$font$characterS : 0) !== 0 && item.font.snapToGrid !== false;
- }) ? "text spaced out by its run on a grid that snaps to characters" : void 0;
const frame = readFrameOf(properties, styleChain(styles, style, "paragraph"), reader);
- const unsupported = (_ref4 = (_ref5 = (_ref6 = (_list$unsupported = list.unsupported) !== null && _list$unsupported !== void 0 ? _list$unsupported : unknownOnGrid) !== null && _ref6 !== void 0 ? _ref6 : reader.down === true && reader.inNote === true ? "a footnote or endnote on text that runs down the page" : void 0) !== null && _ref5 !== void 0 ? _ref5 : reader.down === true ? unknownDownOf(own, combined, borders) : void 0) !== null && _ref4 !== void 0 ? _ref4 : typeof frame === "string" ? frame : otherDecimalSymbol ? "a decimal tab stop in a document whose decimal symbol isn't a full stop" : find(properties, "w:divId") !== void 0 ? "a paragraph in an HTML division" : combined.alignment === "mediumKashida" || combined.alignment === "highKashida" ? "a paragraph justified for Arabic with a medium or high kashida" : forThaiOrArabic && typeof items !== "string" && items.some((item) => item.type === "text" && THAI_OR_ARABIC.test(item.text)) ? "Thai or Arabic text justified for it" : (_ref7 = (_ref8 = (_unknownInOlderLayout = unknownInOlderLayout(content, combined.alignment, reader)) !== null && _unknownInOlderLayout !== void 0 ? _unknownInOlderLayout : unknownLengthIn(element)) !== null && _ref8 !== void 0 ? _ref8 : typeof format === "string" ? format : void 0) !== null && _ref7 !== void 0 ? _ref7 : typeof borders === "string" ? borders : void 0;
+ const unsupported = (_ref4 = (_ref5 = (_ref6 = (_list$unsupported = list.unsupported) !== null && _list$unsupported !== void 0 ? _list$unsupported : ownCells) !== null && _ref6 !== void 0 ? _ref6 : reader.eastAsianRules !== void 0 && own.some((item) => item.type === "text" && kinsokuLanguageOf(item.language) !== void 0) ? reader.eastAsianRules : void 0) !== null && _ref5 !== void 0 ? _ref5 : reader.down === true ? unknownDownOf(own, tabStops) : void 0) !== null && _ref4 !== void 0 ? _ref4 : typeof frame === "string" ? frame : otherDecimalSymbol ? "a decimal tab stop in a document whose decimal symbol isn't a full stop" : find(properties, "w:divId") !== void 0 ? "a paragraph in an HTML division" : combined.alignment === "mediumKashida" || combined.alignment === "highKashida" ? "a paragraph justified for Arabic with a medium or high kashida" : forThaiOrArabic && typeof items !== "string" && items.some((item) => item.type === "text" && ARABIC.test(item.text)) ? "Arabic text justified for Thai or with a kashida" : (_ref7 = (_ref8 = (_unknownInOlderLayout = unknownInOlderLayout(content, combined.alignment, reader)) !== null && _unknownInOlderLayout !== void 0 ? _unknownInOlderLayout : unknownLengthIn(element)) !== null && _ref8 !== void 0 ? _ref8 : typeof format === "string" ? format : void 0) !== null && _ref7 !== void 0 ? _ref7 : typeof borders === "string" ? borders : void 0;
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
type: "paragraph",
items: content,
@@ -34563,7 +34894,7 @@ var docxLayout = (function(exports) {
* document's grid of no type (`default`) is no grid, whatever its pitch.
*/
var readGrid = (element, normalSize, { gutterAtTop }) => {
- var _numberOf7;
+ var _numberOf7, _twips12, _twips13, _twips14;
const properties = childrenOf(element);
const attributes = attributesOf(find(properties, "w:docGrid"));
const type = attributes["w:type"];
@@ -34574,12 +34905,16 @@ var docxLayout = (function(exports) {
if (linePitch === void 0) return "a document grid of characters without the pitch of its lines";
const space = ((_numberOf7 = numberOf(attributes["w:charSpace"])) !== null && _numberOf7 !== void 0 ? _numberOf7 : 0) / CHARACTER_SPACE_UNITS;
if (type === "linesAndChars") return _objectSpread2({ linePitch }, space === 0 ? {} : { characterSpace: space });
- const columns = readColumns(find(properties, "w:cols"), textWidthOf(properties, gutterAtTop));
- if (columns.some((width) => width !== columns[0])) return "a document grid that snaps to characters in columns of different widths";
- const cells = normalSize + space > 0 ? Math.floor(columns[0] / (normalSize + space)) : 0;
- return cells < 1 ? "a document grid of characters with no room for one" : {
+ const margins = attributesOf(find(properties, "w:pgMar"));
+ const columns = downOf(properties) === void 0 ? readColumns(find(properties, "w:cols"), textWidthOf(properties, gutterAtTop)) : [((_twips12 = twips(attributesOf(find(properties, "w:pgSz"))["w:h"])) !== null && _twips12 !== void 0 ? _twips12 : DEFAULT_SECTION.pageHeight) - Math.abs((_twips13 = twips(margins["w:top"])) !== null && _twips13 !== void 0 ? _twips13 : DEFAULT_SECTION.marginTop) - Math.abs((_twips14 = twips(margins["w:bottom"])) !== null && _twips14 !== void 0 ? _twips14 : DEFAULT_SECTION.marginBottom)];
+ const room = normalSize + space;
+ if (room <= 0 || columns.some((width) => width / room < 1)) return "a document grid of characters with no room for one";
+ return columns.some((width) => width !== columns[0]) ? {
linePitch,
- characterPitch: columns[0] / cells
+ characterRoom: room
+ } : {
+ linePitch,
+ characterPitch: columns[0] / Math.floor(columns[0] / room)
};
};
/**
@@ -34589,7 +34924,7 @@ var docxLayout = (function(exports) {
* (`word-watertight-settings.docx` ST3).
*/
var readSection = (element, readPart, previous, { gutterAtTop, mirrorMargins }, grid) => {
- var _stringOf2, _twips12, _twips13, _twips14, _twips15, _twips16, _CHAPTER_SEPARATORS$S;
+ var _stringOf2, _twips15, _twips16, _twips17, _twips18, _twips19, _CHAPTER_SEPARATORS$S;
const properties = childrenOf(element);
const size = attributesOf(find(properties, "w:pgSz"));
const margins = attributesOf(find(properties, "w:pgMar"));
@@ -34599,27 +34934,27 @@ var docxLayout = (function(exports) {
const firstNumber = numberOf(numbering["w:start"]);
const chapterLevel = numberOf(numbering["w:chapStyle"]);
const { pageWidth, left: marginLeft, right: marginRight, gutter } = pageAcross(properties);
- const marginTop = (_twips12 = twips(margins["w:top"])) !== null && _twips12 !== void 0 ? _twips12 : DEFAULT_SECTION.marginTop;
+ const marginTop = (_twips15 = twips(margins["w:top"])) !== null && _twips15 !== void 0 ? _twips15 : DEFAULT_SECTION.marginTop;
const columns = readColumns(find(properties, "w:cols"), textWidthOf(properties, gutterAtTop));
const direction = valueOf(properties, "w:textDirection");
const down = downOf(properties);
const sectionStart = start !== void 0 && START_TYPES.has(start) ? start : "nextPage";
- const marginBottom = (_twips13 = twips(margins["w:bottom"])) !== null && _twips13 !== void 0 ? _twips13 : DEFAULT_SECTION.marginBottom;
- const unsupported = typeof grid === "string" ? grid : formatPageNumber(1, format) === void 0 ? "page numbers in a format not yet written" : direction !== void 0 && !HORIZONTAL.has(direction) && down === void 0 ? "text in a direction not yet followed" : down !== void 0 && (gutter !== 0 || mirrorMargins || columns.length > 1 || Math.min(marginTop, marginBottom) < 0) ? "text that runs down the page with a gutter, mirrored margins, columns or a negative margin" : (previous === null || previous === void 0 ? void 0 : previous.textRunsDown) !== void 0 && (sectionStart === "continuous" || sectionStart === "nextColumn") ? "a continuous section break after text that runs down the page" : down !== void 0 && typeof grid === "object" && grid.characterPitch !== void 0 ? "a document grid that snaps to characters on text that runs down the page" : find(properties, "w15:footnoteColumns") !== void 0 ? "footnotes in columns of their own" : unknownLengthIn(element);
+ const marginBottom = (_twips16 = twips(margins["w:bottom"])) !== null && _twips16 !== void 0 ? _twips16 : DEFAULT_SECTION.marginBottom;
+ const unsupported = typeof grid === "string" ? grid : formatPageNumber(1, format) === void 0 ? "page numbers in a format not yet written" : direction !== void 0 && !HORIZONTAL.has(direction) && down === void 0 ? "text in a direction not yet followed" : down !== void 0 && (mirrorMargins || columns.length > 1 || gutter !== 0 && (gutterAtTop || down === "fromLeft")) ? "text that runs down the page with columns, mirrored margins, or a gutter at the top or beside lines from the left" : (previous === null || previous === void 0 ? void 0 : previous.textRunsDown) !== void 0 && (sectionStart === "nextColumn" || sectionStart === "continuous" && down !== previous.textRunsDown) ? "a continuous section break after text that runs down the page, into text that doesn't" : find(properties, "w15:footnoteColumns") !== void 0 ? "footnotes in columns of their own" : unknownLengthIn(element);
const headers = readReferences(properties, "w:headerReference", readPart);
const footers = readReferences(properties, "w:footerReference", readPart);
const section = _objectSpread2(_objectSpread2(_objectSpread2({
pageWidth,
- pageHeight: (_twips14 = twips(size["w:h"])) !== null && _twips14 !== void 0 ? _twips14 : DEFAULT_SECTION.pageHeight,
+ pageHeight: (_twips17 = twips(size["w:h"])) !== null && _twips17 !== void 0 ? _twips17 : DEFAULT_SECTION.pageHeight,
marginTop,
marginBottom,
marginLeft,
marginRight,
- header: (_twips15 = twips(margins["w:header"])) !== null && _twips15 !== void 0 ? _twips15 : DEFAULT_SECTION.header,
- footer: (_twips16 = twips(margins["w:footer"])) !== null && _twips16 !== void 0 ? _twips16 : DEFAULT_SECTION.footer,
+ header: (_twips18 = twips(margins["w:header"])) !== null && _twips18 !== void 0 ? _twips18 : DEFAULT_SECTION.header,
+ footer: (_twips19 = twips(margins["w:footer"])) !== null && _twips19 !== void 0 ? _twips19 : DEFAULT_SECTION.footer,
gutter: gutterAtTop ? 0 : gutter,
topGutter: gutterAtTop ? gutter : 0,
- start: down !== void 0 && sectionStart === "continuous" ? "nextPage" : sectionStart,
+ start: down !== void 0 && sectionStart === "continuous" && (previous === null || previous === void 0 ? void 0 : previous.textRunsDown) !== down ? "nextPage" : sectionStart,
titlePage: onOff(properties, "w:titlePg") === true,
columns,
numberFormat: format
@@ -34630,24 +34965,34 @@ var docxLayout = (function(exports) {
headers: _objectSpread2(_objectSpread2({}, previous === null || previous === void 0 ? void 0 : previous.headers), headers),
footers: _objectSpread2(_objectSpread2({}, previous === null || previous === void 0 ? void 0 : previous.footers), footers)
}, unsupported ? { unsupported } : {});
- return down === void 0 ? section : turned(section, down);
+ return down === void 0 ? section : turned(section, down, gutter);
};
/**
* A section whose text runs down the page, with its page turned on its side, so that its lines run along it: from its top
* margin to its bottom one, as long as the page's text is tall, and across it from the right margin, or the left, each as
* far from the one before as it is tall, as Word lays them out (scripts/layout-probes/word-vertical.ts V1, V2, V6, V7).
- * Its header and footer stay across the top and bottom of the page, and a header doesn't push its lines down (VH1)
+ * Its header and footer stay across the top and bottom of the page, and a header doesn't push its lines down (VH1). Its
+ * gutter is beside its right margin, where its first line starts, and a negative top or bottom margin is as far from the
+ * edge as it would be positive, as the header and footer don't push the lines anyway: a gutter of 720 twips puts the
+ * first line 720 further from the right edge, and lines with a top margin of -1440 are as long as with 1440
+ * (stops2/word-stops-east-asian.ts VD8a, VD8c)
*/
- var turned = (section, textRunsDown) => _objectSpread2(_objectSpread2({}, section), {}, {
- pageWidth: section.pageHeight,
- pageHeight: section.pageWidth,
- marginLeft: section.marginTop,
- marginRight: section.marginBottom,
- marginTop: textRunsDown === "fromLeft" ? section.marginLeft : section.marginRight,
- marginBottom: textRunsDown === "fromLeft" ? section.marginRight : section.marginLeft,
- columns: [section.pageHeight - section.marginTop - section.marginBottom],
- textRunsDown
- });
+ var turned = (section, textRunsDown, gutter) => {
+ const marginTop = Math.abs(section.marginTop);
+ const marginBottom = Math.abs(section.marginBottom);
+ return _objectSpread2(_objectSpread2({}, section), {}, {
+ pageWidth: section.pageHeight,
+ pageHeight: section.pageWidth,
+ marginLeft: marginTop,
+ marginRight: marginBottom,
+ marginTop: textRunsDown === "fromLeft" ? section.marginLeft : section.marginRight + gutter,
+ marginBottom: textRunsDown === "fromLeft" ? section.marginRight : section.marginLeft,
+ gutter: 0,
+ topGutter: 0,
+ columns: [section.pageHeight - marginTop - marginBottom],
+ textRunsDown
+ });
+ };
var NUMBER_ALIGNMENTS = {
left: void 0,
start: void 0,
@@ -34971,26 +35316,36 @@ var docxLayout = (function(exports) {
return _objectSpread2(_objectSpread2({}, given("m:lMargin") || given("m:rMargin") ? { displayedMaths: "an equation displayed in a document whose maths settings give displayed equations margins" } : {}), given("m:interSp") ? { mathsApart: "equations side by side in a paragraph of them (`m:oMathPara`) in a document whose maths settings put space between equations" } : {});
};
/**
+ * Why text in Japanese, Chinese or Korean can't be laid out as Word does for the document's settings, when it can't: with
+ * Word's strict rules for the characters that can't start a line (`w:strictFirstAndLastChars`), or its punctuation, or
+ * its punctuation and kana, compressed (`w:characterSpacingControl`). Word left the lines of Japanese text in no language
+ * as they are without them, as it leaves out its rules for the characters that can't start or end a line there
+ * (scripts/layout-probes/stops2/word-stops-east-asian.ts EA1 to EA3: small kana, iteration marks and closing brackets
+ * started lines, and opening brackets ended them, at 42 ideographs a line). In text in one of those languages, they
+ * haven't been seen.
+ */
+ var readEastAsianRules = (settings) => {
+ const spacingControl = valueOf(settings, "w:characterSpacingControl");
+ return onOff(settings, "w:strictFirstAndLastChars") === true ? "the strict rules for the characters that can't start a line, in text in an East Asian language" : spacingControl !== void 0 && spacingControl !== "doNotCompress" ? "punctuation compressed in text in an East Asian language" : void 0;
+ };
+ /**
* Reads the parts of the document's settings (`w:settings`) that change how it is laid out.
*/
var readSettings = (xml) => {
- var _find$, _find4, _twips17;
+ var _find$, _find4, _twips20;
const settings = childrenOf(xml === null || xml === void 0 ? void 0 : xml["w:settings"]);
const compatibility = childrenOf(find(settings, "w:compat"));
const lists = readKinsokuLists(settings);
- const spacingControl = valueOf(settings, "w:characterSpacingControl");
const mode = compatibilityModeOf(settings);
const olderMode = olderModeOf(settings);
const unsupported = (_find$ = (_find4 = [
- [onOff(settings, "w:strictFirstAndLastChars"), "the strict rules for the characters that can't start a line"],
- [spacingControl !== void 0 && spacingControl !== "doNotCompress", "punctuation compressed"],
[mode < CURRENT_COMPATIBILITY_MODE && olderMode === void 0, "a document in a compatibility mode Word hasn't been seen laying out"],
[asksForUnfollowedCompatibility(compatibility, olderMode !== void 0), "a compatibility setting not yet followed"],
[onOff(settings, "w:bookFoldPrinting") || onOff(settings, "w:bookFoldRevPrinting"), "pages printed as a folded booklet"],
[onOff(settings, "w:linkStyles"), "styles updated from the document's template when Word opens it"]
].find(([applies]) => applies === true)) === null || _find4 === void 0 ? void 0 : _find4[1]) !== null && _find$ !== void 0 ? _find$ : unknownLengthIn(settings);
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
- defaultTabStop: (_twips17 = twips(attributesOf(find(settings, "w:defaultTabStop"))["w:val"])) !== null && _twips17 !== void 0 ? _twips17 : 36,
+ defaultTabStop: (_twips20 = twips(attributesOf(find(settings, "w:defaultTabStop"))["w:val"])) !== null && _twips20 !== void 0 ? _twips20 : 36,
evenAndOddHeaders: onOff(settings, "w:evenAndOddHeaders") === true,
addsParagraphSpacing: onOff(compatibility, "w:doNotUseHTMLParagraphAutoSpacing") === true
}, Object.keys(lists).length > 0 ? { breakRules: { lists } } : {}), onOff(settings, "w:autoHyphenation") === true ? { hyphenation: readHyphenation(settings) } : {}), olderMode === void 0 ? {} : { compatibilityMode: olderMode }), onOff(compatibility, "w:suppressTopSpacing") === true ? { suppressesTopSpacing: true } : {}), unsupported ? { unsupported } : {});
@@ -35105,7 +35460,8 @@ var docxLayout = (function(exports) {
const compatibilityMode = olderModeOf(settings);
const feLayout = onOff(childrenOf(find(settings, "w:compat")), "w:useFELayout") === true;
const openTypeFeatures = wordSettingsOf(childrenOf(find(settings, "w:compat"))).some(({ "w:name": name, "w:val": value }) => name === "enableOpenTypeFeatures" && isOn(value));
- const readerOf = (inHeader) => _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
+ const eastAsianRules = readEastAsianRules(settings);
+ const readerOf = (inHeader) => _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
styles,
numbering,
listIds,
@@ -35113,7 +35469,7 @@ var docxLayout = (function(exports) {
markers,
fields: [],
counters: /* @__PURE__ */ new Map()
- }, decimalSymbol === void 0 ? {} : { decimalSymbol }), mathsSettings), guess ? { guess } : {}), compatibilityMode === void 0 ? {} : { compatibilityMode }), feLayout ? { feLayout } : {}), openTypeFeatures ? { openTypeFeatures } : {});
+ }, decimalSymbol === void 0 ? {} : { decimalSymbol }), mathsSettings), eastAsianRules === void 0 ? {} : { eastAsianRules }), guess ? { guess } : {}), compatibilityMode === void 0 ? {} : { compatibilityMode }), feLayout ? { feLayout } : {}), openTypeFeatures ? { openTypeFeatures } : {});
const elements = unwrap(joinRemovedMarks(contentOf$3(body), styles, {
nested: false,
sized: false,
@@ -35443,7 +35799,7 @@ var docxLayout = (function(exports) {
relativeReferences: markers.relative,
endnoteReferences
}, parts.fonts !== void 0 && parts.fonts.length > 0 ? { fonts: parts.fonts } : {}), readSettings(parts.settings));
- return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref33 = (_ref34 = (_ref35 = (_ref36 = (_ref37 = (_ref38 = (_ref39 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : styles.unsupported) !== null && _ref39 !== void 0 ? _ref39 : inNumbering) !== null && _ref38 !== void 0 ? _ref38 : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref37 !== void 0 ? _ref37 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref36 !== void 0 ? _ref36 : [...endnoteSections, sections.length - 1].some((section) => sections[section].textRunsDown !== void 0) && endnotes.length > 0 ? "endnotes on text that runs down the page" : void 0) !== null && _ref35 !== void 0 ? _ref35 : endnoteSections.some((section) => !sameGrid(gridOf(section), gridOf(sections.length - 1))) ? "endnotes from a section on another document grid than the last" : void 0) !== null && _ref34 !== void 0 ? _ref34 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref33 !== void 0 ? _ref33 : unseenNumbering }));
+ return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref33 = (_ref34 = (_ref35 = (_ref36 = (_ref37 = (_ref38 = (_ref39 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : styles.unsupported) !== null && _ref39 !== void 0 ? _ref39 : inNumbering) !== null && _ref38 !== void 0 ? _ref38 : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref37 !== void 0 ? _ref37 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref36 !== void 0 ? _ref36 : sections.slice(Math.min(...endnoteSections)).some(({ textRunsDown }) => textRunsDown !== void 0) ? "endnotes on or before text that runs down the page" : void 0) !== null && _ref35 !== void 0 ? _ref35 : endnoteSections.some((section) => sections.slice(section + 1).some((_, after) => !sameGrid(gridOf(section), gridOf(section + 1 + after)))) ? "endnotes from a section followed by one on another document grid" : void 0) !== null && _ref34 !== void 0 ? _ref34 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref33 !== void 0 ? _ref33 : unseenNumbering }));
};
//#endregion
//#region src/layout/paginate.ts
@@ -35937,6 +36293,7 @@ var docxLayout = (function(exports) {
*/
const blockIndexes = new Map(blocks.map(({ block }, index) => [block, index]));
const linesOf = (paragraph, widths, rooms = /* @__PURE__ */ new Map()) => {
+ var _paragraph$grid;
const given = typeof widths === "number" ? [{
from: 0,
width: widths
@@ -35977,6 +36334,7 @@ var docxLayout = (function(exports) {
byWidths.set(key, laidOut);
return laidOut;
};
+ if (((_paragraph$grid = paragraph.grid) === null || _paragraph$grid === void 0 ? void 0 : _paragraph$grid.characterRoom) !== void 0 && rooms.size > 0) stopAt("a line beside a drawing on a grid that snaps to characters in columns of different widths");
const lines = paragraph.items.some(isPageField) ? layOut() : kept();
for (const reason of new Set(lines.flatMap(({ unsupported }) => unsupported === void 0 ? [] : [unsupported]))) stopAt(reason);
const index = blockIndexes.get(paragraph);
@@ -39448,6 +39806,31 @@ var docxLayout = (function(exports) {
const name = nameOf(element);
return name === "w:spacing" || name === "w:ind" ? Object.keys(attributesOf(element[name])).map((attribute) => `${name} ${attribute}`) : [name];
}));
+ var BUILT_IN_RUN = {
+ "w:rFonts": { "w:rFonts": [{ _attr: {
+ "w:ascii": "Times New Roman",
+ "w:hAnsi": "Times New Roman"
+ } }] },
+ "w:sz": { "w:sz": [{ _attr: { "w:val": 20 } }] },
+ "w:szCs": { "w:szCs": [{ _attr: { "w:val": 20 } }] }
+ };
+ var BUILT_IN_PARAGRAPH = {
+ "w:spacing w:before": "0",
+ "w:spacing w:after": "0",
+ "w:spacing w:line": "240",
+ "w:spacing w:lineRule": "auto",
+ "w:ind w:left": "0",
+ "w:ind w:start": "0",
+ "w:ind w:right": "0",
+ "w:ind w:end": "0",
+ "w:ind w:firstLine": "0",
+ "w:ind w:hanging": "0"
+ };
+ /** The value of a key of {@link defaultKeysOf} in a document's defaults: an attribute of its spacing or indents */
+ var defaultValueOf = (root, key) => {
+ const [name, attribute] = key.split(" ");
+ return stringOf(attributesOf(find(defaultsOf(root, "w:pPr"), name))[attribute]);
+ };
/**
* The styles of an imported document, put into a document's. Each of the same type and name as one of the document's is
* the document's (AC3), and the others are added, with new ids where the document has their ids (AC3f), looking as they
@@ -39455,15 +39838,19 @@ var docxLayout = (function(exports) {
* document's of their names (AC3d, AS1, AS2, AS4), a character style with those it is based on there (AS3), and a table
* style based on the document's of the names of those it is based on (AS6). Those added for others to be based on aren't
* any type's default, nor are those added, and paragraphs and tables of no style of their own are in the imported
- * document's default, added or not (AS5).
+ * document's default, added or not (AS5). With its formatting kept (`keep`), its paragraph and character styles are all
+ * added so, those of the document's names too, and only its table styles of the document's names are the document's:
+ * Times New Roman 14 with 240 after in its Normal is kept, and so is its Heading 1 of 20 points where the document's is
+ * 16, but its Normal Table's cells of no margins are the document's of 108 (word-imported-styles.docx AS7, AS9,
+ * stops2/word-stops-imported.ts IM2a, IM2d).
*/
- var mergeStyles = (into, imported) => {
+ var mergeStyles = (into, imported, keep = false) => {
const own = stylesOf(into);
const keys = own.flatMap(({ key, id }) => key === void 0 ? [] : [[key, id]]);
const byKey = new Map(keys.filter(([key], index) => keys.findIndex(([other]) => other === key) === index));
const theirs = stylesOf(imported);
const byId = new Map(theirs.map((style) => [style.id, style]));
- const matched = new Map(theirs.flatMap(({ id, key }) => key !== void 0 && byKey.has(key) ? [[id, byKey.get(key)]] : []));
+ const matched = new Map(theirs.flatMap(({ id, key, type }) => key !== void 0 && byKey.has(key) && (!keep || type === "table") ? [[id, byKey.get(key)]] : []));
const chainOf = (id, seen) => {
const style = id === void 0 ? void 0 : byId.get(id);
return style === void 0 || seen.includes(style.id) || style.type === "table" && matched.has(style.id) ? seen : chainOf(style.basedOn, [...seen, style.id]);
@@ -39472,7 +39859,8 @@ var docxLayout = (function(exports) {
const keptParagraphs = theirs.filter(({ id, type }) => kept.has(id) && type === "paragraph");
const ownDefaults = defaultKeysOf(into);
const theirDefaults = defaultKeysOf(imported);
- if (keptParagraphs.length > 0 && [...ownDefaults].some((key) => !theirDefaults.has(key))) return {
+ const leftOut = [...ownDefaults].filter((key) => !theirDefaults.has(key));
+ if (keptParagraphs.length > 0 && leftOut.some((key) => !(key in BUILT_IN_RUN) && (!(key in BUILT_IN_PARAGRAPH) || defaultValueOf(into, key) !== BUILT_IN_PARAGRAPH[key]))) return {
added: [],
ids: /* @__PURE__ */ new Map(),
defaults: {},
@@ -39508,7 +39896,7 @@ var docxLayout = (function(exports) {
"w:styleId": defaultsId
} },
{ "w:pPr": defaultsOf(imported, "w:pPr") },
- { "w:rPr": defaultsOf(imported, "w:rPr") }
+ { "w:rPr": [...defaultsOf(imported, "w:rPr"), ...leftOut.flatMap((key) => key in BUILT_IN_RUN ? [BUILT_IN_RUN[key]] : [])] }
] }];
/** The id of the imported document's default style of a type, where paragraphs or tables of no style are in another than the document's */
const defaultOf = (type) => {
@@ -39517,14 +39905,14 @@ var docxLayout = (function(exports) {
const id = theirsDefault && ids.get(theirsDefault.id);
return id === ((_own$find = own.find((style) => style.type === type && style.isDefault)) === null || _own$find === void 0 ? void 0 : _own$find.id) ? void 0 : id;
};
- return {
+ return _objectSpread2({
added: [...defaults, ...added],
ids,
defaults: withoutUndefined({
paragraph: defaultOf("paragraph"),
table: defaultOf("table")
})
- };
+ }, keptParagraphs.length > 0 && leftOut.includes("w:rFonts") ? { ownFont: true } : {});
};
/** Content whose paragraphs and tables of no style of their own are in these */
var withDefaultStyles = (content, defaults) => {
@@ -39544,6 +39932,25 @@ var docxLayout = (function(exports) {
return name === "w:tbl" ? styled(inner, "w:tblPr", "w:tblStyle", defaults.table) : inner;
});
};
+ /** Content whose last paragraph has no space after it, whatever its style gives it */
+ var withNoSpaceAfter = (content) => {
+ var _ownProperties$find;
+ const at = content.findLastIndex((element) => isObject(element) && nameOf(element) === "w:p");
+ const paragraph = content[at];
+ const children = contentOf$2(paragraph);
+ const properties = children.find((child) => isObject(child) && "w:pPr" in child);
+ const ownProperties = childrenOf(properties === null || properties === void 0 ? void 0 : properties["w:pPr"]);
+ const spacing = { "w:spacing": [{ _attr: _objectSpread2(_objectSpread2({}, attributesOf((_ownProperties$find = ownProperties.find((child) => "w:spacing" in child)) === null || _ownProperties$find === void 0 ? void 0 : _ownProperties$find["w:spacing"])), {}, {
+ "w:after": 0,
+ "w:afterAutospacing": 0
+ }) }] };
+ const spaced = { "w:p": [{ "w:pPr": [...ownProperties.filter((child) => !("w:spacing" in child)), spacing] }, ...children.filter((child) => child !== properties)] };
+ return [
+ ...content.slice(0, at),
+ spaced,
+ ...content.slice(at + 1)
+ ];
+ };
/** The numbers an attribute gives elements of a part's root, such as each list's `w:numId` */
var numbersOf = (root, name, attribute) => elementsOf(root, name).map((element) => Number(attributesOf(element[name])[attribute])).filter(Number.isFinite);
/** Elements given new numbers by an attribute, from one past the highest of those taken, in order */
@@ -39636,10 +40043,16 @@ var docxLayout = (function(exports) {
const document = documents.get(imported);
const { content } = document.body;
if (elementsIn(content, (child) => "w:sectPr" in child).length > content.filter((child) => isObject(child) && "w:sectPr" in child).length) return "an imported document of several sections";
- if (find(childrenOf(find(childrenOf(element["w:altChunk"]), "w:altChunkPr")), "w:matchSrc") !== void 0) return "an imported document whose formatting is kept";
+ const keep = onOff(childrenOf(find(childrenOf(element["w:altChunk"]), "w:altChunkPr")), "w:matchSrc") === true;
if (hasPageField(content) || [document.footnotes, document.endnotes].some((part) => part !== void 0 && hasPageField([part.notes]))) return "a page reference or number of pages in an imported document";
- const style = mergeStyles(styles, document.styles);
+ const style = mergeStyles(styles, document.styles, keep);
if (style.unsupported !== void 0) return style.unsupported;
+ const withNotes = [...content, ...[document.footnotes, document.endnotes].flatMap((part) => part === void 0 ? [] : [part.notes])];
+ const eastAsianOrComplex = elementsIn(withNotes, (child) => "w:rtl" in child || "w:cs" in child).length > 0 || elementsIn(withNotes, (child) => "w:t" in child).some((text) => [...contentOf$2(text).join("")].some(isEastAsian));
+ if (style.ownFont === true && eastAsianOrComplex) return "East Asian or right-to-left text in an imported document whose own styles give no font";
+ const blocks = content.filter((child) => !isObject(child) || !("w:sectPr" in child));
+ const last = lastBlockOf(blocks);
+ if (keep && last !== void 0 && nameOf(last) === "w:p" && !blocks.includes(last)) return "an imported document whose formatting is kept that ends in a content control or custom XML";
const list = mergeLists(numbering, document.numbering);
const withIds = (notes) => {
var _notes$footnotes, _notes$endnotes;
@@ -39657,9 +40070,8 @@ var docxLayout = (function(exports) {
const none = /* @__PURE__ */ new Map();
styles = withAdded((_styles = styles) !== null && _styles !== void 0 ? _styles : { "w:styles": [] }, renamed(style.added, _objectSpread2(_objectSpread2({}, renames), {}, { styles: none })));
numbering = withAdded((_numbering = numbering) !== null && _numbering !== void 0 ? _numbering : { "w:numbering": [] }, renamed(list.added, renames));
- const blocks = content.filter((child) => !isObject(child) || !("w:sectPr" in child));
- const last = lastBlockOf(blocks);
- return withoutBookmarks(withDefaultStyles(renamed(last !== void 0 && nameOf(last) === "w:p" ? blocks : [...blocks, { "w:p": [] }], renames), style.defaults), leftOut);
+ const own = withDefaultStyles(renamed(last !== void 0 && nameOf(last) === "w:p" ? blocks : [...blocks, { "w:p": [] }], renames), style.defaults);
+ return withoutBookmarks(keep ? withNoSpaceAfter(own) : own, leftOut);
};
const turned = (part) => part.imports.size === 0 ? part : _objectSpread2(_objectSpread2({}, part), {}, { content: replaceImports(part.content, part.imports, turn) });
const body = turned(parts.body);
diff --git a/live-examples/lib/shapes.iife.js b/live-examples/lib/shapes.iife.js
index 80b707f302..a98cc255ee 100644
--- a/live-examples/lib/shapes.iife.js
+++ b/live-examples/lib/shapes.iife.js
@@ -3539,6 +3539,88 @@ var docxShapes = (function(exports, docx) {
]
].sort((one, other) => one - other).map((code) => String.fromCodePoint(code)).join("");
//#endregion
+ //#region src/text-layout/more-widths.ts
+ /**
+ * How wide Word draws the characters of Hebrew, the Arabic-Indic and Devanagari digits, Thai, box drawing, blocks,
+ * geometric shapes, symbols and dingbats in the fonts of the width tables, plain and bold, the font it draws each in, and
+ * how far above and below the baseline those fonts make room in a line.
+ *
+ * Generated by scripts/generate-more-widths.ts from Word's PDF of scripts/layout-probes/stops2/word-stops-more-widths.ts,
+ * saved from Word 16 for Mac. Do not edit by hand.
+ *
+ * @module
+ */
+ /**
+ * The characters the widths are for, as ranges of code points: Hebrew; the Arabic-Indic and Eastern Arabic-Indic digits;
+ * the Devanagari full stops and digits; Thai; and box drawing, block elements, geometric shapes, miscellaneous symbols and
+ * dingbats.
+ */
+ var MORE_WIDTH_RANGES = [
+ [1424, 1535],
+ [1632, 1641],
+ [1776, 1785],
+ [2404, 2415],
+ [3584, 3711],
+ [9472, 10175]
+ ];
+ var MORE_WIDTHS = [
+ {
+ name: "Calibri",
+ regular: {
+ widths: "!000*0I0LR0000Au0000000FQ0000000V0000!*071jT1d80VC15w1p20Aa0Jp1q71mx0Aa15B1ak13M1rp1qK0Aa0V01oL1hU1h61ky13W1bS1jT15B1Im1uy!*0418q*020C/11o!*0a1fm*0j11a1vH1hu*09!1t01vM1Ck1w91w91F81cW1mV1wV1x+1Hw26G2201x31x31mV1+r28h25j1w91w91rp1LS1kp1vD1yr1yr1yK1yK1KE1J61x31tE1qv1341oB1wi1x31bN1w91Qh1u/1EH1LJ1t01t01iE1630001bN1bN000*06!*031fc0PU1su1cW1531fV1bN1d/000*071u51u51yK1H21Hw1Ox1Ox1AY1UX1UX1LJ1Iq2Cq!*0z1e82sg1e82sg1e8*0a2sg1e8*022sg1e8*022sg1e8*022sg*021e81e82sg1e81e82sg*021e81e82sg1e81e82sg2sg1e81e82sg2sg1e81e82sg2sg1e81e82sg2sg1e81e82sg2sg1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*021KJ2011JA1r11KJ0S10zu0h11KJ*021NW2iz*0b1uo1uo26B*070Tk0Tk2sg2dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041fQ1lW1sS26B26B1uo26B*071uo1uo26B*0b0Tk26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg*0323I1pc1pc1m42sg1m42sg1Ua1jE1KX20O1nw2sg*0o1GZ1GZ2sg1GZ2sg2sg1GZ2sg0Zh1iX2352dD16w10l13n1vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf3fx*091/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*230*0b-1*0L-11-*0b1*06-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*0O3*034*0s3*0i453343*0243*0243*024*033*0b4-3*07--453*03453363*024343*0263*0243*04-*0233-3*07443*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a66336366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I0LR0000Ct0000000H70000000Wj000!*071lS1dM0Xd16w1pP0C/0Mj1rb1ow0C/15K1ap14n1sp1sb0C/0Wj1rA1ka1j01l/18b1eV1nr15K1MW1vW!*041e3*020Ej13/!*0a1fm*0j11a1vH1hu*09!1Gi1Jh1Ma1Hr1Hr1On1k/1ws1E+1Qh1Uu2jY2ly1IT1IT1uo23I2tk2wD1Hr1Hr1Gi1NM1tj1G81Gr1Gr1O41O41Z81Z81IT1ER1DX1i11Gi1Av1IT1iY1Hw1KE1Av1KX20q1yU1yU1n+1ap0001iY1iY000*06!*031fc0RA1yB1b91b91hU1iX1kS000*071wC1yK1LS1Vp1Ku1VS1VS1Gr2mX1UX24H1VS2z8!*0z1e82vj1e82vj1hb*071e81hb1hb2vj1e81hb1hb2vj1e81hb1hb2vj1e81hb1hb2vj*021hb1hb2vj1hb1hb2vj*021hb1hb2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ2782lI2lI1KJ2lI*021KJ23a1MI1ua1KJ0V90CD0k91KJ*021NW2lI*0b1uo1uo29K*070Tk0Tk2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041jp1lW1sS29K29K1uo29K*071uo1uo29K*0b0Tk29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo*0326Q1sk1sk1pc2vo1pc2vo1Xj1mM1O423W1qF2vo*0o1K61K62vo1K62vo2vo1K62vo10p1m426d2gL19E13s16w1yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn3fx*0922D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*230*0b-1*0L-11-*0b1*06-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*0O3*034*0s3*0i453343*0243*0243*024*033*0b4-3*07--453*03453363*024343*0263*0243*04-*0233-3*07443*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a66336366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Cambria",
+ regular: {
+ widths: "!000*0I0TD0000Ju0000000Hq0000000LD000!*071be1770Qr11t19E0HA0IK1au1ak0FG16G13C13s1fh1bS0GU0LD1af16Z16Z14Q1bo17U1a119f1vn1e8!*041n31le1jk0wG0W4!*0a1ib*0j!*0c0ZU0+c16Z0+c0+v1bC0Nd0Tu12U0/i14L1f51hz11D12r0X31hU1hq1jr0+v0+F0ZK16k0Xn17U16k16k0Z70Z718x18x10J11D0RC0Rs0ZK0ZK10S0Tk0YX14V14M18+1770ZA0V+0+v0TX0000Iy0Iy000*06!*031mx0qf0WW0Rs0LP0RM0JE12r000*0712U0+R0/81oN1fJ1g01ix12K1jL1es0/L19B1/v!*0z1C12sg1C12sg1e8*071C01e81e82sg1C01e81e82sg1C01e81e82sg1C11e81e82sg1C12sg1e81e82sg1e81e82sg1C02sg1e81e82sg1e81e82sg1G31e81e82sg2sg1e81e82sg1G31e81e82sg2sg1e81e82sg2sg1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*0223/2011JA1r11KJ0S10zu0h11KJ1KJ23/1NW2iz*0b1uo1uo26B*072sg*022dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041kf1tS1iY26B26B1uo26B*071uo1uo26B*0b0Tp26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg*0323I1pc1pc1m42sg1m42sg1Ua1jE1KX20O1nw2sg*0n1pr1tS1GZ2sg1GZ2sg2sg1GZ2sg0Zh1iX2352dD16w10l13n1vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*0J7-7--7--7-*087*0q-*047*04-*0a7*0j-*0c8*0L-88-*0b8*06-*078*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*0m3*037*0s3*0i7-3373*02-3*0273*0277-73*0b773*0766753*03753363*027373*0263*0273*04-*023373*07773*0b73*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a6--36366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I0UN0000Q20000000Q20000000Nn000!*071il17J0Vj18A1g20KE0NC1eQ1iJ0My17v15K13/1fV1jk0OV0Nn1aI1fh1c/17q1od1gr1bt18v1HB1gZ!*041te1v91x30DV17U!*0a1nM*0j!*0c0XS10S16N0/811t1d/0OE0Xn12A0+/19r1in1l915p16a0Yk1ib1nH1kS10d11k0+c15T0XS17U15315p10J10J1db1db13H13/0VR0SA0Yu0XS14i0Uh11a15311D18b1oN0XS0Wt14M0SJ0000Io0Io000*06!*031sz0rd0TD0De0Af0Ju0KV0QP000*070TN0Xn0TX1iH1dR1dx1fo0TD1gt1eB0YE1cK20i!*0z1C12vj1C12vj1hb*071C01hb1hb2vj1C01hb1hb2vj1C01hb1hb2vj1C11hb1hb2vj!2vj1hb1hb2vj1hb1hb2vj!2vj1hb1hb2vj1hb1hb2vj!1hb1hb2vj2vj1hb1hb2vj!1hb1hb2vj2vj1hb1hb2vj2vj1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ!2lI2lI1KJ2lI*02!23a1MI1ua1KJ0V90CD0k91KJ1KJ!1NW2lI*0b1uo1uo29K*072vo2vo2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041ni1tS1iY29K29K1uo29K*071uo1uo29K*0b0Tp29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo*0326Q1sk1sk1pc2vo1pc2vo1Xj1mM1O423W1qF2vo*0o!1K62vo1K62vo2vo1K62vo10p1m426d2gL19E13s16w1yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2XD*0922D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*0J7-7--7--7-*087*0q-*047*04-*0a7*0j-*0ca*0L-aa-*0ba*06-*07a*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*0m3*037*0s3*0i7-3373*02-3*0273*0277-73*0b773*0766753*03753363*027373*0263*0273*04-*023373*07773*0b73*0j6*0336*043*08633633663363*0363363663363*0263*02663*076*023*046363*046*0b3*0a66-36366363*0h633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g-*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Arial",
+ regular: {
+ widths: "!000*0I0XQ0000GZ0000000Hq0000000T5000!*071n+1kI0+m1fr1u50Cy0XL1tz1sb0Cy1fA18218l1tz1tX0Cy0T51pL1iJ1ow1lo1871aN1lW1fA1Iv1Aq!*041d41d41d30AT11a!*0a1ib*0j11a1vH1hu*09!1t01vM1Ck1w91w91F81cW1mV1wV1x+1Hw26G2201x31x31mV1+r28h25j1w91w91rp1LS1kp1vD1yr1yr1yK1yK1KE1J61x31tE1qv1341oB1wi1x31bN1w91Qh1u/1EH1LJ1t01t01iE1630001bN1bN000*06!*031s10PU1su1cW1531fV1bN1d/000*071u51u51yK1H21Hw1Ox1Ox1AY1UX1UX1LJ1Iq2Cq!*0z1KJ2sg1xG2sg1e8*071KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*021KJ2011JA1r11KJ0S10zu0h11KJ*021NW2iz*0b1uo1uo26B*070Tp0Tp2sg2dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041dd1uo1sS26B26B1uo26B*071uo1uo26B*0b0Tp26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg2sg2vy2Ar2fd1pc1pc1m41Rc1m41Rc1Ua1jE1KX20O1nw2sg*0n1j11GZ1GZ1Cz1GZ1sO1fL1GZ2sg0Zh1e81Rc2dD16w10l1e81vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*02-2*06-2*06-2*06-2*06-2*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I15Q0000KN0000000Q20000000Yi000!*071r11pZ17l1lW1v/0GG10z1wd1xV0GG1hu1cH1dx1vt1yr0GG0Yi1vR1kW1sN1rK1e31f+1pw1hu1LJ1Fd!*041lj*020Hc1eQ!*0a1nM*0j11a1vH1hu*09!1Gi1Jh1Ma1Hr1Hr1On1k/1ws1E+1Qh1Uu2jY2ly1IT1IT1uo23I2tk2wD1Hr1Hr1Gi1NM1tj1G81Gr1Gr1O41O41Z81Z81IT1ER1DX1i11Gi1Av1IT1iY1Hw1KE1Av1KX20q1yU1yU1n+1ap0001iY1iY000*06!*031Hc0RA1yB1b91b91hU1iX1kS000*071wC1yK1LS1Vp1Ku1VS1VS1Gr2mX1UX24H1VS2z8!*0z1KJ2vj1xG2vj1hb*071KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ2782lI2lI1KJ2lI*021KJ23a1MI1ua1KJ0V90CD0k91KJ*021NW2lI*0b1uo1uo29K*070Tp0Tp2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041dd1uo1sS29K29K1uo29K*071uo1uo29K*0b0Tp29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo2vo2vy2Ar2fd1sk1sk1pc1Rc1pc1Rc1Xj1mM1O423W1qF2vo*0n1j11K61K61Cz1K61sO1fL1K62vo10p1e81Rc2gL19E13s1e81yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2++*022/32++*0522D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A2-2*08-2*02-2*02-2*02-2*02-2*06-2*06-2*06-2*06-2*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Times New Roman",
+ regular: {
+ widths: "!000*0I0TD0000Ju0000000Hq0000000LD000!*071be1770Qr11t19E0HA0IK1au1ak0FG16G13C13s1fh1bS0GU0LD1af16Z16Z14Q1bo17U1a119f1vn1e8!*041n31le1jk0wG0W4!*0a1ib*0j!*0c0ZU0+c16Z0+c0+v1bC0Nd0Tu12U0/i14L1f51hz11D12r0X31hU1hq1jr0+v0+F0ZK16k0Xn17U16k16k0Z70Z718x18x10J11D0RC0Rs0ZK0ZK10S0Tk0YX14V14M18+1770ZA0V+0+v0TX0000Iy0Iy000*06!*0314O0qf0WW0Rs0LP0RM0JE12r000*0712U0+R0/81oN1fJ1g01ix12K1jL1es0/L19B1/v!*0z1KJ2sg1KJ2sg1e8*071KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ2sg1e81e82sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg2sg1e81e82sg1KJ1e81e82sg1e81e82sg1e8*072sg1e8*031KJ*0s1e8*032sg*021e8*0b1KJ23/2iz2iz1KJ2iz*021KJ2011JA1r11KJ0S10zu0h11KJ*021NW2iz*0b1uo1uo26B*070Tp0Tp2sg2dy2sg*032qG1N426B26B2sg26B*022qG26B2qG26B*022sg26B*022qG26B*041dd1uo1sS26B26B1uo26B*071uo1uo26B*0b0Tp26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg2sg2vy2Ar2fd1pc1pc1m41Rc1m41Rc1Ua1jE1KX20O1nw2sg*0n1j11GZ1GZ1Cz1GZ1sO1fL1GZ2sg0Zh1e81Rc2dD16w10l1e81vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*2g8*0L-88-*0a8*07-*078*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I0UN0000Q20000000Q20000000Nn000!*071il17J0Vj18A1g20KE0NC1eQ1iJ0My17v15K13/1fV1jk0OV0Nn1aI1fh1c/17q1od1gr1bt18v1HB1gZ!*041te1v91x30DV17U!*0a1nM*0j!*0c0XS10S16N0/811t1d/0OE0Xn12A0+/19r1in1l915p16a0Yk1ib1nH1kS10d11k0+c15T0XS17U15315p10J10J1db1db13H13/0VR0SA0Yu0XS14i0Uh11a15311D18b1oN0XS0Wt14M0SJ0000Io0Io000*06!*0314O0rd0TD0De0Af0Ju0KV0QP000*070TN0Xn0TX1iH1dR1dx1fo0TD1gt1eB0YE1cK20i!*0z1KJ2vj1KJ2vj1hb*071KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ2vj1hb1hb2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj2vj1hb1hb2vj1KJ1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031KJ*0s1hg*032vo*021hg*0b1KJ2782lI2lI1KJ2lI*021KJ23a1MI1ua1KJ0V90CD0k91KJ*021NW2lI*0b1uo1uo29K*070Tp0Tp2sg2gG2vo*032qG1Qd29K29K2vo29K*022qG29K2qG29K*022vo29K*022qG29K*041dd1uo1sS29K29K1uo29K*071uo1uo29K*0b0Tp29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo2vo2vy2Ar2fd1sk1sk1pc1Rc1pc1Rc1Xj1mM1O423W1qF2vo*0n1j11K61K61Cz1K61sO1fL1K62vo10p1e81Rc2gL19E13s1e81yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2++*022/32++*0522D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*2ga*0L-aa-*0aa*07-*07a*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ }
+ },
+ {
+ name: "Courier New",
+ regular: {
+ widths: "!000*0I1tN0001tN0000001tN0000001tN000!*071tN*0q!*041tN*04!*0a1tN*0j11a1vH1hu*09!1t01vM1Ck1w91w91F81cW1mV1wV1x+1Hw26G2201x31x31mV1+r28g25j1w91w91rp1LS1kp1vD1yr1yr1yK1yK1KE1J61x31tE1qv1341oB1wi1x31bN1w91Qh1u/1EH1LJ1t01t01iE1630001bN1bN000*06!*031s10PU1su1cW1531fV1bN1d/000*071u51u51yK1H21Hw1Ox1Ox1AY1UX1UX1LJ1Iq2Cq!*0z1tN2sg1tN2sg1e8*071tN1e81e82sg1tN1e81e82sg1tN1e81e82sg1tN1e81e82sg1tN2sg1e81e82sg1e81e82sg1tN2sg1e81e82sg1e81e82sg1tN1e81e82sg2sg1e81e82sg1tN1e81e82sg2sg1e81e82sg1tN1e81e82sg1e81e82sg1e8*072sg1e8*031tN*0s1e8*032sg*021e8*0b1tN23/2iz2iz1tN2iz*021tN2011JA1r11tN0S10zu0h11tN*032iz*0b1tN1tN26B*071tN*022dy2sg*031tN1N426B26B2sg26B*021tN26B1tN26B*022sg26B*021tN26B*041tN*0226B26B1tN26B*071tN1tN26B*0b1tN26B*072Ll26B*0a2sg*0326B2sg*0422a22a1ds1W523I1T21T21fm1C52sg2sg26B2sg26B1Lz2sg2sg1RU1RU2sg2da24S*022sg24S1e82sg1ND2sg2sg1aS1fG2sg1uy1vi25x2sg1RU1RZ1SJ2sg2sg2cj*072sg2sg1tN*021pc1pc1m41tN1m41tN1Ua1jE1KX20O1nw2sg*0n1tN1GZ1GZ1tN1GZ1tN1tN1GZ2sg0Zh1tN1tN2dD16w10l1tN1vi1vi2bI29q*072sg1/r1/r2sg2sg1RZ*0523I*032cj*051Mt1Mt2sg*051jk2sg1q22sg2sg1/v2sg*031YV28v28v1Iq1Iq2sg1m423S2sg2sg1au1CX2hA2Ge2sg2sg1m4*032nC1m41m41GV*032sg*0U26B2sg*08!2sg*022BO2sg27m1/v2sg*0a1R22sg1/F2sg1/F1/F27d*032sg1GB1KX2a62sg2aO*031/v1/v2sg1/v*0622D2aO2aO2sg2sg2aO*0e2sg2aO2aO2sg2aO*032sg1/m2sg2af*032sg*022aO2sg0CW0N415m0Lo0Lo1hq1hq0Lo1hq1oi1cW2sg2sg1Hn1Rc2d50La0La0MM0MM0L/0L/1g21g21441440La0La0Uf0Uf2XR*022XW2XR*051/v*0j2sg*031SJ2sg1SJ26Q2sg*052l/2l/2sg*021uR2sg*041Tg1Tg2sg*021/v2sg*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ },
+ bold: {
+ widths: "!000*0I1tN0001tN0000001tN0000001tN000!*071tN*0q!*041tN*04!*0a1tN*0j11a1vH1hu*09!1Gi1Jh1Ma1Hr1Hr1On1k/1ws1E+1Qh1Uu2jY2ly1IT1IT1uo23I2tk2wD1Hr1Hr1Gi1NM1tj1G81Gr1Gr1O41O41Z81Z81IT1ER1DX1i11Gi1Av1IT1iX1Hw1KE1Av1KX20q1yU1yU1n+1ap0001iY1iY000*06!*031Hc0RA1yB1b91b91hU1iX1kS000*071wC1yK1LS1Vp1Ku1VS1VS1Gr2mX1UX24H1VS2z8!*0z1tN2vj1tN2vj1hb*071tN1hb1hb2vj1tN1hb1hb2vj1tN1hb1hb2vj1tN1hb1hb2vj1tN2vj1hb1hb2vj1hb1hb2vj1tN2vj1hb1hb2vj1hb1hb2vj1tN1hb1hb2vj2vj1hb1hb2vj1tN1hb1hb2vj2vj1hb1hb2vj1tN1hb1hb2vj1hb1hb2vj1hb*072vj1hg*031tN*0s1hg*032vo*021hg*0b1tN2782lI2lI1tN2lI*021tN23a1MI1ua1tN0V90CD0k91tN*032lI*0b1tN1tN29K*071tN*022gG2vo*031tN1Qd29K29K2vo29K*021tN29K1tN29K*022vo29K*021tN29K*041tN*0229K29K1tN29K*071tN1tN29K*0b1tN29K*072Ot29K*0a2vo*0329K2vo*0425j25j1gA1Zd26Q1W91W91iu1Fd2vo2vo29K2vo29K1OH2vo2vo1V11V12vo2gh27Z*022vo27Z1hg2vo1QK2vo2vo1d/1iO2vo1xG1yr28F2vo1V11V61VS2vo2vo2fs*072vo2vo1tN*021sk1sk1pc1tN1pc1tN1Xj1mM1O423W1qF2vo*0n1tN1K61K61tN1K61tN1tN1K62vo10p1tN1tN2gL19E13s1tN1yr1yr2eR2cy*072vo22y22y2vo2vo1V6*0526Q*032fs*051PC1PC2vo*051ms2vo1ta2vo2vo22D2vo*032012bE2bE1Lz1Lz2vo1pc26+2vo2vo1dB1G32kJ2Jm2vo2vo1pc*032qL1pc1pc1K1*032vo*0U29K2vo*08!2vo*022EX2vo2au22D2vo*0a1Ua2vo22N2vo22N22N2ak*032vo1JK1O42de2vo2dW*0322D22D2vo22D*0625M2dW2dW2vo2vo2dW*0e2vo2dW2dW2vo2dW*032vo22t2vo2do*032vo*022dW2vo0G20Qc18v0Ox0Ox1ky1ky0Ox1ky1rp1g22vo2vo1Ku1Uk2gc0Oi0Oi0PU0PU0P80P81ja1ja17c17c0Oi0Oi0Xn0Xn2++*022/32++*0522D*0j2vo*031VS2vo1VS29Y2vo*052p82p82vo*021x+2vo*041Wo1Wo2vo*0222D2vo*0c",
+ fonts: "-*230*0b-1*0L-11-*0a1*07-*071*0c-*0A9-9*08-9*02-9*02-9*02-9*02-9*06-9*06-9*06-9*06-9*0e3*03-*0s3*0i-533-3*02-3*02-3*02-*033*0b--3*07-*0253*03-53363*02-3-3*0263*02-3*04-*0233-3*07--3*0b-3*0j6*0336*043*08633633663363*0363363663363*0263*02663*0766-*023*02-3-3*046*0b3*0a6-33-3--363--3*02-3*0a633663*0h6*05363663*02663*04633663*03663*0a663*04663363*0466363663*0j663*046*0536*0333633-36336336*053633636363*0563*0263*0563*09663*0e63363*036363*036*02363*0a663*0g5*093*0k6*023*0863*0d63*0d6"
+ }
+ }
+ ];
+ //#endregion
//#region src/text-layout/text-width.ts
/**
* Estimates how much space text takes up, from the widths of the characters in common fonts.
@@ -3568,8 +3650,39 @@ var docxShapes = (function(exports, docx) {
var CHARACTERS = FONT_WIDTH_RANGES.flatMap(([first, last]) => Array.from({ length: last - first + 1 }, (_, offset) => first + offset));
var CHARACTER_INDEX = new Map(CHARACTERS.map((code, index) => [code, index]));
var AVERAGE_LETTERS = [..."abcdefghijklmnopqrstuvwxyz"].map((letter) => CHARACTER_INDEX.get(letter.codePointAt(0)));
+ var MORE_CHARACTER_INDEX = new Map(MORE_WIDTH_RANGES.flatMap(([first, last]) => Array.from({ length: last - first + 1 }, (_, offset) => first + offset)).map((code, index) => [code, index]));
+ new RegExp("[\\p{Script=Arabic}\\p{Script=Devanagari}]", "u");
var DIGITS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/";
var decoded = /* @__PURE__ */ new Map();
+ var twoDigitsIn = (encoded, at) => DIGITS.indexOf(encoded[at]) * 64 + DIGITS.indexOf(encoded[at + 1]);
+ /**
+ * Reads what a string of `more-widths.ts` says of each character: tokens of `size` characters, or "!" for none, each with
+ * "*" and two digits repeating it that many more times.
+ */
+ var decodeTokens = (encoded, size, read) => {
+ const values = [];
+ let last;
+ for (let at = 0; at < encoded.length;) if (encoded[at] === "*") {
+ values.push(...new Array(twoDigitsIn(encoded, at + 1)).fill(last));
+ at += 3;
+ } else {
+ last = encoded[at] === "!" ? void 0 : read(encoded.slice(at, at + size));
+ values.push(last);
+ at += encoded[at] === "!" ? 1 : size;
+ }
+ return values;
+ };
+ var decodedMore = /* @__PURE__ */ new Map();
+ var decodeMore = ({ widths, fonts }) => {
+ const known = decodedMore.get(widths + fonts);
+ if (known) return known;
+ const face = {
+ widths: decodeTokens(widths, 3, (token) => (DIGITS.indexOf(token[0]) * 4096 + twoDigitsIn(token, 1)) / 10),
+ fonts: decodeTokens(fonts, 1, (token) => token === "-" ? void 0 : DIGITS.indexOf(token))
+ };
+ decodedMore.set(widths + fonts, face);
+ return face;
+ };
/**
* Reads the widths of a font's face, as {@link FontWidths} writes them: the width of each character of the tables, in
* thousandths of an em, or undefined where its width in Word isn't known.
@@ -3577,7 +3690,7 @@ var docxShapes = (function(exports, docx) {
var decodeWidths = (encoded) => {
const known = decoded.get(encoded);
if (known) return known;
- const twoDigitsAt = (at) => DIGITS.indexOf(encoded[at]) * 64 + DIGITS.indexOf(encoded[at + 1]);
+ const twoDigitsAt = (at) => twoDigitsIn(encoded, at);
const widths = [];
let token = 0;
for (let at = 0; at < encoded.length;) {
@@ -3815,18 +3928,32 @@ var docxShapes = (function(exports, docx) {
const widths = widthsOf(font);
return decodeWidths((_encodedFaceOf = encodedFaceOf(widths, bold, italic)) !== null && _encodedFaceOf !== void 0 ? _encodedFaceOf : encodedFaceOf(widths, false, italic));
};
+ /**
+ * The widths of Hebrew, the Arabic-Indic and Devanagari digits, Thai, box drawing, shapes, symbols and dingbats in the face
+ * text is in, and the fonts Word draws them in: its font's, plain or bold. Undefined in italic, whose widths Word's PDF
+ * doesn't show
+ */
+ var moreFaceOf = ({ font, bold, italic }) => {
+ const { name } = widthsOf(font);
+ const more = MORE_WIDTHS.find((known) => known.name === name);
+ return italic || more === void 0 ? void 0 : decodeMore(bold ? more.bold : more.regular);
+ };
var isWide = (code) => code >= 4352 && code <= 4447 || code >= 11904 && code <= 42191 || code >= 44032 && code <= 55203 || code >= 63744 && code <= 64255 || code >= 65072 && code <= 65103 || code >= 65280 && code <= 65376 || code >= 65504 && code <= 65510 || code >= 127744;
var isHalfWidth = (code) => code >= 65377 && code <= 65500;
var takesNoRoom = (character) => new RegExp("[\\p{Mn}\\p{Me}\\p{Cf}]", "u").test(character);
/**
- * The width of a character in thousandths of an em. Characters that aren't in the table are as wide as an average
- * lowercase letter, a whole em for wide characters and half an em for half-width ones, and marks take no space. So are
- * those the table has, but whose width in the font isn't known.
+ * The width of a character in thousandths of an em, from the tables, and those of Hebrew, the Arabic-Indic and Devanagari
+ * digits, Thai, box drawing, shapes, symbols and dingbats (`more`), which Word draws in the font, or in another when the
+ * font doesn't have them, such as Calibri's Thai in Tahoma, its Devanagari digits in Mangal and its ★ in Segoe UI Symbol
+ * (scripts/layout-probes/stops2/word-stops-more-widths.ts).
+ * Characters that aren't in them are as wide as an average lowercase letter, a whole em for wide characters and half an
+ * em for half-width ones, and marks take no space. So are those the tables have, but whose width in the font isn't known.
*/
- var characterWidth = (widths, character) => {
+ var characterWidth = (widths, more, character) => {
const code = character.codePointAt(0);
const index = CHARACTER_INDEX.get(code);
- const width = index === void 0 ? void 0 : widths[index];
+ const moreIndex = MORE_CHARACTER_INDEX.get(code);
+ const width = index !== void 0 ? widths[index] : moreIndex !== void 0 ? more === null || more === void 0 ? void 0 : more.widths[moreIndex] : void 0;
if (width !== void 0) return width;
if (isWide(code)) return 1e3;
if (isHalfWidth(code)) return 500;
@@ -3855,8 +3982,10 @@ var docxShapes = (function(exports, docx) {
var measuresOf = (font) => {
var _font$font, _eastAsian$latin;
const eastAsian = eastAsianFontOf((_font$font = font.font) !== null && _font$font !== void 0 ? _font$font : DEFAULT_FONT);
+ const measured = _objectSpread2(_objectSpread2({}, font), {}, { font: (_eastAsian$latin = eastAsian === null || eastAsian === void 0 ? void 0 : eastAsian.latin) !== null && _eastAsian$latin !== void 0 ? _eastAsian$latin : font.font });
return {
- widths: faceOf(_objectSpread2(_objectSpread2({}, font), {}, { font: (_eastAsian$latin = eastAsian === null || eastAsian === void 0 ? void 0 : eastAsian.latin) !== null && _eastAsian$latin !== void 0 ? _eastAsian$latin : font.font })),
+ widths: faceOf(measured),
+ more: moreFaceOf(measured),
monospaced: (eastAsian === null || eastAsian === void 0 ? void 0 : eastAsian.monospaced) === true
};
};
@@ -3866,8 +3995,8 @@ var docxShapes = (function(exports, docx) {
* @param start - Where the text starts on its line, in points
*/
var measureTextWidth = (text, font = {}, start = 0) => {
- const { widths, monospaced } = measuresOf(font);
- const widthOf = monospaced ? monospacedWidth : (character) => characterWidth(widths, character);
+ const { widths, more, monospaced } = measuresOf(font);
+ const widthOf = monospaced ? monospacedWidth : (character) => characterWidth(widths, more, character);
const size = sizeOf$1(font);
const { characterSpacing = 0, scale = 100 } = font;
return [...text].reduce((position, character) => character === " " ? (Math.floor(position / TAB_STOP) + 1) * TAB_STOP : position + widthOf(character) * size * scale / 1e5 + characterSpacing, start) - start;
diff --git a/usage/layout.md b/usage/layout.md
index d5ebb5196a..8fb20c3cdf 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -111,7 +111,7 @@ const doc = await patchDocument({
The template is read as Word saved it, with its styles, theme, lists, settings, headers, footers and notes, and the numbers are written into its tables of contents, page references and numbers of pages, in its text, headers and footers. The numbers a template was saved with are those of the template before it was filled in, so one that `docx/layout` can't work out, after something it can't lay out, is left blank rather than kept. Its page references and tables of contents are written clean, as a document's are, so Word shows them as they are (see [Opening the document in Word](#opening-the-document-in-word)). The template's settings are kept as they are, `updateFields` (`w:updateFields`) among them, so a template that has it on still asks Word to update all of its fields when the filled-in document is opened. Leave it off in the template, and Word opens the filled-in document without asking, as it opens a document whose fields are written clean (see [Opening the document in Word](#opening-the-document-in-word) for what still makes it ask). What `estimatePageNumbersWith` returns works the same way.
-A template can import other documents (`w:altChunk`), which Word turns into paragraphs and tables of the template's own when it opens it. A `.docx` it imports is laid out as Word lays it out: where it is imported, in the text, a table cell, a header, a footnote or another imported document, in the template's styles of the same names, its defaults, its theme and its settings, with the styles only the imported document has as they look there, and paragraphs of no style in its default style, its lists numbered on their own and its footnotes numbered with the template's, and without its own page size, margins, headers and footers. A bookmark of a name the template has is the template's. What the layout doesn't follow stops it (see [What it leaves blank](#what-it-leaves-blank)).
+A template can import other documents (`w:altChunk`), which Word turns into paragraphs and tables of the template's own when it opens it. A `.docx` it imports is laid out as Word lays it out: where it is imported, in the text, a table cell, a header, a footnote or another imported document, in the template's styles of the same names, its defaults, its theme and its settings, with the styles only the imported document has as they look there, and paragraphs of no style in its default style, its lists numbered on their own and its footnotes numbered with the template's, and without its own page size, margins, headers and footers. One whose formatting is kept (`w:matchSrc`) keeps its own paragraph and character styles, those of the template's names too, but takes the template's table styles, such as Normal Table, and its theme, and its last paragraph has none of its space after, as Word lays it out. One that ends in a paragraph of a content control or custom XML stops the layout, as which paragraph Word takes the space after off there hasn't been seen. The styles only the imported document has, where its defaults give no font or size, are in Word's own, Times New Roman 10. A bookmark of a name the template has is the template's. What the layout doesn't follow stops it (see [What it leaves blank](#what-it-leaves-blank)).
`patchDocument` doesn't add entries to a table of contents for the headings patches add. Word adds them when it updates the table.
@@ -192,13 +192,13 @@ A blank page that Word adds so a section starts on an odd or even page has nothi
## What it follows
-The pages are laid out with the widths and heights of the characters of the fonts Word documents use most: Calibri, Cambria, Arial, Times New Roman and Courier New, and of Office's other fonts that Word installs: Calibri Light, Aptos, Aptos Narrow, Trebuchet MS, Georgia, Verdana, Tahoma, Century Gothic, Consolas, Candara, Corbel, Constantia, Book Antiqua, Franklin Gothic Book, Gill Sans MT and Impact; and the heights of the lines of the Chinese, Japanese and Korean fonts Office has, and how far each goes below its baseline, such as MS Mincho, Yu Gothic, SimSun, Microsoft YaHei, PMingLiU and Malgun Gothic. The widths are those of the letters of Western and Central European languages, Turkish, Vietnamese, Greek and Cyrillic, of punctuation and the spaces other than U+0020, and of currency signs, arrows and mathematical symbols, as Word draws them in each font, plain, bold, italic and bold italic. Italic text in a font without an italic face, such as Tahoma or Impact, is as wide as the upright text, as Word slants it, and Word draws Trebuchet MS bold italic as its bold, slanted. It follows:
+The pages are laid out with the widths and heights of the characters of the fonts Word documents use most: Calibri, Cambria, Arial, Times New Roman and Courier New, and of Office's other fonts that Word installs: Calibri Light, Aptos, Aptos Narrow, Trebuchet MS, Georgia, Verdana, Tahoma, Century Gothic, Consolas, Candara, Corbel, Constantia, Book Antiqua, Franklin Gothic Book, Gill Sans MT and Impact; and the heights of the lines of the Chinese, Japanese and Korean fonts Office has, and how far each goes below its baseline, such as MS Mincho, Yu Gothic, SimSun, Microsoft YaHei, PMingLiU and Malgun Gothic. The widths are those of the letters of Western and Central European languages, Turkish, Vietnamese, Greek and Cyrillic, of punctuation and the spaces other than U+0020, and of currency signs, arrows and mathematical symbols, as Word draws them in each font, plain, bold, italic and bold italic, and in Calibri, Cambria, Arial, Times New Roman and Courier New, plain and bold, those of Hebrew, Thai, the Arabic-Indic and Devanagari digits, box drawing, shapes such as `docx`'s bullets ● ○ ■, symbols and dingbats, which Word draws in the font, or in another where the font lacks them, such as Calibri's Thai in Tahoma and its ★ in Segoe UI Symbol, whose ascent and descent a line with them takes, but for Cambria's and Times New Roman's Devanagari digits. Italic text in a font without an italic face, such as Tahoma or Impact, is as wide as the upright text, as Word slants it, and Word draws Trebuchet MS bold italic as its bold, slanted. It follows:
- the document's styles, and each paragraph's and run's own formatting: fonts, sizes, bold, italics, kerning and ligatures (see [Kerning and ligatures](#kerning-and-ligatures)), capitals, and hidden text. A paragraph whose mark is hidden (`run: { vanish: true }`) is joined to the next, on its lines, as Word joins it, in its own alignment, left indent and space before, and the next one's space after. Where both are in a list, the next one's number is counted but not shown, so the paragraph after them has the number after it. One with no paragraph after it, before a table or at the end of a table cell or of the document, stays as it is. A paragraph with nothing shown whose mark is hidden, such as one of a hidden style, takes no room, whatever its formatting, as in Word: before another paragraph or a table, and at the end of the document, but for one at the end of a table cell, which is a line of its own. The paragraph after it keeps its own formatting, one in a list takes a number, its fields are counted where it is, and its bookmarks start with what is after it. The paragraphs around it go by its style for their contextual spacing. A page break or picture in hidden text takes no room either. Chinese, Japanese and Korean are in the run's East Asian font (`font: { eastAsia }`), or in MS Mincho when that font has none of their characters, as Word draws them. A right-to-left run (`rightToLeft`) is in the run's font, size, bold and italics for complex scripts (`font: { cs }`, `sizeComplexScript`, `boldComplexScript`, `italicsComplexScript`), as Word draws it
- lengths given with units, such as `margin: { top: "1in" }`, `size: "12pt"` or a table's `width: { size: "6in", type: WidthType.DXA }`, as well as those given in numbers. Word reads each as a whole number of twips: rounded down from inches, points and picas, and to the nearest from centimeters and millimeters, and a size in points rounded down to a half-point, so `size: "10.75pt"` is 10.5 points. It reads the minus sign of a negative length as the whole number's only, and adds the fraction: `"-10.7pt"` is -9.3 points, a position of `"-2.5pt"` lowers text 1.5 points, and `"-0.5mm"` and `"-0.3cm"` are as much more
- where lines break, as Word breaks them: at spaces, and at en, em, four-per-em and ideographic spaces, which go past the end of a line as spaces do, after hyphens, en and em dashes and zero-width spaces, and between Chinese and Japanese characters. A word breaks at a soft hyphen (`SoftHyphen`), at the last one whose part of the word and a hyphen fit on the line with a little room left, about a point, with the hyphen at the end of the line, and again on the next line when the rest is longer than a line. A soft hyphen takes no room where the line doesn't break, and a justified line squeezes a word with soft hyphens onto it whole where it would squeeze one without, and otherwise breaks it at the last soft hyphen whose part and hyphen it can squeeze on, as Word does. A word in a border breaks at its soft hyphens too, and one whose part before its first soft hyphen is longer than a line breaks after the last character that fits. Word doesn't break lines at the other spaces, such as the thin space, so neither does the layout. In text in Japanese or Chinese (`language: { eastAsia: "ja-JP" }`), Word's lists keep characters such as closing brackets and `、` from starting a line, and opening brackets from ending one, so the character before moves to the next line with it. Text with no East Asian language, or in Korean or English, has no such rules in Word. Korean, Thai and the other scripts without spaces between words break at their spaces, as Word breaks them, and a word wider than the line breaks after the last character that fits. A paragraph's `wordWrap`, which writes Word's "Allow Latin text to wrap in the middle of a word", lets the words of runs in an East Asian font or language break anywhere, as Word breaks them. Right-to-left paragraphs (`bidirectional`) break where left-to-right ones do
- spacing before and after paragraphs, line spacing, indents and tab stops. A decimal tab stop (`TabStopType.DECIMAL`) lines up the first full stop of the text after it, such as that of `$1,234.50` or `e.g. 7`, or the end of a number, of digits and commas, that comes first and has none, such as the `12` of `12%`, the `12,` of `12, 34` or the `1` of `1 234.5`, or else the end of the text, as Word lays it out. Past the end of the line, the text after a right, centred or decimal tab stop of the paragraph's own lines up with the end of the line, or of the next line when it doesn't fit, after text or at the start of a line, and a left one takes a line of its own, below the text before it, and the text after it goes to the start of the next line, in a paragraph with a first line or hanging indent too, as Word lays it out. A tab stop between the paragraph's right indent and the margin, left, right, centred or decimal, lines its text up with it on the line, past the indent. Text in a border lines up with a tab stop by its box: a right stop with the end of the box, a centred one with its middle, and a decimal one with its text, and a box goes on round a tab in it. The other cases stop the layout (see below). A line in one font is as tall as Word makes it, to a fraction of a twip (a twentieth of a point): 268.55 twips for Calibri 11. A line in several fonts is as tall as Word makes it from the tallest of them above the baseline and the deepest below it, so a word of Courier New in a line of Calibri 11 makes it 275.53 twips, taller than either font's own line. Multiple line spacing (`line` with `LineRuleType.AUTO`) adds its share of the tallest font's own line below the text, and the last line on a page, or in a column, can have that space below the bottom of the page, as Word lays it out, but for the cases it stops at (see below). Contextual spacing (`contextualSpacing`) leaves out only its paragraph's own share of the space between it and a paragraph of the same style, as Word does: all of its space after, or as much of its space before as is more than the space after the paragraph above it. At the edges of a table cell, Word compares a paragraph with the one next to it in the document: the first cell's first paragraph with the paragraph before the table, and the last paragraph of each row with the end of the row, which is in the default paragraph style, so contextual spacing leaves out the space before a table's first paragraph of the same style as the paragraph before the table, and the space after a row's last paragraph in the default style, such as Normal
-- justified paragraphs (`AlignmentType.JUSTIFIED`), whose spaces Word squeezes to fit one more word on a line, so they can have more words to a line than left-aligned ones. It squeezes them, in proportion to their widths, when that takes less of their width than a quarter, and less than they would stretch by with the word on the next line divided by 2.015. Spaces at the start of a line, those before a tab, no-break spaces, and en, em and ideographic spaces aren't squeezed, so a line whose only spaces are those isn't, and a line with text in a border is squeezed as any other. Distributed paragraphs (`AlignmentType.DISTRIBUTE`) are squeezed less often, as their letters can stretch too, and Latin text justified for Thai (`THAI_DISTRIBUTE`) or with a low kashida (`LOW_KASHIDA`) as justified text is
+- justified paragraphs (`AlignmentType.JUSTIFIED`), whose spaces Word squeezes to fit one more word on a line, so they can have more words to a line than left-aligned ones. It squeezes them, in proportion to their widths, when that takes less of their width than a quarter, and less than they would stretch by with the word on the next line divided by 2.015. Spaces at the start of a line, those before a tab, no-break spaces, and en, em and ideographic spaces aren't squeezed, so a line whose only spaces are those isn't, and a line with text in a border is squeezed as any other. Distributed paragraphs (`AlignmentType.DISTRIBUTE`) are squeezed less often, as their letters can stretch too, and Latin and Thai text justified for Thai (`THAI_DISTRIBUTE`), and Latin text with a low kashida (`LOW_KASHIDA`), as justified text is
- automatic hyphenation (`hyphenation: { autoHyphenation: true }`), where Word certainly leaves the word after a line whole: in a paragraph that suppresses hyphenation (`w:suppressAutoHyphens`, in templates), and where its dictionary breaks no word like it. In compatibility mode 15, Word hyphenates a word that doesn't fit at the end of a line whenever a part of it fits with a hyphen, however little room that leaves: it has no hyphenation zone, so `hyphenationZone` changes nothing. Its English dictionary, which it hyphenates text in English or in no language by, leaves at least two letters before the hyphen, and breaks no word of fewer than five letters, nor numbers. It doesn't hyphenate text not checked for spelling (`noProof`), or in no language (`language: { value: "zxx" }`), nor words in capitals, typed so or shown so with `allCaps`, when the document says so (`doNotHyphenateCaps`). On a justified line it squeezes a word in rather than hyphenate it, and doesn't squeeze the spaces to fit a part. `consecutiveHyphenLimit` only leaves more words whole. Which parts Word breaks other words into is in its dictionaries, which the layout doesn't have, so it stops there (see below)
- paragraph borders (`border`, and `thematicBreak`), with the room Word gives them: a border above or below a paragraph takes its width and the space between it and the text, also at the top of a page, and at its foot, where the last line goes to the next page when its border doesn't fit below it. The space before and after goes outside the borders. Paragraphs next to each other with the same borders and the same left and right indents are one box, as Word draws them, whatever their borders between them: the top border above the first, the bottom border below the last, the border between them (`between`) of the first of each two between them, and no border where a page breaks the box. A paragraph with a page break before it starts a box of its own, with its top border, on the next page. The empty paragraph that ends a section takes no room for its borders, and paragraphs with the same borders either side of it, when it has none, are boxes of their own. Borders at the sides take no room, and leave the lines as wide as they are. Each style takes the room Word gives it: a double line three times its width, a triple line five times, and a wave 3 points whatever its width
- Word's automatic spacing (`beforeAutoSpacing`, `afterAutoSpacing`), as documents made from HTML have it: 14 points, the larger of two between paragraphs, in place of the space given. Word puts none above the first paragraph of the document, a table cell or a header, below the last of a cell, or between the paragraphs of a list, nor any for the empty paragraph that ends a section, and contextual spacing leaves it out as it does the space given. In a footnote it puts 14 points below the separator too, and keeps the last paragraph's space after at the foot of the page
@@ -217,8 +217,8 @@ The pages are laid out with the widths and heights of the characters of the font
- tables, with their columns' widths (`columnWidths`, or their cells' widths), their rows' heights, cell margins and borders. The columns of a table given no widths are sized to their text, as Word sizes them: each as wide as its longest line, or narrower when they don't all fit, but never narrower than its longest word, and a column whose cells give it a width keeps it. A cell merged across columns (`columnSpan`) widens them where its longest line needs more room, each in proportion to how wide it is, and a table in a cell counts as wide as its columns. In a table whose cells all have widths, a column with a word longer than its cells give it is widened to fit the word, and the other columns are narrowed to make room, as Word does, unless the table's layout is fixed. A table with a width of its own in twips is fitted to it, as Word fits it: when its columns are narrower, they are widened in proportion, and when they are wider, they are narrowed toward their longest words, or, when its layout is fixed, whatever is in them, each by the same share of the room for its text. When a word is longer than the table, its column is as wide as the word, and the table goes past the margin. Without a width of its own in twips, or with all of the width, a table whose columns' longest words don't fit in the room has each column narrowed to a share of it in proportion to its longest word, whatever width its cells give it, and the words break across lines, as Word breaks them. Where the rows of a table give a column different widths, each column is as wide as the widest a row gives it, and a cell merged across columns that is wider than they are widens the last of them, before they are fitted to the table's width, or, without one, narrowed to the room, unless its layout is fixed. A word in a cell merged across columns that is longer than they are wide is shared among them in proportion to each column's longest word and its longest line, or its width, added together, as Word shares it, and those columns keep its width when the others are narrowed. A long word with more text beside it widens them as its line does. Rows break across pages between the lines of their cells, as Word breaks them, keeping to widow and orphan control and lines kept together, and with room on the page for the space after a cell's paragraph that ends there. They move to the next page whole when a cell would have none of its lines on the page, when they are kept whole (`cantSplit`), and when the page hasn't room for the height they are set to. A row kept whole, or whose paragraph is kept together, that is taller than a page moves to a new page and breaks there as other rows do, and a row set to a height taller than a page takes a page of its own, cut off at its bottom, as Word lays them out. A cell merged down from such a row has its text in it, and the row's footnote starts at the bottom of the next page. A row set to at least a height taller than a page, whose text is taller than a page too, breaks where its text does, and each part of it fills its page. In columns, a row kept whole that is taller than a column goes down only the first column of each page, from the top of a new page unless it is at the top of this one, as a paragraph kept together does. Where a table breaks across pages, Word draws its bottom border below the last of it on the page, which takes room there too, or its cells' own bottom borders. Header rows are repeated at the top of each page and column a table is on, and they aren't left alone at the foot of a page: when none of the row after them goes there, as it is kept whole, kept with the next or set to a height, they go on to the next page with it, as Word moves them. The text of a cell merged down rows (`verticalMerge`) goes down from below the border above its first row across the others, to above the border below the last, and makes the last of them taller when it needs the room. Where one of its rows breaks across pages, its text breaks with the row, as far down the page as its lines go, keeping to widow control, as Word breaks it, and the rest of it goes on from the top of its rows on the next page, and on across the pages after when it breaks in the last of them. A table in a cell breaks with its row, between its own rows and in them between the lines of their cells, as Word breaks it: as a table in the text breaks, keeping to widow control, with its bottom border below the last of it on the page and its cells' margins around their lines on each page, and with its rows kept whole, or of a set height, moving to the next page whole. On the next page, Word draws its top border above the rest of it, and doesn't repeat its header rows. A table in a cell merged down rows breaks as one in a cell of a row, and so does one with cells merged down its rows whose text is in their first rows. An empty paragraph that ends a cell after a table in it takes no room, as Word lays it out
- table formatting, as Word lays it out. Borders come from the table's style and the table (`borders`), side by side, from its cells (`TableCell`'s `borders`), and from the parts of its style for some of its cells. Where two cells meet, Word draws the heavier of their borders, by its width and a weight for its style, but makes room for the wider, so each row is as much taller as the widest border above its cells and below those above it. Double, triple and the other styles of border take the room Word gives them, such as three times their width for a double border, and a border's `space` adds to it. A cell's text is as far in from a border beside it as its margin, or half the border when that is more. A row is as tall as its tallest cell's text, with the largest margins above and below of its cells, which needn't be the same cell's. Space between cells (`cellSpacing`) goes around each cell and inside the table's edges, and the table keeps its width, its columns narrowed for the space as Word narrows them, or widened to it in proportion, the space aside, and a column with a long word widened for it as in a table without the space. Where its rows give a column different widths, they are evened out as in a table without it, unless its layout is fixed. Each cell's own borders take room inside it, left and right of its text as well as above and below it, and the table's own go around the space. Where such a table breaks across pages, Word draws its bottom border below the last of it on the page, and its top border above the rest of it on the next. A row's own space between its cells is the table's, and space given as a share of the table's width is none, as Word lays them out. A row whose first cell's first paragraph is kept with the next (`keepNext`) is kept on the page with the next row, or, for the last row, with the paragraph after the table, and rows kept together that don't fit on a page of their own start a new page and break where it ends. Text that runs up or down a cell (`textDirection`) makes its row only as tall as a line of its paragraph mark, as Word breaks it into lines as long as the row is tall, and a row with it breaks across pages as other rows do, the text on the page of its first part. In a table sized to its text, its column is about as wide as a line of each of its paragraphs, however long, and a long word in it widens nothing. Text down with East Asian characters upright is laid out as text that runs down, and across with them on their side as text across. A table sized to its text that is indented (`indent`) is sized in the room the indent leaves. The parts of a table style for some cells, such as its first row, its last column or its bands of rows, apply where the table turns them on (`tableLook`), and where it doesn't say, as Word turns them on: its first row and column and its bands of rows. A header of several rows (`tableHeader`) is the table's first row, all of it, with the parts for its corner cells in each of its rows, and the bands of rows start below it, as Word applies them, but for a header of three rows with the first row turned off, whose bands start at its first row. A table style's own cell margins apply to its cells, and its own row height doesn't apply, as in Word, and a part of it for some rows gives them its height and not its space between cells. In [templates](#templates), a row's own table borders and cell margins (`w:tblPrEx`) apply to its cells, cells merged across columns as old versions of Word wrote them (`w:hMerge`) are one cell across them, and in a table whose cells all have widths, a cell whose text Word is told not to wrap (`w:noWrap`) has it wrapped all the same, and text fitted to its cell (`w:tcFitText`) is on one line a paragraph, as Word lays them out. In [templates](#templates), an empty last paragraph of a cell whose mark is hidden (`w:hideMark`) takes no room
- sections, with their page sizes, margins, columns, headers and footers, how they start, and their page numbering. Page numbers are written in Word's number formats as Word writes them, such as roman numerals, letters, words ("twenty-one") and the numbers of other languages, but for those it leaves blank (see below), and with chapter numbers in front of them (`chapterHeadingLevel`), such as 2-5 for page 5 of chapter 2. Each column's lines are broken at its own width, so a paragraph that goes on into a column of another width is broken again there, as Word breaks it. Widow control counts the lines left for the next column as they are broken in the column before, as Word counts them, and a table sized to its text keeps the widths it was sized to in each column it goes on into, as Word keeps them, going past the edge of a narrower one. Columns before a continuous section break are evened out, as Word evens them out, unless a column break is in them or a section in them started in the next column, and the next section starts below the longest. A section that starts in the next column (`SectionType.NEXT_COLUMN`) starts in the next column of the page when the section before has as many columns and one is left, as Word starts it, and on a new page otherwise. When its own columns are of other widths, it is laid out in the page's, where they are and as wide as they are, as Word lays it out, and in its own on the pages after. Its footnotes are laid out in its own columns. A continuous section numbered afresh (`pageNumbers: { start }`) leaves the page it starts on its number, and numbers the next on from its own first number, as Word does: 8 after a section numbered from 7 starts on page 12. When none of it fits on the page before, the page it starts at the top of is its first, numbered 7. One that starts in the next column of a page numbers on through the document, as Word numbers it. A gutter is beside the page's text, or above it in a document that puts it at the top (`w:gutterAtTop`), as Word takes it from the page's height, on every page with mirrored margins too, and below a negative top margin, which the header doesn't push the text below. A paragraph kept together that is taller than a column goes down only the first column of each page, as Word lays it out, from the top of a new page unless it is at the top of this one, and what follows it goes on below it. In columns of different widths it does when it is taller than each of them. One taller than some of them but not others goes in the first column, from where it is, that it fits in, as Word moves it: from the top of a narrow first column to a wide second, and past a narrow second column to a new page, in 3 columns or more as in 2, and the paragraphs kept with the next before it go with it. Paragraphs kept with the next before one taller than each column go to the new page with it, unless they are at the top of the page already, and it moves on to the next page, as Word moves them, so they are alone on theirs. A section that ends with a table has a line below it for the empty paragraph that ends the section, as Word has it
-- a section's document grid (`grid`), as Chinese and Japanese documents and Word's templates for them have it. On a grid of lines (`DocumentGridType.LINES`), each line takes as many of the grid's lines (`linePitch`) as its own height needs, with its text in the middle, as Word lays it out: at 360 twips, a line of Times New Roman of up to 15.5 points takes one, and from 16 points two. Multiple line spacing takes the grid's lines times the spacing when that is more, so 1.08 lines are 388.8 twips, at least a height takes that height when it is more, and exact spacing is as it is without the grid. The space before and after a paragraph isn't put on the grid's lines, a line of space before or after (in lines) is one of them, and the room below the last line's text can go below the bottom of the page. The lines of table cells, headers and footers aren't on the grid, nor the lines above footnotes and endnotes, but footnotes and endnotes are. A paragraph whose `snapToGrid` is off, in documents Word made, isn't on the grid's lines. A grid of lines and characters (`DocumentGridType.LINES_AND_CHARS`) also adds its `charSpace`, in 4096ths of a point, after each character, and a quarter of a character more between Chinese, Japanese or Korean characters and Latin letters, as Word does. One that snaps to characters (`DocumentGridType.SNAP_TO_CHARS`) puts each Chinese, Japanese or Korean character in as many cells as it needs, as many cells as fit across a column at the size of the Normal style's text and the `charSpace` more, spread evenly across it, and the other text between them on a line in as many cells as it needs together. Characters of indents are the grid's characters. A run with `snapToGrid: false` isn't on a grid of characters, and headers and footers aren't. Sections whose text direction (`page: { textDirection }`) runs across the page are laid out as those without one
-- text that runs down the page (`page: { textDirection: PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT }`, and the other directions down it of documents Word made), as Chinese and Japanese documents have it, laid out as Word lays it out: each line runs from the top margin to the bottom one, and the lines go across the page from the right margin, or from the left for the directions that put them that way, each as far from the one before as it is tall, on the section's grid if it has one. Chinese, Japanese and Korean characters in fonts whose characters are all an em, such as MS Mincho and SimSun, are an em down the line, and Latin text is on its side, as wide as it is across a page. Indents are from the top and bottom margins, and the space before and after a paragraph is across the page. The header and footer stay across the top and bottom of the page, and a header doesn't push the lines down. A section whose text runs down the page starts a new page after one whose text runs across it, as a continuous section does too
+- a section's document grid (`grid`), as Chinese and Japanese documents and Word's templates for them have it. On a grid of lines (`DocumentGridType.LINES`), each line takes as many of the grid's lines (`linePitch`) as its own height needs, with its text in the middle, as Word lays it out: at 360 twips, a line of Times New Roman of up to 15.5 points takes one, and from 16 points two. Multiple line spacing takes the grid's lines times the spacing when that is more, so 1.08 lines are 388.8 twips, at least a height takes that height when it is more, and exact spacing is as it is without the grid. The space before and after a paragraph isn't put on the grid's lines, a line of space before or after (in lines) is one of them, and the room below the last line's text can go below the bottom of the page. The lines of table cells, headers and footers aren't on the grid, nor the lines above footnotes and endnotes, but footnotes and endnotes are. A paragraph whose `snapToGrid` is off, in documents Word made, isn't on the grid's lines. A grid of lines and characters (`DocumentGridType.LINES_AND_CHARS`) also adds its `charSpace`, in 4096ths of a point, after each character, and a quarter of a character more between Chinese, Japanese or Korean characters and Latin letters, as Word does. One that snaps to characters (`DocumentGridType.SNAP_TO_CHARS`) puts each Chinese, Japanese or Korean character in as many cells as it needs, as many cells as fit across a column at the size of the Normal style's text and the `charSpace` more, spread evenly across it, and the other text between them on a line in as many cells as it needs together, with text spaced out by its run (`characterSpacing`) as wide as it is spaced. In columns of different widths each column has cells of its own. A left tab before Chinese, Japanese or Korean text, and a line beside a drawing, start at the next cell, a picture in the line takes as many cells as it needs, a word longer than its line goes on to the next, and a justified line isn't squeezed. Characters of indents are the grid's characters, and footnotes are on the grid as the body is. On a grid of lines and characters kerned text is kerned, and text in a font that isn't East Asian, such as digits in Calibri, has no quarter of a character beside Chinese, Japanese or Korean characters. Emphasis marks take their room in the line before it is put on the grid, with multiple line spacing too. A run with `snapToGrid: false` isn't on a grid of characters, and headers and footers aren't. Sections whose text direction (`page: { textDirection }`) runs across the page are laid out as those without one
+- text that runs down the page (`page: { textDirection: PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT }`, and the other directions down it of documents Word made), as Chinese and Japanese documents have it, laid out as Word lays it out: each line runs from the top margin to the bottom one, and the lines go across the page from the right margin, or from the left for the directions that put them that way, each as far from the one before as it is tall, on the section's grid if it has one. Chinese, Japanese and Korean characters in fonts whose characters are all an em, such as MS Mincho and SimSun, are an em down the line, and Latin text is on its side, as wide as it is across a page. Indents are from the top and bottom margins, and the space before and after a paragraph is across the page. Half-width katakana are on their side, half an em each. A tab to a left stop, a border around text or around the paragraph, emphasis marks, superscript and subscript, and a justified line with spaces take the room they take across the page, and a footnote goes below the text, at the left of the page. Two digits set across the line (`w:eastAsianLayout w:vert`) take as much room along it as the line is tall. A gutter is beside the right margin, a negative top or bottom margin is as far from the edge as a positive one, and a grid that snaps to characters puts its cells along the lines. The header and footer stay across the top and bottom of the page, and a header doesn't push the lines down. A section whose text runs down the page starts a new page after one whose text runs across it, as a continuous section does too, and a continuous one goes on on the page after text that runs down it the same way
## What it leaves blank
@@ -247,9 +247,9 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- a long word in a cell merged across columns, which Word makes room for in a way not yet followed: a word longer than those columns' longest words together, with or without more text beside it, when a table given no widths is narrowed to fit, and one whose share would leave a column narrower than its longest line or its width
- text in a font that isn't in the width tables, isn't given as a file (see [Measuring fonts from their files](#measuring-fonts-from-their-files)) and isn't embedded in the document, such as Garamond, Segoe UI or Roboto, so its lines may not be where Word puts them: Word draws it with the font's own widths, or in another font when it doesn't have it, such as Cambria on the Mac. Bold text in a font given or embedded without a bold face stops too, as Word makes the bold face itself, and so does bold text in the fonts of the tables that have none, Calibri Light, Franklin Gothic Book and Impact: Word draws each character 18 thousandths of an em wider than the regular at 10 points, and other sizes haven't been seen
- kerning and ligatures Word's PDFs haven't shown (see [Kerning and ligatures](#kerning-and-ligatures)): kerned text in a font whose kerning isn't known, such as Carlito or an East Asian font that isn't monospaced, or with a character outside Windows-1252, such as Greek or Cyrillic, or one that takes no room, such as a zero-width space or a combining mark; kerned Cambria before a hyphen, en dash, no-break space, ™, backslash or à; kerned text with ligatures other than standard and contextual ones in a font Word kerns only without ligatures, such as Trebuchet MS; Times New Roman's discretional ligatures, kerned, beside some characters; ligatures in a font whose ligatures aren't known, of a setting Word's Font dialog doesn't write, in regular Cambria, or beside a character outside Windows-1252 but for a Latin letter; kerning and ligatures across a soft hyphen, and kerned text before one in its font, with which the hyphen Word draws at the end of a line may be kerned; a word longer than its line with ligatures, as Word may break it inside one; text kerned or with ligatures on a document grid of characters; and in a font's file, substitutions other than ligatures in the setting's features, such as contextual ones. Text with OpenType number forms or spacing, stylistic sets or contextual alternates (`w14:numForm`, `w14:numSpacing`, `w14:stylisticSets`, `w14:cntxtAlts`) stops too, as their widths aren't known, but for lining tabular figures in regular Calibri and Cambria, and old-style tabular ones in regular Calibri, which are as wide as the font's default figures
-- a character whose width in its font isn't known, so its line may not be where Word puts it: a letter or symbol its font doesn't have, or its font's file has no glyph for, which Word draws in another font, such as most mathematical symbols in Calibri, Arial and Courier New, which Word draws in Cambria Math, and the Greek and Cyrillic letters Gill Sans MT doesn't have, which Word draws in Calibri; a few that Word drew in a way their widths can't be read from, such as Ž and Ё in Courier New; and a symbol font's own symbol, such as Wingdings' tick (`SymbolRun`), or a symbol whose character isn't four hexadecimal digits
+- a character whose width in its font isn't known, so its line may not be where Word puts it: a letter or symbol its font doesn't have, or its font's file has no glyph for, which Word draws in another font, such as most mathematical symbols in Calibri, Arial and Courier New, which Word draws in Cambria Math, and the Greek and Cyrillic letters Gill Sans MT doesn't have, which Word draws in Calibri; a few that Word drew in a way their widths can't be read from, such as Ž and Ё in Courier New; Arabic and Devanagari letters, which Word joins into forms of other widths, and Cambria's and Times New Roman's Devanagari digits, which Word draws in a font whose lines' height isn't known; and Hebrew, Thai, box drawing, shapes such as `docx`'s bullets ● ○ ■, symbols and dingbats in italic, or in a font other than Calibri, Cambria, Arial, Times New Roman and Courier New, such as Aptos, so a list of `docx`'s bullets in Aptos stops at its bullet; and a symbol font's own symbol, such as Wingdings' tick (`SymbolRun`), or a symbol whose character isn't four hexadecimal digits
- in a document that hyphenates its words, a line Word may end with a part of the next word and a hyphen: one with room for the word's first two letters and a hyphen, or its first letter in a language other than English, when the word has five letters or more, or two in such a language. A word longer than its line, a word squeezed onto a distributed line, and a table sized to its text whose columns are narrowed past a word Word may hyphenate, or given less than one, stop it too, as Word sizes columns to the parts of the words it hyphenates
-- a document that compresses its punctuation, or uses Word's strict rules for the characters that can't start a line
+- text in Chinese, Japanese or Korean (`language: { eastAsia }`) in a document that compresses its punctuation, or uses Word's strict rules for the characters that can't start a line. Text in no language is laid out as it is without them, as Word lays it out
- a soft hyphen where Word hasn't been seen breaking at it: where its hyphen ends a few twips before the end of the line, or at its end in a justified line, in a justified line that fits a part of the word squeezed and a shorter part as it is, and in a table whose columns Word sizes to their text or widens for long words
- a hidden paragraph mark Word hasn't been seen with, or lays out in a way not yet followed: between paragraphs of different styles or line spacing, or that differ in more than their alignment, left indent and space, at the edge of a content control, ending a section, and between paragraphs of text in a table whose columns Word sizes to their text. So do a paragraph with nothing shown and its mark hidden at the end of a header, footer or note, after a paragraph kept with the next (`keepNext`), between two with the same borders when it hasn't them, or with a field, note reference or list number after a paragraph joined to the next, and a footnote or endnote reference in hidden text, whose note Word doesn't lay out, but may count in the numbers of the notes after it
- text at a decimal tab stop with a picture before where it would line up, a decimal tab stop in a document whose decimal symbol isn't a full stop, and one of a paragraph's own tab stops past the end of the line in a paragraph indented past the margin, or in one with a first line or hanging indent, but for a left one after text, a left one at the start of a line in an indented paragraph, and a right, centred or decimal one in an indented paragraph, but for a right one after text indented on the right, and at the start of a line indented on the left; and a tab stop past the right indent in a justified line, or a left one whose text goes past the margin, and a left one past the margin in a paragraph indented past it, whose text goes past the end of the line
@@ -258,10 +258,10 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- indents in characters where the size Word measures them in isn't known: a right indent of a paragraph whose mark is another size than its style, a first line indent of a list's paragraph whose number is another size than its text, and a hanging indent in characters with a left indent of 0 characters and one in twips, or a left indent in characters with a hanging indent in twips
- a size given in a unit other than points, such as `size: "1cm"`, which Word ignores where it isn't a whole number of half-points and no style gives a size, and draws where it is and a style gives one
- emphasis marks with line spacing on a line with a picture or with marks both over and under text, and on a line taller than its fonts' own lines, such as one with raised text, at line spacing of less than a line or at least a height
-- on text that runs down the page: a table, a footnote or endnote, a tab, soft hyphen or picture, a drawing that text wraps around, Chinese, Japanese or Korean text in a font whose characters aren't all an em, such as Yu Mincho, half-width characters, a border around text, emphasis marks, raised text, superscript, subscript and small capitals, a paragraph border, a justified line with spaces, a gutter, mirrored margins, columns or a negative margin, a footer that goes above the bottom margin, and a continuous section break after it; and text in a direction Word's documents don't write
-- on a document grid: a grid of characters without the pitch of its lines, a grid that snaps to characters in columns of different widths, and on one, a footnote, text spaced out by its run (`characterSpacing`), a tab or picture, a soft hyphen, a line beside a drawing that text wraps around, an indent of part of a character, a word longer than its line and a justified line that only fits squeezed; on a grid of lines and characters, a number, punctuation or text of another size next to a Chinese, Japanese or Korean character, which Word may space in a way not yet followed; emphasis marks with line spacing; and endnotes from a section on another grid than the last
+- on text that runs down the page: a table, endnotes, and endnotes from text before it, a tab to a stop other than a left one, a soft hyphen or picture, a drawing that text wraps around, Chinese, Japanese or Korean text in a font whose characters aren't all an em, such as Yu Mincho, raised text and small capitals, two lines in one, text set across the line of more than two characters or of Chinese, Japanese or Korean ones, columns, mirrored margins, a gutter at the top or beside lines from the left, a footer that goes above the bottom margin, and a continuous section break after it into text that doesn't run down the page the same way; and text in a direction Word's documents don't write
+- on a document grid: a grid of characters without the pitch of its lines; on a grid that snaps to characters in columns of different widths, a table, a footnote, an indent in characters and a line beside a drawing that text wraps around; on a grid that snaps to characters, a tab but for a left one before Chinese, Japanese or Korean text, a picture after other text, an equation, a soft hyphen at the end of a line, kerning, an indent of part of a character and a distributed line that only fits squeezed; on a grid of lines and characters, a number, punctuation or text of another size in an East Asian font next to a Chinese, Japanese or Korean character, which Word may space in a way not yet followed; ligatures on a grid of characters; emphasis marks with at-least line spacing; and endnotes from a section that one on another grid follows, which Word may end with their own section
- a border around text of a style or width Word hasn't been seen to draw, as for paragraphs above but for an art border, thick and thin lines with a large gap of 4.5 points, a single line of an eighth of a point and a double line of none, or with a shadow or a frame, and a picture in text with a border
-- a paragraph justified for Arabic with a medium or high kashida (`MEDIUM_KASHIDA` and `HIGH_KASHIDA`), and Thai or Arabic text in one justified for Thai or with a low kashida, whose lines Word hasn't been seen breaking, and a justified or distributed line that only fits with its spaces squeezed when it has a four-per-em space, or en, em or ideographic spaces beside ordinary ones
+- a paragraph justified for Arabic with a medium or high kashida (`MEDIUM_KASHIDA` and `HIGH_KASHIDA`), and Arabic text in one justified for Thai or with a low kashida, whose lines Word hasn't been seen breaking, and a justified or distributed line that only fits with its spaces squeezed when it has a four-per-em space, or en, em or ideographic spaces beside ordinary ones
- page numbers in Thai and Hindi words (`thaiCounting` and `hindiCounting`), and page numbers Word writes as an error: any in `none`, 0 in Hebrew, Arabic, Thai and Hindi digits and Chicago's symbols, and those past where a format's letters run out, such as 781 in letters. Page numbers in Hebrew past 100, and in Hindi letters past 75 (`hindiVowels`) and 37 (`hindiConsonants`), haven't been checked in Word yet
- a chapter number from a heading in a table or a text frame
- a list number whose text or place Word hasn't shown: one in a format not yet written, such as Thai and Hindi words (`thaiCounting`, `hindiCounting`), or past where Word's lists start over, such as 32768 in roman numerals; one that shows a level its list doesn't have, or a level not counted yet that its list starts at a number of its own; a centred number followed by a space; a number with a border or emphasis marks, or raised or lowered; the tab after a number aligned to the right that ends at a tab stop of the paragraph's own, or, without a hanging indent, at the left indent off the default tab stops, or at a default stop past it; a line with nothing but a number of another size or font than its paragraph's mark; and a number taller than its line's text, with multiple line spacing. So do bullets that are pictures, numbers laid out as Word 6 laid them out, lists defined by a list style, and numbers aligned other than to the left, the centre or the right, which `docx` doesn't write
@@ -326,7 +326,7 @@ Where Word's PDFs don't show how it kerns or joins text, the layout stops, as [W
## How close it is
-Text in fonts made with the same widths as those five is measured exactly as them: Carlito as Calibri, Caladea as Cambria, Liberation Sans, Arimo and Helvetica as Arial, Liberation Serif and Tinos as Times New Roman, and Liberation Mono and Cousine as Courier New. Text in the fonts the document embeds (`fonts`) is measured from their files, as Word draws it in them. Text in Aptos, Office's default font since 2023, and Office's other fonts of the tables is measured with Word's own files of them: each word of a line of prose in each of them but Verdana, whose line Word's PDF broke in two, kerned and with ligatures as Word's Normal template has them, is within half a point of where Word puts it, across lines of 1,100 to 1,400 points. Text in other fonts, such as Garamond, stops the layout (see [What it leaves blank](#what-it-leaves-blank)), unless their files are given (see [Measuring fonts from their files](#measuring-fonts-from-their-files)). Characters the width tables don't have, such as Hebrew, Arabic and Thai letters, box drawing, shapes such as the bullets ● and ■, and emoji, are measured as an average letter of the font, or an em for emoji. The Latin letters of the East Asian fonts that aren't monospaced, such as Yu Gothic, and East Asian fonts Office doesn't have stop the layout too.
+Text in fonts made with the same widths as those five is measured exactly as them: Carlito as Calibri, Caladea as Cambria, Liberation Sans, Arimo and Helvetica as Arial, Liberation Serif and Tinos as Times New Roman, and Liberation Mono and Cousine as Courier New. Text in the fonts the document embeds (`fonts`) is measured from their files, as Word draws it in them. Text in Aptos, Office's default font since 2023, and Office's other fonts of the tables is measured with Word's own files of them: each word of a line of prose in each of them but Verdana, whose line Word's PDF broke in two, kerned and with ligatures as Word's Normal template has them, is within half a point of where Word puts it, across lines of 1,100 to 1,400 points. Text in other fonts, such as Garamond, stops the layout (see [What it leaves blank](#what-it-leaves-blank)), unless their files are given (see [Measuring fonts from their files](#measuring-fonts-from-their-files)). Hebrew, Thai, the Arabic-Indic and Devanagari digits, box drawing, shapes such as the bullets ● and ■, symbols and dingbats are measured as Word draws them in Calibri, Cambria, Arial, Times New Roman and Courier New, plain and bold, but for Cambria's and Times New Roman's Devanagari digits, and stop the layout in italic and in the other fonts, whose widths of them Word's PDFs haven't shown, as those Devanagari digits do. Arabic and Devanagari letters, which Word joins into forms of other widths, stop it too. Other characters the width tables don't have, such as Armenian letters and emoji, are measured as an average letter of the font, or an em for emoji. The Latin letters of the East Asian fonts that aren't monospaced, such as Yu Gothic, and East Asian fonts Office doesn't have stop the layout too.
Each change to `docx/layout` is checked against LibreOffice's layout of a set of documents, and against the pages Word marked in documents it saved. Word lays out some things differently from LibreOffice, so turn `updateFields` on if the page numbers must be Word's own once the document is opened in Word: Word then asks to update the fields, and works them out again. LibreOffice rounds the height of each line to whole twips, 269 for Calibri 11, so where a line only just fits on a page, it can be on the next page in LibreOffice and on this one in Word, and in `docx/layout`, which follows Word.
The unique identifier for this abstract numbering definition.