kumiori 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/CHANGELOG.en.md +333 -1
  2. package/CHANGELOG.md +332 -0
  3. package/README.en.md +47 -22
  4. package/README.md +48 -23
  5. package/THIRD_PARTY_NOTICES.md +894 -11
  6. package/dist-browser/THIRD_PARTY_NOTICES.md +894 -11
  7. package/dist-browser/chunks/{UTIF-BA_P1T7D.js → UTIF-DJ2yEO_P.js} +5 -2
  8. package/dist-browser/chunks/el-monoton-Bh-cSidd.js +684 -0
  9. package/dist-browser/chunks/{en-gb-c-j9Dxjw.js → en-gb-DLCXyvjY.js} +21 -2
  10. package/dist-browser/chunks/{en-us-FyKZ4pMu.js → en-us-BBLcTX9N.js} +11 -2
  11. package/dist-browser/chunks/{export-contract-BUdFW0fL.js → export-contract-DDGE_g3K.js} +4 -1
  12. package/dist-browser/chunks/{la-Cbb7zL-J.js → la-D46x91kc.js} +21 -2
  13. package/dist-browser/chunks/{pako-BWg-BM0p.js → pako-CeDDB8tF.js} +4 -1
  14. package/dist-browser/chunks/{rolldown-runtime-DfEuXgQw.js → rolldown-runtime-BXCUS5Bd.js} +3 -0
  15. package/dist-browser/chunks/ru-CkmoNumx.js +9694 -0
  16. package/dist-browser/chunks/uk-DIZr4Urv.js +6134 -0
  17. package/dist-browser/kumiori.js +54538 -37450
  18. package/dist-cli/THIRD_PARTY_NOTICES.md +894 -11
  19. package/dist-cli/cli.js +76129 -48486
  20. package/dist-lib/THIRD_PARTY_NOTICES.md +894 -11
  21. package/dist-lib/api-CQ3aOtc5.js +60782 -0
  22. package/dist-lib/api-CQ3aOtc5.js.map +1 -0
  23. package/dist-lib/index.js +11 -43698
  24. package/dist-lib/index.js.map +1 -1
  25. package/dist-lib/node.js +90 -0
  26. package/dist-lib/node.js.map +1 -0
  27. package/dist-lib/types/api.d.ts +74 -12
  28. package/dist-lib/types/arabicMarks.d.ts +16 -0
  29. package/dist-lib/types/areaResources.d.ts +20 -3
  30. package/dist-lib/types/areaTree.d.ts +2 -2
  31. package/dist-lib/types/arrayLoop.d.ts +13 -0
  32. package/dist-lib/types/assets.d.ts +29 -4
  33. package/dist-lib/types/base64.d.ts +7 -1
  34. package/dist-lib/types/canvasRenderer.d.ts +3 -3
  35. package/dist-lib/types/ccitt.d.ts +8 -0
  36. package/dist-lib/types/cff2Instancer.d.ts +45 -0
  37. package/dist-lib/types/cgm.d.ts +11 -0
  38. package/dist-lib/types/colorGlyph.d.ts +442 -0
  39. package/dist-lib/types/colorGlyphCanvas.d.ts +31 -0
  40. package/dist-lib/types/colorGlyphPdf.d.ts +115 -0
  41. package/dist-lib/types/colorGlyphSvg.d.ts +7 -0
  42. package/dist-lib/types/compat.d.ts +16 -7
  43. package/dist-lib/types/counterStyle.d.ts +14 -2
  44. package/dist-lib/types/counterStylePredefined.d.ts +1 -1
  45. package/dist-lib/types/cssCascade.d.ts +80 -6
  46. package/dist-lib/types/cssColorFunctions.d.ts +51 -0
  47. package/dist-lib/types/cssGradient.d.ts +49 -0
  48. package/dist-lib/types/cssSelector.d.ts +36 -4
  49. package/dist-lib/types/cssText.d.ts +31 -5
  50. package/dist-lib/types/cssTransform.d.ts +25 -0
  51. package/dist-lib/types/cssUnsupported.d.ts +6 -2
  52. package/dist-lib/types/cssUrlScan.d.ts +12 -0
  53. package/dist-lib/types/documentResources.d.ts +5 -5
  54. package/dist-lib/types/eps.d.ts +46 -7
  55. package/dist-lib/types/foContext.d.ts +18 -2
  56. package/dist-lib/types/foMathFallback.d.ts +11 -3
  57. package/dist-lib/types/foPageMaster.d.ts +6 -4
  58. package/dist-lib/types/fontInstancer.d.ts +56 -0
  59. package/dist-lib/types/fontLoader.d.ts +29 -0
  60. package/dist-lib/types/fontManager.d.ts +352 -10
  61. package/dist-lib/types/fontMapping.d.ts +53 -7
  62. package/dist-lib/types/fontSanity.d.ts +61 -0
  63. package/dist-lib/types/fontVariation.d.ts +45 -0
  64. package/dist-lib/types/fontkitCffFlex.d.ts +5 -0
  65. package/dist-lib/types/fontkitEmptyGlyph.d.ts +17 -0
  66. package/dist-lib/types/fontkitShaping.d.ts +135 -0
  67. package/dist-lib/types/footnotes.d.ts +9 -2
  68. package/dist-lib/types/geometry.d.ts +1 -1
  69. package/dist-lib/types/grapheme.d.ts +23 -0
  70. package/dist-lib/types/hebrewMarks.d.ts +22 -0
  71. package/dist-lib/types/htmlImport.d.ts +102 -7
  72. package/dist-lib/types/htmlPaged.d.ts +126 -16
  73. package/dist-lib/types/htmlPrepare.d.ts +91 -6
  74. package/dist-lib/types/htmlSvg.d.ts +20 -3
  75. package/dist-lib/types/hyphenation.d.ts +14 -3
  76. package/dist-lib/types/imageInfo.d.ts +6 -2
  77. package/dist-lib/types/imageLimits.d.ts +241 -0
  78. package/dist-lib/types/index.d.ts +6 -6
  79. package/dist-lib/types/indexCitation.d.ts +73 -0
  80. package/dist-lib/types/inlineFlatten.d.ts +52 -5
  81. package/dist-lib/types/inlineLayout.d.ts +229 -15
  82. package/dist-lib/types/jis.d.ts +7 -11
  83. package/dist-lib/types/layoutEngine.d.ts +92 -7
  84. package/dist-lib/types/ligature.d.ts +29 -0
  85. package/dist-lib/types/lineBreak.d.ts +24 -0
  86. package/dist-lib/types/lineMetrics.d.ts +13 -4
  87. package/dist-lib/types/linkPolicy.d.ts +80 -0
  88. package/dist-lib/types/lnode.d.ts +106 -32
  89. package/dist-lib/types/mathContent.d.ts +1 -1
  90. package/dist-lib/types/mathLayout.d.ts +14 -1
  91. package/dist-lib/types/measurer.d.ts +121 -5
  92. package/dist-lib/types/messages.d.ts +8 -2
  93. package/dist-lib/types/metafile.d.ts +7 -4
  94. package/dist-lib/types/node.d.ts +12 -0
  95. package/dist-lib/types/nodeFonts.d.ts +46 -0
  96. package/dist-lib/types/orthographicSyllable.d.ts +59 -0
  97. package/dist-lib/types/pageNumber.d.ts +7 -0
  98. package/dist-lib/types/paint.d.ts +29 -5
  99. package/dist-lib/types/paintEffect.d.ts +55 -0
  100. package/dist-lib/types/pdfLibPatches.d.ts +19 -1
  101. package/dist-lib/types/pdfRenderer.d.ts +14 -4
  102. package/dist-lib/types/pixels.d.ts +18 -2
  103. package/dist-lib/types/psCff.d.ts +10 -3
  104. package/dist-lib/types/psColorSpace.d.ts +1 -1
  105. package/dist-lib/types/psFilters.d.ts +20 -4
  106. package/dist-lib/types/psFonts.d.ts +2 -2
  107. package/dist-lib/types/psGraphics.d.ts +57 -7
  108. package/dist-lib/types/psInterp.d.ts +62 -2
  109. package/dist-lib/types/psOpsFont.d.ts +2 -2
  110. package/dist-lib/types/psOpsImage.d.ts +2 -2
  111. package/dist-lib/types/psOpsMatrix.d.ts +2 -2
  112. package/dist-lib/types/psOpsPath.d.ts +2 -2
  113. package/dist-lib/types/psOpsState.d.ts +2 -2
  114. package/dist-lib/types/psResources.d.ts +9 -1
  115. package/dist-lib/types/psShading.d.ts +19 -4
  116. package/dist-lib/types/resources.d.ts +116 -0
  117. package/dist-lib/types/sampleData.d.ts +3 -1
  118. package/dist-lib/types/sourceRef.d.ts +3 -3
  119. package/dist-lib/types/svg.d.ts +13 -2
  120. package/dist-lib/types/tableBorders.d.ts +7 -1
  121. package/dist-lib/types/tableLimits.d.ts +29 -0
  122. package/dist-lib/types/tableMarkers.d.ts +64 -0
  123. package/dist-lib/types/textJustifyTrim.d.ts +12 -0
  124. package/dist-lib/types/types.d.ts +783 -28
  125. package/dist-lib/types/unicodeData.d.ts +9 -1
  126. package/dist-lib/types/webFont.d.ts +4 -0
  127. package/dist-lib/types/webp.d.ts +2 -2
  128. package/dist-lib/types/xslfoImport.d.ts +15 -7
  129. package/package.json +9 -5
  130. package/dist-cli/apple-touch-icon.png +0 -0
  131. package/dist-cli/favicon.ico +0 -0
  132. package/dist-cli/favicon.svg +0 -4
  133. package/dist-cli/kumiori-logo-on-dark.svg +0 -6
package/CHANGELOG.en.md CHANGED
@@ -4,6 +4,338 @@
4
4
 
5
5
  Version numbers follow [Semantic Versioning](https://semver.org/). During 0.x, incompatible changes may also be released in a minor version (such as 0.2.0).
6
6
 
7
+ ## 0.2.0 (2026-11-12)
8
+
9
+ A release that adds flex features, WOFF/WOFF2, an API for loading referenced files, and more. While in 0.x, it is a minor release because it includes fixes that change typesetting results.
10
+
11
+ - **flex** (Flexbox 1; the CLI and the default layout path):
12
+ - Shrinking (`flex-shrink`, the automatic minimum size of `min-width: auto`), the growth limit (stop at `max-width` and share the rest), growing when the sum of `flex-grow` is below 1
13
+ - Reversed directions (`row-reverse`, `column-reverse`, `wrap-reverse`), containers with `direction: rtl`, vertical-writing containers
14
+ - Alignment: `baseline` and `last baseline`, cross-axis `margin: auto`, `start`, `end`, `left`, `right`, `safe` and `unsafe` for `justify-content`, `align-content` for wrapping containers
15
+ - Column direction: `row-gap`, `flex-basis`, `flex-shrink`, `flex-wrap` (wrapping into columns), growing in containers with a definite height
16
+ - `order` also applies to `::before`, `::after` and children of `display: contents`; text directly inside a container becomes an anonymous item
17
+ - Percentages in `gap`, `min-content` and `fit-content` for `flex-basis`, items with `visibility: collapse` (struts)
18
+ - **CSS**:
19
+ - Supports `visibility` (`hidden`, `collapse`) and `aspect-ratio`
20
+ - The horizontal margins of boxes with a definite width follow CSS 2.1 §10.3.3 (in a containing block with `direction: rtl`, boxes are placed from the right edge; a single `auto` margin takes the remaining space at layout time)
21
+ - Collapsing of the bottom margin of the last child of a box with `min-height` follows CSS 2.1 §8.3.1
22
+ - Sizes of boxes whose writing mode is orthogonal to the parent's (vertical writing inside horizontal, and horizontal inside vertical) now follow CSS Writing Modes 3 §7.3. **This changes typesetting results**: a vertical-writing float with a specified height wraps its lines at that height and is placed at the edge (before, long text ran on without wrapping and overlapped the body text). A vertical-writing item in a flex row takes its specified width (before, it shrank to the width of its lines), and without a specified width takes the width of its lines. A box with no specified size in its line direction (`height` for vertical writing) is fit-content (the length of the content, up to the available length), also inside table cells and absolutely positioned boxes. `max-height` and `min-height` act as the upper and lower limits of the line length
23
+ - A vertical-writing absolutely positioned box with no specified height (its size in the line direction) takes the length of its content (shrink-to-fit, CSS 2.1 §10.3.7; before, it extended to the bottom of the page). Fixed the `width` (cross size) of items in a vertical-writing flex container being dropped
24
+ - For a `display: block` image with both `width` and `max-width`, the wrapping box now has the width of the image
25
+ - Named pages: no first page is created for boxes outside the flow alone (absolutely positioned, floats, etc.) (CSS Page 3 §8.1)
26
+ - Properties that have no effect in print (`cursor`, `transition-*`, etc.) are no longer reported as unsupported CSS
27
+ - `box-decoration-break: clone` (CSS Fragmentation 3 §5.4) is supported. Each fragment of a box broken across pages or columns, and each fragment of an inline box broken across lines (the border and background of a `span`), is wrapped again with its border and padding (vertical writing too; `-webkit-box-decoration-break` is also read). Results with the initial value `slice` are unchanged
28
+ - Content-based sizes (CSS Sizing 3 §3.2): `min-content`, `max-content` and `fit-content` for `width`, `min-width` and `max-width` (`height`, `min-height`, `max-height` in vertical writing), and `fit-content(<length>)` (CSS Sizing 4 §3.2), are supported on block boxes and their floats, absolutely positioned boxes and inline-blocks (a keyword `width` on an item of a row flex container is read as that keyword of `flex-basis`). For the block axis, a keyword `height` behaves as auto. Keyword sizes on flex and grid containers and on tables are not supported and are reported in a warning. **A `fieldset` no longer becomes narrower than the min-content width of its content**, as the default HTML style sheet (`min-inline-size: min-content`) says
29
+ - `initial-letter` (CSS Inline 3 §7; drop caps): the `::first-letter` character is sized by a number of lines and sunk (`initial-letter: 3`, `3 2`, `3 raise`, `initial-letter-align: alphabetic | ideographic | leading`). Its size and position are decided from the `line-height` of the paragraph and the cap height or em box of the font. CJK text (`lang` of `ja`, `zh`, `ko`) is aligned by the em box. Vertical writing is supported. Declarations on boxes other than `::first-letter`, `initial-letter-align: hanging | border-box` and `initial-letter-wrap` are not supported
30
+ - `empty-cells: hide` (CSS 2.1 §17.6.1.1): borders and backgrounds of empty cells are not drawn in tables with separated borders; a row whose cells are all empty gets zero height
31
+ - Percentage values of `vertical-align` (CSS 2.1 §10.8.1): an inline box is raised or lowered by that percentage of its own `line-height`
32
+ - `text-align: justify-all` (CSS Text 3 §6.1): the last line is justified as well
33
+ - XSL-FO: when both of two nested boxes specify `.conditionality="retain"` for their borders and padding, the outer fragment now encloses the trailing border and padding of the inner fragment (it used to be shorter by that amount)
34
+ - Ruby placement: supports `ruby-position` (`under` places ruby below the base, to the left in vertical writing; combinations with `alternate`), `ruby-align` (`start`, `center`, `space-between`, `space-around`), `ruby-overhang` (an explicit `auto` lets ruby overhang adjacent kana and punctuation) and `ruby-merge: merge` (group ruby). The side and overhang of ruby without these properties are unchanged
35
+ - The default distribution of ruby characters is now the initial value `space-around` of `ruby-align` (CSS Ruby 1 §4.3). **The default arrangement of Latin and bopomofo ruby changes**: it is centered over the base without space between its letters (previously every letter was spaced out). Japanese (kanji and kana) ruby and base text are unchanged. Ruby in XSL-FO is unchanged
36
+ - Supports `font-variant-east-asian` (`jis78`, `jis83`, `jis90`, `jis04`, `simplified`, `traditional`, `full-width`, `proportional-width`, `ruby`; glyph forms and widths are selected through the font's OpenType features, and the values are also read from the `font-variant` shorthand)
37
+ - Supports the line style of underlines, overlines and line-throughs (`double`, `dotted`, `dashed` and `wavy` for `text-decoration-style`), their thickness (`text-decoration-thickness`) and the underline offset (`text-underline-offset`); the `text-decoration` shorthand accepts the line style and thickness. The underline of an `abbr` with a `title` is now dotted, as in browsers (it was solid)
38
+ - Supports the color (`text-emphasis-color`) and side (`text-emphasis-position`: `under` in horizontal writing, `left` in vertical writing) of emphasis marks; the `text-emphasis` shorthand accepts a color
39
+ - `fill`, `stroke`, `color` and related properties (`stroke-width`, `fill-opacity`, `stroke-opacity`, `opacity`, `fill-rule`, line caps, joins and dashes) in the document's CSS now apply to an `<svg>` written directly in the document. `currentColor` takes the `color` inherited from outside the `<svg>` (`svg { fill: currentColor }` with `.icon { color: red }` colours the icon). SVG images also honour the `color` attribute with `currentColor`, and the alpha of `rgba()` colours
40
+ - Support for the color functions `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`, `color()` (CSS Color 4) and `color-mix()` (CSS Color 5). Output is sRGB; colors outside the sRGB gamut are brought into gamut by reducing chroma while keeping lightness and hue (CSS Color 4 §14.2). Until now, declarations using these colors were dropped (the color fell back to the initial or inherited value)
41
+ - Supports transforms (the 2D functions `translate()`, `scale()`, `rotate()`, `skew()`, `matrix()` and lists of them for `transform`; `transform-origin`, `transform-box`; `translate`, `rotate`, `scale`) and opacity (`opacity`: the box and its content become translucent as a whole; PDF output uses a transparency group). Both take effect only when painting and do not change layout (positions, sizes, page breaks). 3D transforms are reported as unsupported
42
+ - Supports multiple backgrounds (comma-separated layers of `background-image` and `background`, with per-layer position, size and repetition) and `background-clip` / `background-origin` (`border-box`, `padding-box`, `content-box`; also applied to the area the background color is painted in). `background-attachment: fixed` and `background-clip: text` are reported as unsupported
43
+ - Supports `none` and `scale-down` for `object-fit`, `object-position` (the position of an image inside its box) and `list-style-image` (image markers for lists)
44
+ - Hyphenation limits (CSS Text 4 §6.3): supports `hyphenate-character` (the string shown at the end of the line, also for lines broken at a soft hyphen), `hyphenate-limit-chars` (minimum characters in the word and before and after the break), `hyphenate-limit-lines` (maximum number of successive hyphenated lines), `hyphenate-limit-last: always` (no hyphenation before the last line of a paragraph) and `hyphenate-limit-zone`. `column`, `page` and `spread` of `hyphenate-limit-last` are not supported (reported as a warning)
45
+ - Background images are painted under the border with the initial value of `background-clip` (`border-box`) (CSS Backgrounds 3 §2.7). **The rendered result changes**: in HTML, the background image or gradient of a box with a border is now painted under the border as well. With dashed, dotted or double borders, or transparent or translucent borders, the background image shows through the gaps in the lines (a repeated image is tiled from the top left of the padding box under the border as well; the position of a non-repeated image does not change). With opaque solid borders nothing changes, since the border hides it. To paint only inside the border as before, specify `background-clip: padding-box`. XSL-FO backgrounds are unchanged (XSL 1.1 §4.9.4)
46
+ - Transparent and translucent border colors (HTML). **The rendered result changes**: a border with `border-color: transparent` used to be drawn as a black line and is no longer drawn (it still takes up its width). A border with a translucent color (`rgba()` and so on) is blended over the background beneath it with that opacity, instead of being drawn in an opaque color mixed with white (PDF output uses a transparency group; PDF/X-3 issues a warning)
47
+ - CSS gradient backgrounds (`linear-gradient()`, `radial-gradient()` and their `repeating-` forms) are now also drawn on screen (Canvas: `renderPage` and the app view). **Previously they were drawn only in the PDF and were missing on screen** (the PDF output is unchanged)
48
+ - Line decorations (underlines etc.) and atomic inlines (CSS Text Decoration 3 §2). **The rendered result changes**: a link with `display: inline-block` used to get two underlines (one under its text and one at the bottom of the box); it now gets only the one under its text. Images and inline-block boxes inside an underlined element are themselves no longer decorated (the line under an image inside a link disappears), and the lines of ancestors are not propagated to the contents of inline-blocks and inline-tables (the text before and after is still decorated, as in browsers). XSL-FO output is unchanged
49
+ - The width of a box sized to its contents (`inline-block`, floats, absolutely positioned boxes, etc.) that inherits an indent (`text-indent`) now includes the indent (CSS Text 3 §8.1). **The layout result changes**: previously the box was too narrow by the indent, so its first line wrapped or its text stuck out of the box (the default style indents paragraphs by one character, so an `inline-block` inside a paragraph was affected). Now the box is wider by the indent and the contents fit on one line. To avoid indenting inside the box, specify `text-indent: 0` on it
50
+ - `margin` on inline images (`img`; all four sides; CSS 2.1 §8.3 and §10.8). **The layout result changes**: previously the `margin` of an inline image was not read, so the image sat tight against the neighbouring text or images (the `margin` of block and floated images already worked). Now the left and right margins add space before and after, and the top and bottom margins count toward the line height (the `hspace` and `vspace` attributes too). For an inline image with a border, padding or background color, only the left and right margins apply (top and bottom are reported in a warning)
51
+ - List items, table rows and forced breaks inside them (CSS Fragmentation 3 §2.1, §3.1 and §4.3). **The layout result changes**: `break-before` and `break-after` (`page` and so on) now take effect on blocks inside an `li`, on the `li` of a nested list, and on blocks inside a table cell (the item or row is split at that point; previously they were ignored). `left`, `right`, `recto` and `verso` on an `li` in the middle of a list or a `tr` in the middle of a table insert a blank page until the parity matches (previously they only started a new page). `column` on such an `li` or `tr` inside a multi-column context takes effect. `page` on such an `li` or `tr` in a document whose pages are set in columns starts a new page, not the next column. `break-before: column` and `break-after: column` outside a multi-column context have no effect (previously they started a new page even where there were no columns). In XSL-FO too, `break-before` and `break-after` on a block inside a table cell or a list item body split the row at that point (XSL 1.1 §4.8; previously ignored)
52
+ - Containing blocks of absolutely positioned boxes (CSS 2.1 §10.1, CSS Position 3 §2.1). **The layout result changes**: a `position: absolute` box inside a table, table cell, list item or vertical-writing box with `position: relative` (or `transform`) is placed relative to the padding box of that box. When a table or list item lies between the box and its reference block, that block is still the reference (previously the body region of the page was used in all these cases, and the position was far off). The `position: relative` offset of a block in vertical writing is now applied in physical directions (`left` horizontally, `top` vertically). An element within a line (`span`, `inline-block`) with `position: relative` is also a reference (the rectangle around its padding boxes). A `position: absolute` box inside an inline element is no longer dropped. An absolutely positioned box in the middle of the text of a paragraph no longer splits the line. The `position: relative` offset (`top`, `left` and so on) of elements within a line (`span`, `inline-block`, `img`) now takes effect (CSS 2.1 §9.4.3; previously ignored)
53
+ - Percentages for `top`, `bottom` and `height` of absolutely positioned boxes (CSS 2.1 §10.5, CSS Position 3 §3.1). **The layout result changes**: `top: 50%`, `top: 100%` (the drop-down pattern), `bottom: 10%`, `inset: 10%` and `height: 50%` are read as fractions of the height of the padding box of the containing block (when the height of that box depends on its content, the height after layout; with no positioned ancestor, and for `position: fixed`, the height of the page content area; also for absolutely positioned `::before` and `::after`). Before, percentages for `top` and `bottom` were treated as absent (the box appeared at the top of the reference box or where it was found), and percentages for `height` were taken from the content height of the parent
54
+ - Positions of absolutely positioned boxes (NC-28). **The layout result changes**: an absolutely positioned box in the middle of a line of a paragraph whose `left` and `right` (and `top` and `bottom`) are `auto` is placed where it was found in the line (the static position; CSS 2.1 §10.3.7, §10.6.4). Before, it was placed at the start of the first line of the paragraph and overlapped the preceding text. Boxes found inside table cells are handled the same way. An absolutely positioned box inside a flex or grid container (horizontal writing) with `position: relative` (or `transform`) is placed relative to the padding box of the container (CSS Flexbox 1 §4.1, CSS Grid 1 §9.1; before, the body region was the reference). A `position: static` flex or grid container whose height depends on its content lets the reference pass through to an outer containing box. The `position: relative` offsets (`left`, `top`, etc.) of list items (`li`) and table cells (`td`, `th`) now take effect (CSS 2.1 §9.4.3; a list item moves together with its marker, and row heights and the positions of other cells do not change; before, they had no effect)
55
+ - Tables with `writing-mode` (CSS Writing Modes 3 §2.1, CSS 2.1 §17). **The layout result changes**: a table (`table`, `display: table`) with `writing-mode: vertical-rl` or `vertical-lr` in a horizontal document is laid out vertically (rows run from right to left and the cells in a row from top to bottom; previously the `writing-mode` of the table was ignored and it was laid out horizontally). The same applies to a `horizontal-tb` table in a vertical document. The size of a table with separated borders (`border-spacing`) whose writing mode differs from its parent now includes the cell spacing
56
+ - Anonymous table rows and cells (CSS 2.1 §17.2.1). **The layout result changes**: content that is not a table part (text or other elements) directly inside a table (`display: table`, `inline-table`) or a row (`table-row`) is wrapped in an anonymous row and an anonymous cell (previously it was dropped, for example the text of `<span style="display: inline-table">text</span>`)
57
+ - `text-indent` on tables (CSS Text 3 §8.1 and the HTML default style sheet). **The layout result changes**: `text-indent` specified on a table now applies to the lines in its cells (previously ignored). `text-indent` from outside a table (`body`, `div` and so on) does not enter the table (`table { text-indent: initial }`; previously the outer indent applied to the lines in cells; this matches browsers)
58
+ - Outlines (`outline`, `outline-width`, `outline-style`, `outline-color`, `outline-offset`; CSS UI 4 §3) are supported. A line that takes up no space is drawn outside the border box (rounded on boxes with rounded corners; an inline element that breaks across lines and a block that breaks across pages are enclosed fragment by fragment). They were previously reported as unsupported CSS
59
+ - The clipping rectangle (`clip: rect(…)`; CSS 2.1 §11.1.2) is supported. **Results change for absolutely positioned boxes with `clip`**: the background, border and content of the box are drawn clipped to the rectangle. A box with the screen-reader-only idiom (`clip: rect(0 0 0 0)`) is not drawn. Previously `clip` was reported as unsupported CSS and the box was drawn without clipping
60
+ - Tab size (`tab-size`; CSS Text 3 §4.2) is supported. **Results change for tab characters inside `pre` and the like**: a tab character (U+0009) inside `white-space: pre`, `pre-wrap` or `break-spaces` now advances to the next tab stop (every 8 spaces from the content edge of the block; changeable with `tab-size`) (CSS Text 3 §4.1.2). Previously the tab character was drawn as the missing-glyph mark (□)
61
+ - For an `<svg>` written inline in the document, `stop-color`, `stop-opacity`, `text-anchor`, `clip-rule`, `marker` (`marker-start`, `marker-mid`, `marker-end`) and `vector-effect` now also take effect from the document's CSS (like `fill`, `stroke` and so on). Properties that apply only to SVG elements (`paint-order`, `cx`, `r` and so on) are no longer reported when the document has no `<svg>` (no element they apply to exists; with an `<svg>` they are reported as "unsupported (SVG elements)"; previously they were "unknown properties"). The rendering hints (`shape-rendering`, `text-rendering`) are not reported
62
+ - **Links and bookmarks**: `<a href>` on blocks, flex containers and tables makes the whole box a link; relative-reference links (GoToR for PDFs, Launch for other files; Launch is not written by default, see "Security" below); `h1` to `h6` become bookmarks with every default style (CSS GCPM 3 Appendix B). Added an option that writes relative-reference links as a URI action with the reference as written (`/S /URI /URI (x.pdf)`; `%xx` is not decoded): `links: { relative: 'uri' }` in the API and `--link-relative uri` on the command line (the default stays `'file'`). Such links also work in PDF viewers inside browsers, which do not handle GoToR and Launch. Relative non-PDF files are then written without `launch` (absolute paths and `//host/…` only with `launch: true`). For file names with non-ASCII characters (GoToR, Launch), `F` of the file specification dictionary is now the UTF-8 bytes of the same name instead of a name with `_` substituted (`UF` remains the Unicode name)
63
+ - **Tables**: in tables with `border-collapse: collapse`, the border between a table header or footer repeated at a page break and the adjacent row is chosen again from the borders on both sides (XSL 1.1 §6.7.10, CSS 2.1 §17.6.2.1)
64
+ - **Fonts**: reads WOFF and WOFF2 (including font collections) (`--font`, `fonts`, `@font-face`); fonts referenced by `@font-face` over `http(s):` are also fetched (only those whose `unicode-range` overlaps the characters of the document)
65
+ - **Variable fonts** (OpenType Font Variations, with TrueType outlines or CFF2 outlines): typeset with the shape (instance) for each combination of axis values. **Results change for documents that use variable fonts**: previously they were typeset as a single weight with the default instance; bold was synthesized by thickening the outlines and `font-stretch` scaled the glyphs
66
+ - `font-weight` → weight axis (wght; no synthetic bold), `font-stretch` / `font-width` → width axis (wdth; glyphs are not scaled), `font-style` `italic` / `oblique <angle>` → ital / slnt axis (if present), `font-optical-sizing` → optical size axis (opsz; the font size in px for HTML, in pt for XSL-FO), `font-variation-settings` (any axis). The precedence follows CSS Fonts 4 §7.2
67
+ - `@font-face` ranges `font-weight: 100 900`, `font-stretch: 75% 125%`, `font-style: oblique 0deg 10deg`, and the `font-variation-settings` and `font-named-instance` descriptors. A variable font without a `font-weight` descriptor also gets its weight axis set (for variable fonts whose default instance is not weight 400, the regular-weight glyphs change too)
68
+ - Variable fonts given with `--font`, `fonts` or alongside an XSL-FO document use the full range of their axes. For XSL-FO, the family name of a variable font is now nameID 16 of the name table (the name covering all weights and widths)
69
+ - In the PDF, each combination of axis values in use is embedded as a static font (advances from HVAR, kerning and mark positions from GPOS, font-wide metrics from MVAR, and glyph substitutions from FeatureVariations are those of the instance). On screen, the instance is registered with the browser as a static font and drawn with it
70
+ - Area Tree: `fontFamily` of a glyph that uses an instance carries a mark for the axis values other than weight (`{;wdth=75}`). Instance entries in `resources.fonts` gain `variation` and `sourceSha256`. `TextStyle` gains `fontVariationSettings`, `fontOpticalSizing`, `fontOpticalSizeUnit` and `fontObliqueAngle`
71
+ - Variable fonts with CFF2 outlines (variable OTF fonts) are also typeset with the shape for each combination of axis values. In the PDF they are rebuilt and embedded as static CFF fonts, including the default instance (previously the font embedded in the PDF was broken: text was displayed with a substitute font and could not be extracted). The shapes do not change, but the hints are not carried over. Non-variable fonts with CFF2 outlines can be embedded in the same way
72
+ - Fixed a nested `font-stretch` that returns to 100% (normal) keeping the width inherited from the parent
73
+ - **Font lists** (HTML `font-family`): for each character (for combining sequences and emoji sequences, the whole sequence), the list is tried in order and the first font that has the character is used (CSS Fonts 4 §5.2, §5.3). The typeset result changes for lists where a generic name or the name of a default font comes before a loaded font (`--font`, `fonts`, `@font-face`), such as `"Noto Serif JP", "Noto Emoji", serif`, and for lists with two or more loaded fonts (spaces, digits and symbols that an earlier font has are no longer typeset with a later loaded font; the third and later fonts are also tried in order; Japanese characters are typeset with the font of the generic name)
74
+ - **Fonts with colored glyphs** (color emoji and so on): glyphs in the OpenType COLR/CPAL (versions 0 and 1; gradients, transformations, compositing), CBDT/CBLC, sbix and SVG tables are typeset in color. In the PDF they are written as a Type 3 font (the extracted text is the original emoji; each glyph is defined once in the document). The same shapes can be drawn on screen (Canvas). `font-palette` and `@font-palette-values` (`base-palette`, `override-colors`) select the palette. A character followed by U+FE0F is set in a color font, and one followed by U+FE0E in a font without colored glyphs. `fontPalette` was added to `GlyphArea` in the Area Tree (present only when the palette is not the default). **Until now, using a COLR font (Noto Color Emoji, Twemoji) crashed while writing the PDF, and CBDT fonts without outline tables could not be typeset**
75
+ - **Glyph shapes of OpenType fonts with CFF outlines (.otf)** (wherever glyphs are drawn from their outlines: outline drawing on the screen (Canvas), math, SVG text, colored glyphs. Body fonts embedded in the PDF were already correct, because the glyphs of the font are embedded as they are. Results with the default fonts (TrueType outlines) do not change):
76
+ - In Japanese, Chinese and Korean fonts (CID-keyed; the .otf of Noto Sans JP, Source Han Serif and so on), some characters were drawn with a completely different shape or could not be drawn (the first glyph of each group of glyphs inside the font; in the Noto Sans JP .otf, 29 characters such as ":", "・", "※", "±", "■" and "ゝ"). This is fixed. Punctuation spacing and line breaking do not change
77
+ - Glyphs that use the shallow-curve operators (Type 2 `hflex` and `hflex1`; fonts converted from Type 1, the mathematical monospace letters of the STIX Two Math .otf, and so on) had part of their outline shifted vertically by a few units, leaving a small step at a corner. This is fixed. The glyph bounding box is corrected too, so **in math that uses these glyphs, the height and depth of characters may change by a few units**
78
+ - **PDF**: in ToUnicode, ligature characters (U+FB01 etc.) map to the original character sequences (fi etc.), so text extraction and search find words such as "confiance"
79
+ - **API**:
80
+ - `resolveResource(url)`: asks for files referenced by the document or CSS that are not in `files`
81
+ - `fetchStyles`: fetches CSS referenced by the document over `http(s):` (including `@import` targets; default `true`)
82
+ - `kumiori/node`: `createFontLoader` (the same default-font loading and cache as the CLI), `createFileResolver` (reads `file:` references), `defaultFontCacheDir`, `looksLikeFont`
83
+ - Images returned by `resolveResource` are now used even when the URL has no extension (`<img src="https://example.com/img?id=1">`, and likewise `background-image`, `list-style-image`, `content: url()` and XSL-FO `external-graphic`). The image is recognized from the leading bytes of the content. **Previously, for a URL without an extension the returned content was not used and the image was fetched again from the network** (or was unreadable with `fetchImages: false`). Whether to fetch from the network (`fetchImages`) is decided as before
84
+ - `pageSize`: changes the default paper for HTML (the paper of a document that does not specify `size` in `@page`; it was fixed to A4). Written like the CSS `size` property (`"A5"`, `"A5 landscape"`, `"148mm 210mm"`; CSS Paged Media 3 §7.1). A `@page { size }` in the document wins, and `width`, `height` and `orientation` in `@media` are evaluated against this paper. Without it the paper is A4 as before
85
+ - `genericFonts` and the CLI `--generic-font`: the Latin font of the monospace generic family (`monospace`; Cousine by default) and the Japanese fonts of the generic families (`serif-cjk`, `sans-serif-cjk`; Noto Serif JP and Noto Sans JP by default) can also be replaced (CSS Fonts 4 §2.1.3; Japanese text in monospace uses the `sans-serif-cjk` font in HTML and the `serif-cjk` font in XSL-FO). Unknown names in `genericFonts` are now an error (they used to be treated as `sans-serif`)
86
+ - **CLI**: reads references given as `file:` URLs; `--no-fetch-styles` disables fetching CSS; `--page-size <size>` changes the default paper for HTML (`A5`, `"A5 landscape"`, `148mm,210mm`; the same as `pageSize` in the API)
87
+ - **Page number references inside flex items**: the box of a flex item that contains `target-counter(…, page)` (such as the `::after` of a table-of-contents line) now fits the digits of the number as typeset. It used to be one digit wide, so with `word-break: break-word`, `overflow-wrap: anywhere` and the like a two-digit number broke into "1 / 0" and the table of contents grew longer
88
+ - **`createFileResolver`** (`kumiori/node`): `root` accepts a list of directories. Containment is checked on the real paths after resolving symbolic links (a link inside the root could be used to read a file outside it; the checks for another drive on Windows and for file names starting with `..` are also fixed)
89
+ - **Security** (protection when typesetting documents written by others):
90
+ - Link actions in the PDF are limited to safe ones. By default only destinations inside the document, URLs with the schemes `http`, `https`, `mailto` and `tel`, and relative references to PDFs (GoToR) are written. Other schemes (`javascript:`, `data:`, `file:` and so on), actions that open a relative non-PDF file (Launch, including `.html`), absolute paths to PDFs and `//host/…` are typeset as plain text without an action and reported in a warning. To get the previous behavior, use `links: { schemes: ['*'], launch: true }` in the API or `--link-schemes '*' --link-launch` on the command line. Schemes are read the way browsers do, after removing leading and trailing control characters and tabs and newlines anywhere (`java<TAB>script:` is dropped too). The same applies to links, bookmarks and form submit targets in XSL-FO
91
+ - A file attachment annotation (`axf:annotation-file-attachment` in XSL-FO) now attaches only files passed in `files` (for the command, files in the input directory). Resources collected by following references (`file:` files returned by `resolveResource`, CSS and fonts fetched from the network) are never attached. An attachment copies the bytes of a file into the PDF as they are, so when collected resources could be attached too, a document written by someone else could, with the default settings, copy files of the machine that typesets it (`file:///etc/passwd`) or responses from the internal network (`http://169.254.169.254/…`) into the output PDF, by making another reference (`<link>`, `url()`; even one written inside an XML comment is picked up) collect them
92
+ - Parentheses in PDF strings are escaped: the name after `#` in a link to a relative PDF (GoToR) and the name of an attached file were written into literal strings as they were, so a `)` could close the string and add entries (`/S /JavaScript /JS (…)` and so on) to the action dictionary, bypassing the link restriction above. For file names the same was possible with characters whose low 8 bits are a parenthesis (U+0128, U+0129). A file name with non-ASCII characters (`資料.pdf`) is now written as a file specification dictionary (ISO 32000-2 §7.11.3, with the Unicode name in `UF`), and the name of a named destination as UTF-8 bytes (before, only the low 8 bits of each character were written, and links to PDFs with Japanese names could not be opened)
93
+ - Node command: control characters in warnings and error messages (escape sequences and line breaks written in the document) are printed in a visible form such as `\x1b`, so that a document written by someone else cannot rewrite the screen or the title of the terminal of the person who typesets it, or forge report lines
94
+ - The allow function passed to `fetchImages` / `fetchStyles` is also asked about redirect targets. On Node, redirects are followed one hop at a time and no request is sent to a target that is not allowed (up to 20 hops). A redirect from `https:` to `http:` is not followed even with the default (`true`). In browsers the request does reach the redirect target, and the response is discarded if the target is not allowed (browsers do not expose the target beforehand)
95
+ - Size limits for CSS (16 MB), fonts (128 MB) and images (256 MB) fetched from the network; reading stops as soon as the limit is exceeded
96
+ - Limits on EPUB decompression (256 MB per entry: skipped with a warning beyond it; 1 GB in total and 65,535 entries: an error beyond them)
97
+ - `root` of `createFileResolver` is checked on real paths (see the item above)
98
+ - GitHub Actions: the token of the CI workflow is read-only, and the permissions to deploy to Pages and to publish to npm are given only to the jobs that deploy and publish. Publishing now takes the tarball built by the checking job and publishes it from a job that installs no dependencies and runs no scripts
99
+ - GitHub Actions: the actions used by the workflows are now pinned to commit SHAs instead of tags (`@v6` and so on); tags can be moved later, and this keeps a workflow that holds publishing rights from running different code. Dependabot (`.github/dependabot.yml`) opens PRs for updates
100
+ - Node command: `--no-outside-files` stops reading files outside the input directory that the document points at with `file:` URLs or `../` (for documents written by others; by default they are still read)
101
+ - Network images are fetched up to 8 at a time, and fetching the images of a document has an overall time limit (10 times the limit of a single fetch, 5 minutes by default). They used to be fetched one at a time, so a document listing unresponsive URLs kept fetching for as long as it liked. Fetched images are registered in document order (which image a bare file name resolves to no longer depends on response speed)
102
+ - A Content Security Policy for the browser app (`index.html`; only the site's own scripts run). Dependabot now also watches the npm dependencies
103
+ - **Supported Node versions**: `engines` is now `^20.19.0 || >=22.12.0` (0.1.1 had `>=20`; the runtime dependencies require 20.19.0 or later, and Node 22.0 to 22.11 cannot load ES modules with `require()` and are excluded). CI now also runs type checking and the unit tests on the minimum, Node 20.19.0
104
+ - **Robustness against broken or crafted input** (input that used to hang or crash the process now makes only that image or declaration unreadable; the limits and their rationale are in the source comments):
105
+ - Layout: fixed a hang when a paragraph beside a narrow float gap directly follows a table with `border-collapse: collapse` and an outer border. As a consequence, a box moved below a float (`clear` etc.) right after such a table is now placed exactly at the bottom edge of the float (it used to overlap it by half the border width; CSS 2.1 §9.5.2)
106
+ - XSL-FO: `fo:retrieve-marker` and `fo:marker` inside `fo:marker` are skipped and reported (XSL 1.1 §6.13.5, §6.13.6); an FO document whose elements nest 250 levels or deeper fails with a clear error
107
+ - Math: no crash on extreme `scriptlevel` (math-depth is clamped to ±100; MathML Core 4.5), long `mtext`, very many children or deep nesting (up to 300 levels)
108
+ - HTML and CSS: no crash on `attr()` without arguments, cyclic or exploding `@import`, multiply nested `var()`, huge `colspan`, `rowspan` and `<col span>` (the HTML limits of 1000 and 65534), huge `repeat()` (up to 10000 columns), or overlong counter representations (the fallback style is used beyond 1000 characters; CSS Counter Styles 3 §2). Elements nested deeper than 128 levels are read as following siblings of their ancestor at level 128, with a warning. An `@import` dropped because too much CSS was imported is also reported as a warning. An image URL that could not be fetched is tried only once (the image list of the import report no longer contains duplicates)
109
+ - SVG: no hang on path data with numbers after `Z`, multiplicative expansion of `use`, marker, pattern and mask (up to the number of elements + 500,000 visits), or a long `<style>`
110
+ - WMF, EMF and CGM: point counts, character counts and color table sizes are bounded by the record length; the images of one document may total up to 64 million pixels
111
+ - WMF, EMF and CGM: the total number of pixels that may be turned into images is now also bounded by the file size (260 thousand pixels + 1,024 pixels per byte of the file; the overall limit of 64 million pixels is unchanged). A file of a few hundred bytes using run-length codes (RLE DIBs, run-length cell arrays, tile arrays) could produce a 64-million-pixel image (over a minute and 1.7 GB of memory). **A small file holding an image sparser than 1,024 pixels per byte (for example a large, almost blank scanned image) no longer has that image drawn** (the rest of the document is typeset; a file larger than about 61 KB may use the full 64 million pixels as before)
112
+ - CGM, WMF and EMF: patterns (CGM PATTERN TABLE and geometric patterns, WMF/EMF pattern and hatch brushes) no longer write out the whole pattern definition every time they are used; identical contents share one definition (for CGM, each use is a pattern that references the content pattern by href and only gives its placement; SVG 2 §14.3.4). A CGM of about 27 KB using a 4,096-cell pattern 2,000 times used to fail with an over-long SVG string (about 8 seconds); it now takes 0.6 seconds and produces 520 thousand characters. When the cells of a CGM pattern are written as rectangles, each cell counts as 16 pixels towards the pixel limit. The drawings do not change
113
+ - GIF: the number of pixels is now also bounded by the file size (1 million pixels plus 4,096 pixels per byte of the file, up to 100 million). GIF dimensions are 16-bit, so a 34-byte file could specify 10000 × 10000 pixels, taking 12 seconds and 2.1 GB of resident memory to typeset. GIFs over the limit are not read; a placeholder frame is drawn with a warning. LZW codes are at most 12 bits and one code stands for at most 4,096 pixels (GIF89a, Appendix F), so legitimate GIFs (at most about 2,730 pixels per byte) stay within the limit
114
+ - WebP, JPEG and CCITT: the number of pixels is now also bounded by the data size (1 million pixels plus, per byte, 2,048 pixels for VP8, 32,768 pixels for VP8L and the canvas of animated WebP, 1,024 pixels for JPEG, 2,048 pixels for one-dimensional CCITT coding and 131,072 pixels for two-dimensional coding; with two-dimensional coding the number of rows is at most the number of data bits). A file of a few dozen to a hundred-odd bytes with only large dimensions created a 100-million-pixel array, taking 11 to 19 seconds and 2.1 to 2.6 GB to typeset (a 50-byte VP8: 18.9 seconds and 2.6 GB). The VP8, JPEG and one-dimensional CCITT values exceed the most pixels one byte can represent in the standard coding (the fixed probabilities of RFC 6386 §11.2 and §11.4, the Huffman code lengths of T.81, the code tables of T.4). **A large lossless WebP that is entirely (or mostly) one colour, and a blank CCITT image wider than 16,384 pixels, are not drawn when they exceed the limit** (the zero-bit codes of VP8L and the one-bit white rows of T.6 have no density limit in the standards). Images over the limit are drawn as a placeholder frame with a warning. For CCITT TIFFs the same limit is also checked before falling back to utif when the built-in decoder cannot read the image
115
+ - PNG (Node): the number of pixels (up to 100 million) and the decompressed scanline size (up to 1,032 times the IDAT data, the deflate limit of RFC 1951) are checked before pdf-lib's `embedPng` decompresses the image. A 65-byte PNG with only large dimensions took 9 seconds and 1.3 GB. A PNG over the limit is drawn as a placeholder frame with a warning (images inside SVG and colour glyph images are not drawn)
116
+ - WOFF and WOFF2: the unpacked font may be up to 128 MB, and no more than 100 times the file size + 1 MB (WOFF 1.0 tables are additionally limited to the deflate ratio of 1,032). The tables were unpacked to the 32-bit lengths in the directory, so a 300 KB WOFF took 5.6 seconds and 2 GB, and a 558-byte WOFF2 took 3.3 seconds and 1.7 GB and stopped the document from being typeset. Fonts over the limit are reported as unreadable fonts. zlib decompression (`inflateBytes`) now collects its output in a byte array instead of an array of numbers (which used 8 bytes of heap per byte)
117
+ - TIFF: the per-image pixel limit (100 million pixels) now also applies to PackBits, LZW, Deflate and other TIFFs (a 124-byte TIFF with only large dimensions used 1.6 GB of memory, and larger dimensions allocated correspondingly more). **A TIFF of more than 100 million pixels is treated as an image that cannot be drawn**
118
+ - BMP: RLE8 and RLE4 BMPs are now drawn in Node as well (they used to be drawn as a placeholder frame; the same expansion as metafile DIBs; pixels left unspecified get colour table entry 0). The number of pixels is also bounded by the file size (1 million pixels plus 1,024 pixels per byte)
119
+ - Inputs found in the pre-release audit that used up time or memory with a file of tens to hundreds of bytes now end as an unreadable image or a PostScript error (the rest of the document is typeset in every case):
120
+ - EPS (PostScript): `Width` and `Height` of an image must be integers (the reals 2.4e10 × 0.001 passed the pixel limit). A dash array has at most 1,024 elements, clips nest at most 1,000 deep, an array of functions has at most 32 functions, and at most 200,000 ranges are added to a CMap (`limitcheck` beyond these). The sample array of a sampled function, the array of `matrix`, the glyph count of CFF fonts and the ranges added by `usecmap` are charged to the VM, memory and work accounts. The amount of filter output counts as work (a decompression bomb of stacked Flate filters is now stopped by the time limit even while input is skipped without executing any operator). An EPS whose bounding box (`%%BoundingBox`) is not a number or not finite is not read as EPS (the whole document failed to become a PDF)
121
+ - TIFF: the chain of IFDs is checked before it is handed to utif (loops of next-IFD offsets, at most 256 IFDs, entry values inside the file). Strip and tile lengths are clamped to what remains in the file and `RowsPerStrip` to the image height. LZW is replaced by Kumiori's own decoder, which stops at the end of the data (data without an EOI code never stopped). CCITT tiles are read only up to the number that covers the image
122
+ - PNG: a PNG whose `IHDR` is not the first chunk, of length 13, and the only one is not read (pdf-lib sizes its arrays from the last `IHDR`). An animated PNG whose frame (`fcTL`) extends outside the image, or whose frames total more than 100 million pixels, is not read. For a PNG that is decoded before embedding (with alpha, a palette, or 1 to 4 bits), the pixel data is first checked to decompress to the end (with corrupt data the decompression in pdf-lib never stopped; a corrupt PNG is not drawn)
123
+ - BMP: a bit count other than 1, 4, 8, 16, 24 or 32 is not read (0 passed the file size check)
124
+ - CGM: control points, knots and weights of NON-UNIFORM (RATIONAL) B-SPLINE are read only as far as the element's parameters go, and the element is not drawn when they fall short
125
+ - A long path in SVG or EPS (hundreds of thousands of points) made PDF output fail with "Maximum call stack size exceeded", and the whole document did not become a PDF; fixed
126
+ - Fonts: when `@font-face` points at a font collection (a TTC or a WOFF2 collection), only the first font is extracted (all of them used to be extracted and the first one used). A font whose tables overlap is not read, and the fonts extracted from a collection total at most 1 GB (a 3 KB WOFF2 whose tables all point at the same place used 3 GB). An exception while writing a subset font into the PDF (a font with broken glyf, loca or head) became an `uncaughtException` of the process instead of a rejection of `toPdf()`; fixed. When a variable font with broken tables cannot be instantiated, the document no longer fails as a whole; the default instance is used with a warning
127
+ - Scanning a document or CSS for image names took time quadratic in the length of a long run without delimiters (the base64 of a `data:` URL); fixed (**this also happened with ordinary documents**: an HTML file of about 700 KB with a font embedded as `data:` took more than a minute)
128
+ - Math (MathML in HTML): the work was cubic in the number of sibling elements; fixed (an expression of 6 KB with 300 pairs of `<mo>` and `<mi>` took 31 seconds, now 2)
129
+ - SVG: a repeating or reflecting gradient (`spreadMethod`) lays out at most 100,000 stops in total (beyond that it is not repeated)
130
+ - HTML, CSS and XSL-FO: names such as `constructor`, `__proto__` and `toString` written as a property, a value or an attribute value (`p { constructor: 1 }`, `<ol type="constructor">`, `@page { size: constructor }`, `color(constructor …)`, `mathvariant="constructor"`, `border-top-width="constructor"` in FO) picked functions of Object.prototype out of constant tables, and the whole document failed with a `TypeError`; fixed (they are reported as unknown names). A non-finite colour component such as `rgb(1e999,0,0)` in XSL-FO made PDF output fail; fixed
131
+ - CSS: the selectors of nested rules expand to at most 10,000 (a 316-byte style sheet with selector lists nested 5 deep used up the heap; a rule beyond the limit is not read). A dotted `@layer` name is examined 32 levels deep (a name of 5,000 levels took more than a minute). A leader (`leader()`, `fo:leader`) lays out at most 20,000 glyphs (tiny fonts or extremely long lines; beyond that no glyphs are laid out)
132
+ - The margin computation of quirks mode (HTML without a DOCTYPE) was quadratic in the number of sibling elements; fixed (**this also happened with ordinary documents**: 20,000 paragraphs, 160 KB, took over 50 seconds, now 5). A line with more than 120,000 glyphs (a long unbreakable word, for example) failed with "Maximum call stack size exceeded" and the document could not be typeset; fixed
133
+ - Second round of the pre-release audit (the remaining inputs; limits and their grounds are in the source comments; beyond a limit only that image, declaration or glyph is skipped, or it is drawn up to that point with a warning, and the rest of the document is typeset):
134
+ - EPS (PostScript): small EPS files no longer exhaust time and memory through pattern stroke outlines, image copies inside patterns, large numbers of drawing operations, long strings, CMap entries or repeated `pathbbox`. Limits on drawing work (200,000), DeviceN components (32), string tokens (64 MB) and **the total EPS execution time per document (60 s)**. Image copies in tiling patterns share a single PNG encoding
135
+ - WMF, EMF and CGM: the length of the generated SVG is capped in proportion to the file size (2 MB + 128 characters per byte; the samples use at most 19 per byte). Tiny records (region paints, clip changes, gradient triangles, COPY SEGMENT) made the SVG grow repeatedly (a 20 KB WMF took 72 s and 2.4 GB). The work of clip-region and clip-path operations is bounded, and CGM tiles and cell arrays are decoded straight into pixels. Progressive JPEG skips blocks without coefficients and limits the total block visits (a JPEG that visits a block more than 64 times is not read). Faster BMP decoding
136
+ - Fonts: limits on reading and processing broken or crafted fonts (GSUB/GPOS counts, exponentially nested composite glyphs and CFF/CFF2 subroutines, gvar tuples, lookup calls, COLR layers, SVG documents, and the number of variable-font instances and name records). Unreadable fonts are reported and skipped; tables or glyphs over the limits are left out. The tables used for layout are read at registration, so a font that would throw while typesetting is treated as unreadable (a CFF font fontkit cannot read no longer makes the whole document fail; a fallback font is used). A document asking for more than 64 instances of one variable font uses the instance with the nearest axis values. Notices about unreadable `@font-face` fonts now go into the result's `warnings`
137
+ - CSS: the results of `:has()` and `:nth-child(… of S)` are memoized, rules are also indexed by ancestor names, and custom property tables are no longer copied per element. Removed quadratic regular expressions for numbers, `!important`, `url()`, `@import` and `@font-face`, and capped rule nesting at 64 levels. Internal entity expansion checks its limit while substituting. Words longer than 128 characters are not hyphenated
138
+ - Layout: a document-wide budget for generated content (`content`, `counter()`, `string-set`); over-long `@counter-style` symbols and XSL-FO `format` strings are ignored. Page-invariant static content, margin boxes and `position: fixed` boxes are reused, and lines below the page are not drawn. Less work for long unbreakable lines, floats, change bars, repeated table headers, huge `rowspan` and dotted borders. **A string `text-emphasis` mark uses only its first grapheme cluster** (CSS Text Decoration 4 §3.1; the whole string used to be attached to each character). Characters after the first 32 of a grapheme cluster are laid out one by one
139
+ - SVG and MathML: images that reuse large shapes many times via `use`, `clip-path`, `mask`, `pattern` or `marker`, and images nested more than 250 levels deep, are treated as unsupported (a placeholder box and a warning). `<style>` rules are matched through an index. Fixed quadratic layout time for formulas with many children; a single formula draws at most 20,000 glyphs
140
+ - EPUB (browser app only): corrupt, encrypted and ZIP64 entries are skipped with a warning, and the total chapter text is capped at 2^27 characters
141
+ - CGM, WMF and EMF: elements that could not be read, and images not drawn because of the total pixel limit, are now reported as typesetting warnings (`画像 … の一部を描けません: …`; the CGM warnings used to be discarded, and WMF and EMF did not produce any)
142
+ - JPEG, TIFF and CCITT: bounded number of scans (up to 500), number of IFD values, and search cost of two-dimensional rows
143
+ - EPS (PostScript): limits on VM usage (512 MB; VMerror beyond it), the total number of path points (5 million; limitcheck beyond it), the amount a filter buffers (16 MB), image mask dimensions, the per-pixel cost of mesh shadings, `resourceforall` template matching, `search`, and the length given to `StartData`
144
+ - Layout: in deeply nested documents (tables inside tables, nested inline-blocks, floats, absolutely positioned boxes, multi-column containers and rotated containers) the layout cost no longer grows exponentially with depth (values obtained by measuring and trial layout are remembered and reused within one layout run; the result of the layout does not change). Nested tables in XSL-FO used to take 35 seconds at 12 levels and now take under a second at 60 levels
145
+ - **Layout: bounded the layout effort for deeply nested mixes of content-sized boxes (inline-container, inline-block, float, table, absolutely positioned and rotated containers) and for nested multi-column containers whose content overflows the page** (crafted input can no longer use up the time). Once one layout run (each re-run for page-number references counts separately) has made 100,000 layout passes, the remaining boxes are laid out at the available width without measuring their content, and multi-column containers nested deeper than 4 levels are laid out as a single column, with a warning. Documents below these limits are unchanged (the largest of the manuals and samples uses about 20,000 passes and nests multi-column containers one level deep). A 120-level mixed XSL-FO nesting that took minutes now takes about 5 seconds, and 10 nested overflowing multi-column containers take about 2 seconds instead of 80
146
+ - Painting and walking the Area Tree no longer exhaust the stack on deep nesting (recursion was removed). Rotated areas may nest up to 300 levels. Serializing a tree that is too deep raises `AreaTreeFormatError`
147
+ - EPS (PostScript): a limit on the total memory used by one EPS (512 MB; VMerror beyond it; arrays and dictionaries are counted with weights close to their real size), and a limit on the length of the generated SVG (128 MB; beyond it the drawing so far is kept and limitcheck is reported)
148
+ - Output: `renderPage` no longer throws on a page that uses a font whose no-break space (U+00A0) glyph cannot be read; one broken data URI or `@font-face` URL no longer makes the whole `typeset` call fail; the CLI skips unreadable directories below the input directory
149
+ - **Fixes for incorrect results** (found in the full review; each changes the result only for documents written the way described):
150
+ - Layout: content disappeared from a multi-column container without a specified height when it contained a forced column break; footnote bodies in tables and containers disappeared after the trial layout for column balancing; footnotes inside a block with a writing mode orthogonal to its parent, a rotated container or an inline-container disappeared; `break-before`, `break-after` and `keep-together` had no effect on orthogonal blocks and tables (XSL 1.1 §7.20); a long footnote on a multi-column page is now split and continued on the next page (§6.12.3); the id and the left and right borders of a multi-column container that spans pages; the number of columns of a table without column definitions (columns filled by rowSpan, the table footer; CSS 2.1 §17.5)
151
+ - HTML: list numbering no longer restarts when comments, `display: none` items or other children sit between list items; counters on table rows and row groups (a counter reset in a cell no longer leaks out of the table) and the ids of `tr` and `tbody`; bookmarks and `string-set` on the second and later list items and on table rows, cells and captions; no space is inserted between lines of single CJK characters; numbers outside the range of a counter style (`<ol start="0" type="i">` etc.) are written in decimal (CSS Counter Styles 3 §2); percent-encoded `#fragment`s; prefixed attributes in an `<svg>` in the document; a titled `rel="alternate stylesheet"` is not applied (CSSOM 1 §6.2; also in EPUB chapters); `break-before`, `break-after` and `break-inside` on list items (CSS Fragmentation 3 §3.1)
152
+ - EPUB: the attributes of `html` and `body` of each chapter are kept (vertical writing via `<html class="vrtl">` etc.); `container.xml` with single quotes; the leading newline of `pre`
153
+ - CSS: presentational attributes are weaker than rules inside `@layer` (CSS Cascade 5 §6.5); custom properties and counters with non-ASCII names (`var(--色)`, `counter(章)`); lists of relative selectors in `:has()` (`:has(> li, > p)`) and their scope (Selectors 4 §4.5); an unreadable `background` shorthand, invalid color components, an invalid `var()` (CSS Variables 1 §3.1) and cyclic variables make the declaration invalid; `@page` `margin` with nested parentheses in `calc()`; gradients with a single color stop; number syntax such as `font-weight: 550.5`, `line-height: +1.5`, `font: 550.5 12px serif` and `columns: +3`; `@supports` answers false for properties and values that are not interpreted (`position: sticky`, 3D `transform` etc.; CSS Conditional 3 §6.1); `size` in an `@page` inside an `@media` that depends on the paper size (width, height, orientation etc.) is ignored (CSS Paged Media 3 §7.1); non-ASCII names in `@page` (`var(--余白)`, `@page 表紙`, `string(題)`, `running(柱)`)
154
+ - CSS: a print colour `device-cmyk()` (CSS Color 5 §12.1) in a border or background shorthand (`border`, `border-top` and the other sides, `column-rule`, `background`) made the whole declaration invalid, so the border disappeared (the width and style of `border: 2px solid device-cmyk(1 0 0 0)`, the image of `background`). It is now accepted as the colour. With `--style ah`, `cmyk()` and `rgb-icc()` are accepted the same way (with other styles they still make the declaration invalid and are reported in the warnings)
155
+ - Line layout: a variation selector (IVS, SVS) forms one unit with its base character, and the glyph of the variation sequence is taken from the font (the non-default UVS table of cmap Format 14 of OpenType is also consulted; in PDF and in outline drawing on Canvas); `word-break: break-all` no longer breaks before a combining mark; the unit of text is now the grapheme cluster (the extended grapheme cluster of UAX #29, Unicode 18.0.0): a base character with combining marks (e + U+0301, か + U+3099) and emoji sequences (skin tone modifiers, ZWJ sequences, flags, keycaps, tag sequences) are one character, shaped as a whole with a single font (the font's GSUB and GPOS place the marks on the base; CSS Fonts 4 §5.3), and no line break (including `overflow-wrap: anywhere`), letter spacing or justification space falls inside them; inter-script spacing is also inserted between Latin letters and ideographs in Extension B and later, 〇 and 〆 (CSS Text 4 §8.4.1)
156
+ - Line layout: with hanging punctuation (`hanging-punctuation: allow-end`; CSS Text 3 §8.2), the punctuation at the end of a line whose end side is shortened by a float overlapped the float box. On such lines the punctuation no longer hangs; it is squeezed or moved to the next line (lines with a float only on the start side, and lines without floats, hang as before)
157
+ - Thai, Devanagari (Hindi and others) and Korean: Devanagari, which could not be typeset (fontkit's shaping failed), now works; the glyphs of Thai SARA AM and tone marks and Thai pair kerning follow the font. Thai text without spaces wraps at the word boundaries of a dictionary (the runtime's `Intl.Segmenter`; word boundaries can differ between runtimes). The space between Hangul words takes the width the font chooses by context. In PDF, characters whose glyphs do not correspond one to one to their characters carry the original characters (ActualText) for text extraction. Fonts for these scripts are not among the default fonts and must be specified
158
+ - Indic scripts (Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam, Sinhala): conjuncts are now one unit of text also in the scripts that the default rules of UAX #29 do not cover (those without Indic_Conjunct_Break): Gurmukhi, Kannada, Tamil (க்ஷ, ஸ்ரீ) and Sinhala (virama + ZWJ), as a tailoring for aksaras (UAX #29 §3, CSS Text 3 §1.4; before, Kannada ನ್ನ and the like came out as separate letters with a visible virama). Malayalam "consonant + virama" and Sinhala කෝ or "virama + ZWJ" sequences, which could not be typeset (fontkit's shaping failed), now work; the Sinhala repaya, the form of Bengali ে and ো inside a word (not the word-initial form) and vowel signs after a letter with nukta (a dotted circle could appear) follow the font. Kerning between units (syllables; the font's kern and dist) is applied to Indic scripts too. **Line widths and glyphs of these scripts change.** Fonts for these scripts are not among the default fonts and must be specified
159
+ - Lao, Khmer, Burmese (Myanmar script), Tibetan and Mongolian script: Khmer (mark positioning crashed), Myanmar (pre-base vowels, medials, kinzi and stacks stayed in logical order) and Mongolian script (nothing could be typeset with Noto Sans Mongolian) now work; the glyphs of Lao SARA AM and tone marks, the required ligatures of Khmer and pair kerning follow the font. A Myanmar syllable, and a Lao pre-base vowel with its consonant, form one typographic character unit (CSS Text 3 §1.4). Mongolian words join in vertical text too (`vertical-lr`, `vertical-rl`), and the vowel separator (MVS) and NNBSP are kept inside the word. In PDF, these units also carry their original characters (ActualText)
160
+ - Ligatures: a sequence listed in the font's ligature table (GSUB of OpenType) becomes one glyph whatever its length and kind of characters (fonts that replace words with icons: `favorite`, `arrow_back`, `3d_rotation` and so on in Material Icons; before, only two to four Latin letters). Discretionary and historical ligatures (`dlig`, `hlig`) and required ligatures (`rlig`) are also applied to sequences. With `letter-spacing`, ligatures enabled explicitly (`font-feature-settings: "liga" 1` and so on) are still formed, and the spacing is added after the ligature (CSS Text 3 §7.2, Fonts 4 §7.2). Horizontal writing only (no ligatures in vertical writing)
161
+ - XSL-FO: `fo:page-number-citation` and `-last` that refer to the id of an `fo:page-sequence` or `fo:flow` (the usual way to write "page N of M") are resolved; inherited properties on `fo:page-sequence` (`text-transform`, `font-family` etc.) reach its children; `start-indent` and `end-indent` inside table cells (a cell is a reference area; §5.3.2); the base of percentages in a vertical or rotated body; text properties on `fo:footnote`, `fo:footnote-body` and `fo:page-number`; one-value and vertical-keyword-first `background-position`; the components of `keep-*`; `rule-style="none"` with `leader-pattern="dots"`; an empty `number-columns-spanned`; when no math font is available, bottom alignment of a formula that consists of a single `mtable` is applied in compatibility mode only; the `external-destination` of `fo:bookmark` is written as an action of the PDF bookmark (URI, GoToR, Launch)
162
+ - Math: characters stretched by assembling parts (large parentheses, radicals, horizontal braces) no longer come out larger than the target (the maximum overlap of parts is determined by the connector lengths at the joining ends, as defined by the OpenType MATH table; the wording of MathML Core §5.3.1 has it the other way round)
163
+ - Images: SVG paths with packed arc flags (`a1 1 0 01.71.29`; SVG 2 §9.3.9); the first frame of an animated WebP is drawn; the size of a CGM (64-bit real and 32-bit integer precisions); an EMF with a reversed frame
164
+ - EPS (PostScript): the polarity of `imagemask` (stencils were inverted) and of the mask of ImageType 3 images (painted and transparent areas were swapped; PLRM §4.10.6); the form of `SubFileDecode` with EODCount and EODString in a dictionary (§3.13.3); filter errors become PostScript errors (what was drawn before the error is kept); the path after `gsave … show grestore`; `currentgstate`, `rectfill` and `rectstroke`
165
+ - EPS (PostScript): rectangles whose width and height have different signs (`rectfill`, `rectstroke`, `rectclip`) are also drawn counterclockwise (rectangles of different orientation overlapping in one `rectfill` used to leave a hole in the overlap; PLRM §4.6.5); `resourceforall` no longer passes an instance defined both locally and globally twice, and passes keys that are neither names nor strings as they are; the status from `resourcestatus` of an instance defined by `defineresource` is 0 (§8.2); `ASCII85Decode` raises ioerror when `~` is not followed by `>` (§3.13.3)
166
+ - XSL-FO: when several page masters use the same `fo:static-content`, the import report (the numbers of blocks and tables, unsupported properties) no longer counts it once per master
167
+ - References and fonts: style sheets and images that differ only in the query (`css2?family=A` and `css2?family=B`) are each read as separate resources; `&amp;` in `href` is decoded before fetching; non-ASCII text and `;charset=` parameters in non-base64 data URIs; characters from character references and CSS strings count for `unicode-range` filtering; font files with the same name in different directories are told apart from the location of the CSS containing `@font-face`; the message language returns to the original one after overlapping calls with different `lang`; spaces in `--css "a.css, b.css"`
168
+ - CLI: files referenced by relative references of the document or the CSS that point outside the input's directory (`url(../fx/a.ttf)` of an `@font-face` in `sub/a.html` etc.) were not read, and the default font was used without a warning. They are now read, like `file:` URLs (as when a browser opens a local HTML file; RFC 3986 §5.2). Relative references in CSS files that point above the input's directory also resolve to the right file. When none of the files in the `src` of an `@font-face` is found, the warning "font file of @font-face not found" is reported (CSS Fonts 4 §4.3; the CLI and the API)
169
+ - Line layout (results change): words of joining scripts such as Arabic are now broken between letters with `word-break: break-all`, and inside a word longer than the line with `overflow-wrap: anywhere` or `break-word` (in XSL-FO, on a line with no other break opportunity) (CSS Text 3 §5.1, §5.5). They used to be kept whole, so in a narrow box a word longer than the line overflowed far to the end side (left) of the right-to-left line and disappeared off the page. The letters at the break keep the joined forms (initial, medial, final) they have when the word is not broken (the note in §5.1; the pieces are passed to the font with a zero width joiner on the joining side; the lam-alef ligature is not split)
170
+ - Layout (results change): the fragments (column rows) of a multi-column container that spans pages now also get the background image, rounded corners, shadow (`box-shadow`) and diagonal borders (previously only the background color, borders and padding, so no fragment had the background image, rounded corners or shadow). For boxes split across pages or columns, with `box-decoration-break: slice` (the default) the corners on the side of the break are no longer rounded (CSS Fragmentation 3 §5.4: as if drawn unbroken and then sliced; previously all four corners of each fragment were rounded). With `clone`, each fragment is still rounded
171
+ - Line layout (results change): the background of an inline box with a background color (`span`, `fo:inline` and so on, without borders or padding) is now also painted where it contains an `inline-block` or an image (CSS 2.1 §9.2.2, §14.2, CSS Backgrounds 3 §3.7; the painted height is the content area of the enclosing box). Previously only the text was painted, leaving a gap at the `inline-block`
172
+ - CSS: `bleed: auto` (the initial value) in `@page` is 6pt when `marks` includes `crop`, and 0 otherwise (CSS Paged Media 3 §7.3). Previously `auto` was dropped, so the bleed was 0 and the BleedBox of a PDF with `marks: crop` equaled the TrimBox. **Documents that set `marks: crop` in `@page` without `bleed` now get a 6pt bleed** (when `@page` has neither `bleed` nor `marks`, the bleed set by options such as `--print` is used, as before)
173
+ - CSS: `trim-all` of `text-spacing-trim` (brackets, middle dots, full stops and commas set half width regardless of position) and `space-first` (full width at the start of the first line of a paragraph and of lines after a forced break, half width at the start of other lines) are typeset as in CSS Text 4 §8.5 (they used to be the same as `normal`). Combinations of keywords that set the start of the line, adjacent punctuation and the end of the line separately (`trim-start trim-end`, `space-start trim-adjacent` and so on; the grammar of the Editor's Draft; omitted positions take `trim-start trim-adjacent allow-end`) are read, also inside the `text-spacing` shorthand. `-ah-punctuation-trim: all` also sets them half width
174
+ - CSS: the color function `light-dark()` (CSS Color 5 §7) is read. It takes the second color when the color scheme of the element (`color-scheme`, or else `<meta name="color-scheme">`) supports only dark, and the first color otherwise (as this is print, the user preference is taken to be light; CSS Color Adjust 1 §2.3). `none` components in the modern syntax of `rgb()` and `hsl()` (CSS Color 4 §4.4; 0 when the color is used, a missing component inside `color-mix()`) are also read. Previously, declarations with these were dropped as unreadable
175
+ - CSS: specifications that were dropped without notice are now reported in the unsupported-CSS warning: `page-orientation` in `@page` (CSS Paged Media 3 §7.1.2), `@page :nth()` (CSS GCPM 3 §3), `target-counters()` (CSS Content 3 §6.2; also in the `content` of margin boxes), `@namespace` (CSS Namespaces 3 §2), `last` of `hanging-punctuation` (CSS Text 3 §8.2.1), and `shape-outside`, `shape-margin` and `shape-image-threshold` (CSS Shapes 1 §6; previously reported as unknown properties). The typeset result does not change
176
+ - **Distribution**:
177
+ - `require('kumiori')` and `require('kumiori/node')` work (the `exports` condition is now `default`; without a flag this needs Node 20.19.0 or later, or 22.12.0 or later)
178
+ - The type declarations work for consumers whose `moduleResolution` is `NodeNext` or `Node16` (relative specifiers in the declarations now end in `.js`; they used to cause errors or silently fall back to any)
179
+ - The output of the Node CLI (`dist-cli`) no longer contains the contents of `public/` meant for the web app (favicons etc.)
180
+ - **`@supports`**: answers false for declarations whose value cannot be read (`display: foo`, `color: notacolor`, `width: 10` and so on) (CSS Conditional 3 §6.1). Unsupported properties and values answer false as described under "Fixes for incorrect results" above
181
+ - **Antenna House extension values (results change)**: **Antenna House extension values written on unprefixed names (standard properties) are now read only with a compatibility setting (`--style ah` for HTML, `--compat antenna` for XSL-FO). Without one, the declaration or attribute is ignored as an invalid value, as the specifications say, and reported in a warning as "a value interpreted only with --style ah (--compat antenna)".** Until now they were read with every setting
182
+ - HTML: **the `float` values `top`, `bottom`, `start`, `end`, `inside`, `outside`, `center`, `alternate`, `multicol`, `sidenote` and so on (the CSS values are `left`, `right`, `none`, `inline-start`, `inline-end` and `footnote`), the unit `gr` as in `width: 2gr`, and the colors `cmyk()` and `rgb-icc()` (CMYK, grayscale and spot colors; the CSS function is `device-cmyk()`)**. With the default style the box is no longer floated or moved to the top or bottom of the page, and the color is no longer CMYK or a spot color; the result is the same as if the declaration were not written (an earlier or weaker declaration, if any, takes effect). **Using spot colors (`--spot-colors`) in HTML now requires `--style ah`**
183
+ - HTML: values written on the prefixed **`-ah-float`** (newly read; the values are the same as the `float` extension values) and **`inside` and `outside` of `-ah-text-align`** (until now only with `--style ah`) are read with every style
184
+ - XSL-FO: **the border styles `dot-dash`, `dot-dot-dash` and `wave` (`border-style`, `border-<side>-style` and shorthands such as `border`), and a number for `force-page-count`**. With the default `--compat spec` such a border is not drawn and a numeric `force-page-count` has no effect. Line styles written on `axf:` properties (such as `axf:diagonal-border`) are read in both modes
185
+ - XSL-FO: **a shorthand with an extension line style, such as `border="1pt dot-dash red"`, used to make the whole border disappear silently in both modes; this is fixed** (`--compat antenna` draws the border, `--compat spec` reports a warning). A line style that is neither kind (such as `border-style="zigzag"`) is reported in a warning in both modes (it was sometimes drawn like a solid line)
186
+ - The answers of `@supports` and the `supports()` of `@import` follow: `float: top`, `width: 3gr`, `color: cmyk(…)`, the border styles `dot-dash`, `dot-dot-dash` and `wave`, `counter(page physical)` and so on are true only with `--style ah` and false with the other styles (CSS Conditional 3 §6.1; the border styles and `counter(page physical)` used to answer true with every style, although these values have only ever been read with `--style ah`). Forms that are not used for layout even with `--style ah` (`counter(c reverse)` and so on) and unknown words (`float: zzz`) are false with every style
187
+ - `--style ah`: a `content` that writes `physical` or `reverse` on a counter other than `page`, such as `counter(c reverse)`, is ignored as an invalid declaration (it was accepted and produced nothing). `counter(page reverse)` is reported as unsupported
188
+ - **Declarations with invalid values (results change)**: **for about 50 properties whose value check was loose, a declaration whose value does not match the value definition of the specification is now ignored as an invalid declaration** (an earlier declaration in the same rule, a declaration of a weaker rule, or the inherited value takes effect; CSS 2.1 §4.2). `@supports` answers that it is not supported. Until now such a value was accepted and typeset as the initial value, or, for some values, read with another meaning (`flex-wrap: zzz` as wrapping, `flex-grow: -5` as a negative growth factor, `overflow: zzz` like hidden, and so on)
189
+ - Covered: `align-content`, `align-items`, `align-self`, `justify-content`, `flex`, `flex-direction`, `flex-wrap`, `flex-flow`, `flex-grow`, `flex-shrink`, `font-family`, `font-style`, `font-stretch` (`font-width`), `font-kerning`, `font-variant-caps`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `line-break`, `word-break`, `overflow-wrap` (`word-wrap`), `overflow`, `overflow-x`, `overflow-y`, `object-fit`, `vertical-align`, `border-radius` and the corner radii (negative values), `border-spacing` (negative values, percentages), `aspect-ratio`, `caption-side`, `columns`, `counter-reset`, `counter-increment`, `counter-set`, `list-style`, `list-style-type`, `quotes`, `page`, `text-decoration`, `text-decoration-line`, `text-emphasis-style`, `text-combine-upright`, `text-orientation`, `unicode-bidi`, `text-autospace`, `text-spacing-trim`, `text-spacing`, `hanging-punctuation`, `ruby-position`, `ruby-align`, `ruby-merge`, `ruby-overhang`, `alignment-baseline`, `bookmark-level`, `bookmark-state`, and the logical border styles (`border-block-style`, `border-inline-style` and so on)
190
+ - When a shorthand has a word that fits no component, or a second word of the same component (`text-decoration: underline zzz`, `flex: 1 2 3 4`, `columns: 2 3`, `list-style: disc circle`), the whole declaration is ignored (the word used to be skipped, or overwritten by the later word)
191
+ - `text-autospace: none` (an Antenna House form that is not a value of CSS Text 4) is read only with `--style ah` and reported in a warning with the other styles (it had no effect with the default style before either, but it cancelled an earlier declaration)
192
+ - **Ruby written with `fo:inline-container` in XSL-FO (results change)**: **a “small-text `fo:block` + body-text `fo:block`” pair inside `fo:inline-container` is typeset as ruby only with `--compat antenna`. With the default `--compat spec` it is typeset as an inline box as the specification says (the two blocks are stacked and the baseline of the line of the first block is aligned to the baseline of the surrounding line; XSL 1.1 §6.6.8), so the small text sits on the same line as the surrounding text and the body text becomes the line below**. This pattern is how documents written for AH Formatter express ruby; XSL-FO has no ruby element. Use `--compat antenna` to have it typeset as ruby
193
+ - **Warnings for unsupported CSS**: `text-decoration-skip-ink`, `text-wrap-mode` and `text-wrap-style` are reported as unsupported properties rather than unknown properties (also added to chapter 16 of the Conformance Guide)
194
+ - **Development**: `scripts/compare-pdf.mjs --html` works with the current web app again (it opens the settings drawer before selecting). The tests no longer depend on the machine's locale, on fonts installed on the machine, or on execution time. Font fetching for the tests is done in one place and is safe under parallel runs
195
+ - **Documents**: corrected the line count and test count in the README, the step numbers in the release procedure, and statements in the Conformance Guides, plans and other documents that disagreed with the implementation or between the Japanese and English versions
196
+ - **Publishing**: the PDFs of the Conformance Guides (four volumes, Japanese and English) are attached to the GitHub release of each version; the "Typesetting" row of the colophon shows the Kumiori version used to typeset them
197
+ - **Third-party notices**:
198
+ - Added notices for code bundled in the @pdf-lib/fontkit distribution (Brotli decoding, base64-js, buffer, etc.) (section 1.1.1)
199
+ - Hyphenation patterns: added the upstream (hyph-utf8) notices of the Russian, Ukrainian and Modern Greek patterns (section 1.4; the Russian patterns are under the LPPL). The files that bundle hyphenation patterns (the per-language chunks of the browser distribution and the web app) now start with the copyright and license notice of each pattern set (the full MIT permission notice; for the Russian patterns, a statement that the file is a modified version, the nature of the changes, where to obtain the original, and that the original authors do not support it)
200
+ - Added the grapheme cluster properties (auxiliary/GraphemeBreakProperty.txt and Indic_Conjunct_Break of DerivedCoreProperties.txt) to the Unicode character data (section 6)
201
+ - Added notices for the rules copied from CSS GCPM 3 Appendix B (section 10)
202
+ - Added notices for `src/cssColorFunctions.ts`, which copies the sample code for color conversion of CSS Color 4 (color space matrices, transfer functions, the conversion formulas of HSL, HWB, Lab, LCH, Oklab and OkLCh, and so on) (section 11)
203
+ - Every output JS file starts with a comment giving the Kumiori version, its license and where `THIRD_PARTY_NOTICES.md` is (for loading a single file from a CDN)
204
+ - The README of the Conformance Guides states the fonts embedded in their PDFs and the fonts' licenses
205
+ - **Line positions inside a line grid (`-ah-baseline-grid`)**: **Results change for documents that use `-ah-baseline-grid`.** (1) Inside a line grid, the line after a line of small glyphs (such as a chapter number; same line height) used to be moved down by one extra grid step (one line pitch); this is fixed (a chapter title could overlap the following section heading). (2) A line of large glyphs, or one containing large glyphs, is moved down to the grid line where the em box of its glyphs fits below the previous line (it could be off the grid or overlap the previous line). (3) At the end of the box that created the line grid (the element with `new` or `root`), no half-leading follows the last line (the box becomes shorter by the half-leading below its last line: (line-height − font size) ÷ 2 for a one-line heading, and the content after the heading moves up by that amount). The baseline positions (on the grid) of lines not covered by (1) and (2) are unchanged
206
+ - **`attr()`** (CSS Values 5 §7.7): `attr()` is now replaced with the attribute value in the values of properties other than `content`, `string-set` and `bookmark-label` (extension properties excluded). Typed forms (`attr(data-n number)`, `attr(data-w px)`, `attr(data-n type(<number>))` and so on) can be used as numbers and lengths, including inside `calc()`. An `attr()` without a type is a string, so a declaration such as `margin-top: calc(attr(data-n) * 20mm)` is invalid and is ignored with a warning (it had no effect before either, but there was no warning). Only with the AH Formatter compatible style (`--style ah`), an `attr()` without a type inside a math expression is read as a number when the attribute value is a number (**with `--style ah`, margins and sizes written this way now take effect**)
207
+ - **Multi-column boxes (`column-count`) inside list items that continue across pages**: when a multi-column box inside a list item (`li`) started low on a page and continued onto following pages, each continuation page only received about as much column height as had been left on the first page, producing a run of pages with a few lines each. Fixed (**affected documents get fewer pages**; continuation pages now use the full page height for the columns)
208
+ - **Line pitch in the XSL-FO compatibility mode (`--compat antenna`, `compat: 'antenna'`)**: **Results change for XSL-FO documents typeset in compatibility mode.** Lines that mix Japanese and Latin text used to get a line pitch slightly larger than `line-height` (for 10pt body text with `line-height="1.6"`, 16.22pt instead of 16pt on mixed lines only: about 1.35% of the pitch, so a page of 40 such lines ran about 8pt longer). Japanese-only, Latin-only and mixed lines now all get exactly the `line-height` pitch. In addition, the baseline of Latin-only lines used to sit slightly higher than that of Japanese lines (0.22pt at 10pt); it is now at the same position (in a table row, a Japanese cell and a digits-only cell share a baseline). Glyphs are positioned in the line using the vertical extents of the first font of the block's font specification (the Japanese font for `serif` and `sans-serif` in a Japanese document). Lines containing glyphs larger than the block's, lines with ruby, superscripts or subscripts, the handling of glyphs whose font is changed with `fo:inline`, spec mode (`--compat spec`, the default) and HTML+CSS are unchanged
209
+ - **Line breaking in the XSL-FO compatibility mode (`--compat antenna`, `compat: 'antenna'`)**: **Results change for XSL-FO documents typeset in compatibility mode.** Latin word spaces and the quarter-em space between Japanese and Latin text are no longer compressed to pull a character or word into the line (regardless of the paragraph's alignment; justified paragraphs, `text-align="justify"`, included). They never become narrower than their natural width, and the one character or word that used to fit by compression goes to the next line (a Latin word is hyphenated where it can be). This matches the output of AH Formatter; lines used to take one more character (or word). Some paragraphs gain a line, so page breaks may move. Pulling in by compressing the space of punctuation (commas, brackets), spec mode (`--compat spec`, the default) and HTML are unchanged
210
+ - **Line breaking in the XSL-FO spec mode (`--compat spec`, `compat: 'spec'`; the default)**: **Results change for XSL-FO documents typeset in spec mode.** In lines that are not set justified (lines of paragraphs with `text-align` `start`, `end`, `center`, `left`, `right`, `inside` or `outside`, and the last line and lines ending in a line feed of a justified paragraph, `text-align="justify"`), Latin word spaces are no longer compressed to pull a character or word into the line. Spaces keep their natural width, and the one character or word that used to fit by compression goes to the next line (spaces used to be compressed down to 1/3 so that a line took one more character or word; a single space in a Japanese line was enough for this to happen). This follows XSL 1.1 §7.17.8 (for `word-spacing="normal"` the word space has no room to shrink) and §7.16.9 (inline content may be stretched only for `justify`). Some paragraphs gain a line, so page breaks may move. Compression of word spaces in lines that are set justified, pulling in by compressing the space of punctuation (commas, brackets), compatibility mode and HTML are unchanged
211
+ - **XSL-FO properties** (now read and passed to the typesetter, regardless of `--compat`):
212
+ - the shorthands `font`, `background`, `page-break-before`, `page-break-after`, `page-break-inside` and `size`, and the size limits `min-height`, `min-width` and `max-width` (also `max-height` on table rows), are now read (XSL 1.1 §7.31, §7.15). They used to be ignored, so page breaks such as `page-break-before="always"` had no effect
213
+ - `clear` on `fo:block` (`start`, `end`, `both`, `left`, `right`) is now read, and the block starts below the earlier `fo:float` on that side (XSL 1.1 §7.19.1)
214
+ - the contents of `fo:folio-prefix` and `fo:folio-suffix` are now placed before and after page numbers (`fo:page-number`, `fo:page-number-citation`, `fo:page-number-citation-last`), for per-chapter folios such as “A-12” (XSL 1.1 §6.6.13, §6.6.14)
215
+ - indexes can now be typeset (XSL 1.1 §6.10, §7.24): the pages of elements with `index-key` (and `index-class`) and of `fo:index-range-begin`…`fo:index-range-end` ranges are collected, and the list of page numbers is typeset at `fo:index-page-citation-list`. Supports removal of duplicate pages, ranges of three or more consecutive pages, `merge-sequential-page-numbers`, `merge-ranges-across-index-key-references` and `merge-pages-across-index-key-references`, the separators (`fo:index-page-citation-list-separator`, `-range-separator`), prefix and suffix (`fo:index-page-number-prefix`, `-suffix`) and links (`page-number-treatment="link"`). Page numbers use the `format`, `fo:folio-prefix` and `fo:folio-suffix` of the cited page. When the index adds pages, the document is typeset again until it settles (with a warning if it does not)
216
+ - `font-variant="small-caps"` and `word-spacing` (a length added to inter-word spaces) are now read (XSL 1.1 §7.9.8, §7.17.8)
217
+ - `auto`, `0deg` (all glyphs upright) and `90deg` (all glyphs rotated sideways) of `glyph-orientation-vertical` are now read (XSL 1.1 §7.29.3). 180 and 270 degrees, and values other than 0 degrees of `glyph-orientation-horizontal`, are not read and are reported
218
+ - `relative-position="relative"` (an `fo:block` in horizontal writing is drawn shifted), `hidden` and `collapse` of `visibility` (the space is kept but nothing is drawn) and a negative `z-index` on an absolutely positioned `fo:block-container` (drawn behind the body text) are now read (XSL 1.1 §7.13.5, §7.30.17, §7.30.18)
219
+ - The kinds of `break-before` and `break-after` (`odd-page`, `even-page`, `page`, `column`) on `fo:table-row` and `fo:list-item` are kept, as for `fo:block` (XSL 1.1 §7.20.1, §7.20.2; NC-28). **The layout result changes**: `odd-page` and `even-page` on a row or item start it on an odd or even page, inserting a blank page when needed (before, every kind only moved it to the next column or page). In a multi-column region, `page` moves to the next page instead of the next column
220
+ - Digit grouping of page numbers (`grouping-separator` and `grouping-size` on `fo:page-sequence`) is read (XSL 1.1 §7.26.2, §7.26.3; "1,234"). The values of `letter-value` are accepted (§7.26.4)
221
+ - Table-of-contents lines: `last-line-end-indent` is read (XSL 1.1 §7.16.3), so wrapped lines can stop short of `end-indent` while only the last line, with the page number, runs to the edge (`text-align-last="justify"` + `end-indent` + a negative `last-line-end-indent`). `reference-area` and `page` of `leader-alignment` are read (§7.22.1): the cycles of a dotted leader are aligned to a grid from the edge of the body region (column, table cell) or of the page
222
+ - `fo:initial-property-set` is read (XSL 1.1 §6.6.4): the font properties, `color`, `letter-spacing`, `word-spacing`, `text-decoration` and `background-color` are applied to the first line of an `fo:block` only. `text-transform`, `font-variant`, `line-height`, borders, `padding` and the like are not read and are reported
223
+ - Change bars (`fo:change-bar-begin`, `fo:change-bar-end`) are read (XSL 1.1 §6.13.2, §6.13.3): a bar is drawn beside the lines from the begin to the end (nested and overlapping ranges, multiple columns, vertical writing). `change-bar-color`, `change-bar-offset`, `change-bar-placement` (`start`, `end`, `left`, `right`, `inside`, `outside`, `alternate`), `change-bar-style`, `change-bar-width`
224
+ - `fo:retrieve-table-marker` is read (XSL 1.1 §6.13.7): the table header and footer show the content of an `fo:marker` found in the part of that table on the page (column) — "carried forward" and "subtotal" in ledgers, "(continued)" in tables. All values of `retrieve-position-within-table` and `retrieve-boundary-within-table`. When the retrieved content changes the height of the header or footer, the number of rows that fit on the page changes too. The form written as a child of `fo:table` is not supported (reported)
225
+ - Supports the hyphenation properties `hyphenation-character`, `hyphenation-push-character-count`, `hyphenation-remain-character-count` and `hyphenation-ladder-count`. `country` is used together with `language` to select the hyphenation rules (`language="en" country="GB"` selects British rules; **documents that were hyphenated with American rules because country was ignored now break differently**). `column` and `page` of `hyphenation-keep` are not supported (reported as a warning)
226
+ - **The character at the end of a hyphenated line is now U+2010 in spec mode (`--compat spec`, the default)** (the initial value of `hyphenation-character` in XSL 1.1 §7.10.5; it was U+002D). The width of the character differs, so line breaks in documents with `hyphenate="true"` can change. The compatibility mode (`--compat antenna`) and HTML keep U+002D. Write `hyphenation-character="-"` to get U+002D
227
+ - **Chinese (Traditional) punctuation**: punctuation drawn in the centre of the character frame (`、。,.` in Traditional Chinese fonts) is no longer trimmed by half an em and overlapped by the next character (`。」`, `,」`, `、)` and so on). Whether full stops, commas and colons (`:;`) are trimmed as closing punctuation or as middle dots is now decided from where the font draws the glyph (CSS Text 4 §8.5.3; colons at the lower left in Simplified Chinese fonts are closing punctuation). Results with Japanese fonts do not change
228
+ - **Vertical punctuation (Traditional Chinese fonts)**: when a font has `vert` but does not substitute the comma or full stop, the default (centred) glyph is used as is (it is not replaced by the Unicode vertical form, which sits at the upper right)
229
+ - **Default emphasis mark position for Chinese**: with no position specified, emphasis marks in Chinese (`lang` is `zh`) go below the characters (to the right in vertical text) (the default style sheet in CSS Text Decoration 3, Appendix B: `:root:lang(zh), [lang|=zh] { text-emphasis-position: under right; }`)
230
+ - **`<html lang>`**: the `lang` of `html` is now inherited by `body` and its descendants as the language of the text (HTML Standard §3.2.6.2; until now only `lang` inside `body` was used). In documents that only have `<html lang="ja">` or `<html lang="zh-…">`, the Japanese- and Chinese-only rules of `line-break: normal` (also the initial value `auto`) and `loose` now apply (a break is allowed before `〜` and `゠`, and so on; CSS Text 3 §5.2). **Results change**: in such documents the position before `〜` becomes a line break opportunity and a place where justification may add space. The hyphenation language of `hyphens: auto` also follows the `lang` of `html` (documents in languages other than English and Latin are no longer hyphenated with the English rules). With `--style ah`, the choice of the line's baseline (whether the document is CJK) also follows the `lang` of `html`
231
+ - **Chinese quotation marks for `quotes: auto`** (the `q` element and so on): Simplified Chinese (`zh`, `zh-Hans`, `zh-CN` and so on) uses `“ ” ‘ ’`. Traditional Chinese (`zh-Hant`, `zh-TW`, `zh-HK`, `zh-MO`) keeps `「 」 『 』` (the CLDR quotation marks that CSS Content 3 §4.1 refers to)
232
+ - **Latin-script text (Vietnamese), Greek and Cyrillic**: decomposed sequences (NFD, such as `e` + U+0323 + U+0302 or polytonic Greek) of Latin, Greek and Cyrillic letters are set with the precomposed character when the font has it (same appearance and width as the precomposed form; CSS Fonts 4 §5.3). Latin Extended Additional (U+1E00–1EFF: `ế`, `ệ`, `ṃ` and so on) is set in the same Latin font as the rest of the word and takes part in Japanese–Latin spacing and pair kerning. Greek and Cyrillic pairs are kerned with the font's kern data
233
+ - **Right-to-left scripts (Arabic, Hebrew)**: Arabic combining marks are stacked in the order of UTR #53 (a fatha sits above a shadda). The zero-width non-joiner (U+200C) inside a word has no width, and stand-alone invisible characters such as LRM, RLM and WJ have no width (they used to take the width of a space). Arabic in vertical text is joined and set sideways as a word (CSS Writing Modes 3 §5.1.1). Text can be extracted from the PDF in reading order (ActualText per word or cluster; fixes swapped or wrong characters). In the Canvas outline renderer, marks of right-to-left clusters are placed correctly. With the Hebrew letters of Tinos, vowel points and cantillation marks now avoid each other (the fixes for the font's contextual rules also apply to right-to-left scripts)
234
+ - **Greek and Cyrillic in Japanese documents**: with a generic or default font (a pair of a Japanese font and a Latin font), a word of two or more Greek or Cyrillic letters (`Россия`, `Ελλάδα`, `αβγ`, `Санкт-Петербург`) is set in the Latin font like a Latin word, and Japanese–Latin spacing is inserted between it and Japanese characters (before, letters the Japanese font has were set in the Japanese font and only the others in the Latin font, mixing fonts within one word). A single letter (`α`線, `Ω`, `β`-カロテン, `μ`m) stays in the Japanese font as before. **Results change** for words of two or more Greek or Cyrillic letters that were set in the Japanese font. Not changed with Antenna House compatibility (`--style ah`, `--compat antenna`)
235
+ - **Hyphenation**: added rules for Russian (`ru`), Ukrainian (`uk`) and Modern Greek (`el`, monotonic spelling) (`hyphens: auto`, `hyphenate="true"`; in text of these languages, words in Cyrillic or Greek letters are broken). The rules are loaded only when a document that uses them is opened
236
+ - **Hebrew (Tinos, Arimo and similar fonts)**: a dagesh or a shin/sin dot written after a vowel point now forms the glyph combined with the consonant (the points are passed to the font in the same order as HarfBuzz). The reordering of Arabic and Hebrew combining marks applies only to what is passed to the font; text extracted from the PDF keeps the original order
237
+ - **Documents (supported languages and scripts)**: added the section "Supported languages and scripts" (section 5.6 of the XSL-FO 1.1 volume, section 5.8 of the HTML and CSS volume) to the Conformance Guides (the four volumes, Japanese and English). For each language and script, a table gives whether the default fonts can set it or a font must be specified (and the fonts it was checked with), how lines wrap, vertical writing and the main limitations (it also names the scripts that have not been checked and the languages that have hyphenation rules; variable fonts and color emoji fonts can be used as described in the "Variable fonts" and "Fonts with colored glyphs" items above). The value table of section 5.4 of the XSL-FO volume now lists the same languages with hyphenation rules as the text (Russian, Ukrainian and Modern Greek were missing). The "Other scripts" item of the README now mentions Chinese, Vietnamese, Greek and Cyrillic and points to this table
238
+ - **Documents (font samples)**: added typeset samples to the font sections of the Conformance Guide (the four volumes, Japanese and English). Samples for each language and script (Article 1 of the Universal Declaration of Human Rights set in the fonts for Japanese, Chinese, Korean, Latin, Greek and Cyrillic, Hebrew, Arabic, the Indic scripts, Thai and other Southeast Asian scripts, Tibetan and Mongolian), emoji samples (color emoji, skin tone and ZWJ sequences, flags and keycaps, switching with U+FE0F and U+FE0E, monochrome emoji, vertical text, `font-palette`) and variable font samples (weight, width, slant and optical size, `font-variation-settings`, the ranges of `@font-face` and `font-named-instance`). The sample fonts (Noto fonts, Nabla, Anybody and Roboto Flex; SIL Open Font License 1.1) are not in the repository: `npm run docs:conformance` fetches them from the Google Fonts server (network access is required; the list is in `scripts/conformance-fonts.mjs`)
239
+ - **Height of the background, border and link area of inline boxes (`span` and so on)** (HTML): now the ascent above and the descent below the baseline of the element's first available font (the hhea ascent and descent) (CSS 2.1 §10.6.1, CSS Inline 3 §6.4). **The rendered result changes**: it used to be the font size (1em) high. With the default fonts (Latin Tinos / Arimo paired with the Japanese fonts) it is about 1.11em (0.01em more above, 0.10em more below), with the monospace font (Cousine) 1.13em, and with fonts that are tall above and below (Myanmar, Tibetan and so on) it covers the whole of the characters. Documents that specify only a Japanese font through `@font-face` keep the character frame (1em) and do not change (for fonts whose OS/2 typo ascender and descender span 1em, those values are used; Chromium uses the hhea values, which gives about 1.44em for Noto Serif JP and Noto Sans JP). The frame of a `span` that contains an image, ruby or superscript encloses the height of that element's text, not the whole line. Line heights and character positions do not change. `fo:inline` in XSL-FO does not change
240
+ - **Side of ruby and emphasis marks in vertical writing (`writing-mode: vertical-lr`)** (HTML): ruby (`ruby-position` unspecified or `over`) and emphasis marks (`text-emphasis-position` unspecified or `right`) are placed to the right of the text (CSS Writing Modes 3 §6.4: the over side of a line is the right in vertical-lr too; CSS Ruby 1 §4.1, CSS Text Decoration 4 §3.4). `under` and `left` go to the left. **Results change for vertical-lr documents**: they used to go on the opposite side (ruby and emphasis marks on the left, `ruby-position: under` on the right), and emphasis marks could not be put on the right. Horizontal writing, vertical-rl and XSL-FO do not change
241
+ - **Line spacing for ruby on the under side (`ruby-position: under`)** (HTML): when `line-height` is too small to hold the ruby, the missing amount is added on the side that has the ruby (below the line; on the left in vertical writing) rather than above the line (CSS Ruby 1 §3.6). With ruby on both sides it is split above and below in proportion to their thickness. **Results change for documents that use `ruby-position: under` with leading narrower than the ruby**: the space used to be added above the line, so the ruby below overlapped the characters of a following line without ruby. Ruby that fits in the leading and ruby on the over side do not change
242
+ - **Boxes of `::before` and `::after`** (HTML): background, border, padding, left and right `margin`, `vertical-align` and `box-decoration-break` now apply to a `display: inline` `::before` or `::after`. A `display: inline-block` `::before` or `::after` also takes `margin` (a negative `margin-left` can move it out to the left), border, background and height (CSS Pseudo 4 §4.1; until now only the text formatting, and the width and padding of an `inline-block`, were applied). **Results change**: backgrounds, borders and margins written on `::before` and `::after` are now drawn and take up space (for example, the space of `li::before { margin-right: 0.5em }` is inserted). An `inline-block` `::before` or `::after` without a width becomes one unbreakable box in the line (no line break inside its content)
243
+ - **Negative `margin` of inline boxes and line breaking** (HTML, XSL-FO): the negative left and right `margin` of a `display: inline` box (`span` and so on; in XSL-FO, `space-start`, `space-end` and `margin` of `fo:inline`) is now counted when deciding whether content fits on the line (CSS 2.1 §8.3, §9.4.2, §10.3.1). **Results change**: text that fits on the line once a negative right (end side) `margin` is subtracted now stays on one line (until now the line was broken using the width before subtracting the negative `margin`). Lines without a negative `margin` do not change
244
+ - **Text formatting of page margin boxes** (HTML): in margin boxes such as `@top-center`, `font-variant: small-caps` and `font-variant-caps`, the `font` shorthand, `text-transform`, `text-decoration`, `word-spacing`, `white-space`, `font-variant-*`, `font-feature-settings`, `font-kerning`, `font-stretch`, `font-variation-settings`, `font-palette` and `hyphens` now apply (CSS Paged Media 3 §6 and Appendix A; until now only font size, family, weight, style, color, line height and letter spacing were read). These declarations written in `@page` are inherited by the margin boxes. **Results change**: these declarations written on margin boxes (and in `@page`) now take effect (for example, the running head of `@top-right { content: string(heading); font-variant: small-caps }` is set in small caps, and the size and weight of the shorthand `font: bold 9pt sans-serif` apply). `text-transform` and small caps do not apply to the digits of `counter(page)` or to `element()` elements
245
+ - **Fonts without a space glyph** (XSL-FO, HTML): in text whose `font-family` names a font that has no glyph for a space (U+0020, U+00A0, U+202F, U+3000 and so on; emoji fonts, icon fonts, Latin fonts without a narrow space), spaces are now set in another font that has the glyph (the same fallback as for other characters missing from that font; CSS Fonts 4 §5.2). **Results change**: until now such a space became the missing-glyph mark (□) or was as wide as the font's missing glyph. The width of those spaces changes, and so does the height of a line that names only such a font (the font that decides the line height is the first font that has a space)
246
+ - **Inherited `font-family` and the element's language** (HTML): an element that inherits `font-family` from its parent now also chooses fonts by its own `lang` when it has one (the same result as an element that specifies `font-family` itself; CSS Fonts 4 §5.2). **Results change**: in a Japanese document, in elements whose `lang` is not Japanese, Chinese or Korean (`<p lang="ru">`, `<span lang="en">` and so on, without their own `font-family`), single Cyrillic and Greek letters (Russian `и`, `в`, `у` and so on) and symbols that the Latin font has (`—` and so on) are set in the Latin font instead of the Japanese font. A `lang="ja"` element inside a Latin-language element goes back to the Japanese font
247
+ - **Documents that list several `@font-face` rules with the same name** (HTML): when two or more `@font-face` rules have the same `font-family` and the same set of descriptors (`font-weight` and so on), they are now searched per character from the last one written, as in CSS Fonts 4 §4.5 and §5.2 (characters missing from the later font come from the earlier one). **This changes typesetting results**: previously only the first rule was used. A `@font-face` without a `font-weight` descriptor is selected as a weight-400 face even if the font file is bold (§4.4; bold text is drawn by emboldening that font). With `--style ah`, to match the output of AH Formatter, a `@font-face` without a `font-weight` descriptor is used as a face of the weight of the font file itself (usWeightClass in OS/2), so that bold text in a document that lists Regular, Bold and Heavy files under one name is set in the bold file (previously Regular was emboldened, which looked outlined)
248
+ - **Line spacing for second-level ruby and for emphasis marks under or to the left** (HTML): second-level ruby without a position (under the base; to the left in vertical writing) and emphasis marks under the text (`text-emphasis-position: under`; `left` in vertical writing) no longer count toward the line height, like ruby and marks on the over side; only the amount that does not fit in the leading is added on the side that has the annotation (CSS Ruby 1 §3.6, CSS Text Decoration 4 §3.4). **Results change**: until now such a line became taller by part or all of the annotation thickness (half the body font size; 5pt for 10pt text) even when the leading had room (2.5pt for a 10pt line with `line-height: 2`). **Lines with emphasis marks under the text or second-level ruby now have the same line pitch as other lines** (when the leading, `line-height` minus the font size, is at least the annotation thickness; when it is not, the line grows only by the missing amount). Chinese documents (`lang="zh"`) place emphasis marks under the text by default, so the pitch of their lines with emphasis marks changes. Ruby and emphasis marks on the over side in Japanese horizontal writing, and XSL-FO, do not change
249
+ - **`text-align: inside` and `outside`** (HTML; only with the AH Formatter compatibility style `--style ah`): these AH Formatter extension values, which align to the gutter (binding) side or the fore-edge side of the page, are now read (values written on the prefixed `-ah-text-align` are read with every style, see the "Antenna House extension values" item above; the same as `inside` and `outside` of XSL 1.1 §7.16.9; left and right pages are decided as for `@page :left` and `:right`). **Results change with `--style ah`**: until now the declaration was dropped as invalid and the inherited alignment (justified and so on) was used. With the other styles the values are still dropped as invalid (they are not values of `text-align` in CSS Text 3 §6.1). `text-align="inside"` and `"outside"` in XSL-FO were already supported
250
+ - **`inside` and `outside` of `text-align` and `text-align-last` in vertical writing** (XSL-FO; HTML with `--style ah`): in vertical lines the binding side (left or right) is not along the line (top to bottom), so on every page `inside` aligns to the start of the line (top) and `outside` to the end (bottom) (XSL 1.1 §7.16.9: when the binding edge is neither the start edge nor the end edge, `inside` is start and `outside` is end). **Results change**: until now top and bottom were swapped on even pages in vertical writing too. Horizontal writing does not change
251
+ - **`bolder` and `lighter` with `--style ah`** (HTML): `@font-face` rules without a `font-weight` descriptor now count with the weight of the font file (OS/2 usWeightClass), the same weight used to register the face. **Results change**: in a family that lists Regular and Bold files without descriptors, `b` and `strong` are set with the bold file. Previously they counted as the descriptor weight (400), became 500 and were set with the regular file
252
+ - **Column widths of tables with `--style ah`** (HTML): when the columns of an auto-width table do not fit, they are now distributed the same way as for XSL-FO tables (columns whose maximum length is at most half of an equal share keep their maximum length; the other columns get widths in proportion to their maximum lengths). The previous rule, which kept every column whose maximum length was at most an equal share, is gone. **Results change**: tables with many short columns (in the 9-column table "PDF/A の大きな特徴" of CSS-Print 4th edition, the PDF/A headers now wrap as "PDF/" and "A-1a" and the first column gets wider, as in the sample)
253
+ - **Line spacing in table cells with a line grid** (HTML): lines in the cells of a table (row, cell) with `-ah-baseline-grid: new` are no longer placed on the grid; their em boxes are stacked directly (matching AH Formatter's line grid samples: in CSS-Print 4th edition, with `table { line-height: 21q; -ah-baseline-grid: new }`, wrapped lines in a cell advance by the font size). **Results change**: previously the second and later lines were placed on the `line-height` grid (advancing by 21q)
254
+ - **Page number format and text-transform in margin boxes** (HTML): `counter(page, <counter style>)` in page margin boxes is now formatted with each box's own style, and that box's `text-transform` is applied (CSS Text 3 §2.1). Until now the style of the first `counter(page)` in the document was used for every box (so `lower-roman` in another box became decimal), and `text-transform` was not applied to the number. **Results change**: page numbers written with different styles or text-transform in different boxes
255
+ - **inside and outside of text-align-last** (HTML): `inside` and `outside` (AH Formatter extension values that align the last line of a paragraph to the gutter or fore-edge side; XSL 1.1 §7.16.10) are now read on `-ah-text-align-last` with every style, and on the unprefixed `text-align-last` only with `--style ah` (the same as `inside` and `outside` of `text-align`; with the other styles they are invalid values and produce a warning). Until now they were not read
256
+ - **font-synthesis** (HTML): `font-synthesis` (shorthand) and `font-synthesis-weight`, `-style`, `-small-caps` and `-position` (CSS Fonts 4 §2.8; inherited) are now read. With `none`, fonts without bold are not emboldened, fonts without italic are not slanted, and capitals are not shrunk in place of small capitals for fonts without small-cap glyphs. `font-synthesis-style: oblique-only` slants only for `font-style: oblique`. `-position` is only read (superscript and subscript glyphs were never synthesized). Until now they were reported as unsupported and synthesis always happened. **Results change**: glyph shapes in documents that set these to `none`
257
+ - **Content width with negative text-indent** (HTML and XSL-FO): when a box's width comes from its contents (shrink-to-fit for inline blocks, floats, table columns and so on), a negative indent is now subtracted from the line length (CSS Text 3 §8.1: the indent is treated as a margin on the start edge of the line box; the same as Chromium). Until now only positive indents were counted, so boxes with a negative indent were wider by the indent. **Results change**: widths of inline blocks and the like with a negative indent
258
+ - **Margins of inline svg and object** (HTML): inline `<svg>` elements written in the document and image `<object>` elements now get margins on all four sides, and borders, padding and background color, the same as `<img>` (CSS 2.1 §8.3, §10.8). Until now they were not read. **Results change**: positions of inline svg and object elements with margins and the like
259
+ - **Rounded corners and shadows of inline blocks** (HTML and XSL-FO): `border-radius` (and AH Formatter's `axf:border-radius` and so on) and `box-shadow` are now applied to inline-block boxes such as `display: inline-block` (`fo:inline-container` in XSL-FO) (CSS Backgrounds 3 §5.3, §7). Until now they were not applied to inline-block boxes: the background, border, background images and gradients were drawn square and shadows were not drawn (block boxes already had rounded corners and shadows). **Results change**: the appearance of inline blocks with rounded corners or shadows. Also, in XSL-FO compatibility mode, the unprefixed `border-radius` (not in XSL 1.1; an AH Formatter extension spelling) is read the same as `axf:border-radius` (the radio buttons in the axf-form-field-1 sample become round; spec mode still reports it as unsupported)
260
+ - **conic-gradient** (HTML): `conic-gradient()` and `repeating-conic-gradient()` (CSS Images 4 §3.3; `from <angle>`, `at <position>`, angle and percentage stops) are now drawn as backgrounds. Until now they were not drawn and no warning was shown. Both PDF and the web app draw them as thin wedges (1° or less) from the center (SVG and PDF have no conic gradient)
261
+ - **Inline images with borders, padding or background** (HTML): the border, padding and vertical margins of `img { border: …; padding: … }` now count toward the line height (CSS 2.1 §10.8: the inline box of a replaced element is as tall as its margin box). Until now the border and padding did not count and overlapped the neighboring lines, and vertical margins were ignored as unsupported. **Results change**: line heights and vertical positions of inline images with borders, padding or vertical margins
262
+ - **CSS applied by the command** (HTML): without `--css`, only the CSS in the input directory that the HTML references (`<link>`, `@import`) is used. Unreferenced CSS is not applied, and a warning says so. CSS named with `--css` is still added as a user stylesheet even if unreferenced. The API gains `unreferencedCss` (`'user-stylesheet'` (default) or `'ignore'`; the web app and the API default do not change). **Behavior changes**: until now the command also applied CSS meant for other documents in the same directory
263
+ - **Where lines are placed on the line grid** (HTML and XSL-FO; the AH Formatter extensions `-ah-baseline-grid` and `axf:baseline-grid`): (1) for lines set in a font smaller than the one that made the grid, the grid line is now chosen with the ascent of the grid's em box (when the top of the line plus that ascent passes a grid baseline, the next grid line is used). Until now the line's own em box was used, which sometimes put the line one grid line higher. (2) In lines with `line-height-shift-adjustment: disregard-shifts` (`-ah-line-height-shift-adjustment`), the raise of superscripts and subscripts is no longer counted (XSL 1.1 §7.16.5; the same as for the line height). Until now the top of a superscript could push the line to the next grid line. **Results change**: positions of lines with smaller fonts in a line grid and of lines with superscripts (in CSS-Print 4th edition, the caption of the figure in 11.1 is on the same grid line as in the sample, and so is the following heading 11.2.5; difference from the sample 1.6% → 1.5%)
264
+ - **Line grid in table cells** (HTML; the AH Formatter extension `-ah-baseline-grid`): `new` and `root` (inherited) on a table, row group, row or cell now also apply to the cell contents. In a line-grid area, no half-leading is added before the first line and after the last line (axf:baseline-grid in AH Formatter's public documentation), so a one-line cell is font size + padding + border high. Until now the table's declaration was not read and cell lines got half-leading. **Results change**: row heights of tables with a line grid (in CSS-Print 4th edition, the rows of the table in 10.1 and others go from 21.26pt to 14.88pt, as in the sample; difference from the sample 2.0% → 1.6%)
265
+ - **Inter-script spacing around footnote calls** (HTML): `text-autospace` (and `-ah-text-autospace`) on `::footnote-call` is now read. With `no-autospace` (`-ah-text-autospace: none`), no space is added between the footnote call and the adjacent Japanese characters (CSS Text 4 §8.4). Until now the quarter-em space of the surrounding text was added. **Results change**: positions of footnote calls in documents with this declaration (such as “要素2)” in CSS-Print 4th edition, which now match the sample)
266
+ - **Bottom margin of the last list item** (HTML): the bottom margin of the last child of the last item and the item's (li) own bottom margin now collapse with the margin after the list and the top margin of the next block (CSS 2.1 §8.3.1; when the li and the list have no bottom border or padding). Until now they stayed inside the item and were added to the margin of the next block. **Results change**: the space after lists whose last item ends with an element that has a margin (boxes, paragraphs and so on) (in CSS-Print 4th edition, the space above “フィードバック” in the preface becomes 7.79pt smaller and matches the sample)
267
+ - **`-ah-text-justify-trim` and `axf:text-justify-trim`** (HTML and XSL-FO; AH Formatter extensions read with every style and mode): the spacing that line adjustment (compression) may reduce is now read (inherited). `punctuation` also compresses the half-em space after full stops (。.) in the middle of a line, in the same proportion as commas and brackets, to fit characters on the line (the default `auto` does not, following JLREQ §3.8.3). `punctuation-except-fullstop` and `punctuation-except-middledot` exclude full stops and middle dots (・:;), and `none` compresses no punctuation space. `inter-word` compresses Latin word spaces even with AH Formatter compatibility. `kana` and `ideograph` (compressing the spacing between kana or kanji) are not supported and produce a warning. **Results change**: line breaks in documents that specify these (CSS-Print 4th edition specifies `punctuation` on `body:lang(ja)`; the number of lines in the multi-column example of 4.1.4 and the punctuation compression in 1.1 and elsewhere now match the sample; difference from the sample 2.4% → 2.0%)
268
+ - **Line height with footnote reference marks** (HTML and XSL-FO): when a footnote reference mark (`::footnote-call` and so on) is set in a fallback font (such as a Latin font in a Japanese line), its inline box is now determined from the first available font, as for single characters (CSS Inline 3 §5.3). Until now only the reference marks used their own font. **Results change**: heights of lines that count the reference mark at its unshifted position (`-ah-line-height-shift-adjustment: disregard-shifts`) and so on (in section 1.1 of CSS-Print 4th edition, the line with a footnote reference was 1.06pt taller and pushed the following box below the sample; it now matches the sample)
269
+ - **Line height with ligature glyphs** (HTML and XSL-FO): when a Latin ligature glyph (`ft`, `fi` and so on) comes from a fallback font (such as a Latin font in a Japanese line), the line height is now determined from the first available font, as for single characters (CSS Inline 3 §5.3). The same applies to glyphs of joined sequences (Arabic and so on). Until now only ligature glyphs determined the line height from their own font. **Results change**: heights of lines containing ligatures (in CSS-Print 4th edition, lines with “border-left-width” were 1.29pt taller and pushed the following lines below the sample; they now match the sample)
270
+ - **Vertical position of images with `-ah-alignment-baseline`** (HTML; Japanese lines with `--style ah`): the em box that `text-after-edge`, `text-before-edge`, `central` and so on align an image to is now that of the line's reference font (the Japanese font in Japanese lines) (XSL 1.1 §7.9.1: text-after-edge of an ideographic font is the ideographic baseline, 0.12em below the alphabetic baseline). Until now the em box of the first Latin font in `font-family` was used (0.25em below the baseline for Source Sans Pro). **Results change**: vertical positions of aligned images in Japanese lines whose `font-family` starts with a Latin font (the table-of-contents icons of CSS-Print 4th edition move up by 1.49pt, to the same position as in the sample)
271
+ - **Line height with outside list markers** (HTML): an outside marker (`list-style-position: outside`) belongs to the first line box of the item's content (CSS Lists 3 §3.5), so when the part of the marker below its baseline (from the marker font, `line-height` of `::marker` and so on) is deeper than that of the first line of the content, the first line box now extends downward. Until now, the marker's line height affected only the overall height of the item, not what follows the first line (nested lists and following lines). **Results change**: positions of the second and later lines and of nested lists in items whose marker font differs from the content
272
+ - **Prefixed MathML and SVG** (HTML; only with the AH Formatter compatibility style `--style ah`): in documents read with the HTML syntax, elements whose prefix is declared with `xmlns:prefix` as the MathML or SVG namespace (`<m:math xmlns:m="http://www.w3.org/1998/Math/MathML">`) are now set as MathML or SVG (as AH Formatter does). The HTML syntax does not treat prefixes as namespaces, so with the other styles such elements are still unknown elements whose text is set as is. Unlike `--xhtml`, which reads the whole document with the XML syntax, the newline after `pre` and so on follow the HTML syntax. **Results change with `--style ah`**
273
+ - **Where justification expands inter-character spacing** (HTML and XSL-FO): when the remaining space of a line is distributed to inter-character gaps, no space is now added before or after brackets, full stops and commas, middle dots, dividing punctuation (?!), hyphens, or ideographic spaces (JLREQ §3.1.11, “Character Sequences which Do Not Allow Increase of Spacing as Part of Line Adjustment Processing”). Until now, gaps at line-break opportunities (after commas, before opening brackets, after closing brackets and so on) received space. With AH Formatter compatibility (HTML `--style ah` and the XSL-FO compatibility mode), space is added before and after punctuation as well, as in AH Formatter's output (also at gaps where a line cannot break, such as “き、” and “す。”; not within inseparable “……” or “――”). **Results change**: positions of characters within justified lines (line breaks do not change)
274
+ - **`-ah-lang`** (HTML; with every style): `-ah-lang`, the AH Formatter extension that sets the language of an element (the same as `language` of XSL 1.1 §7.9.2; inherited), is now read. It applies to elements and to `::before`, `::after` and `::marker`, and takes precedence over the `lang` attribute on the same element. The language affects font selection (in Latin elements, symbols are also set in the Latin font), line breaking and inter-script spacing. **Results change**: until now it was ignored (for example, the list marker “◦” with `li::marker { -ah-lang: en }` is now set in the Latin font rather than the Japanese font, which also changes the line height)
275
+ - **Inter-script spacing and the ideographic space** (HTML): CSS `text-autospace` (and `-ah-text-autospace`) no longer adds space between the ideographic space (U+3000) and Latin letters or digits (CSS Text 4 §8.4.1: the ideographs that get the space are characters such as Han and kana, not the space character U+3000). `axf:text-autospace` in XSL-FO still treats the ideographic space as an ideograph. **Results change**: Latin text after an ideographic space (as in “第 1 章 Web”) moves a quarter em earlier
276
+ - **Column balancing** (HTML and XSL-FO): when the column height is increased so that earlier columns are not shorter than later ones, a height at which fewer columns are used (a later column is left empty) is no longer taken. **Results change**: content may now be set in the given number of columns with the second column longer than the first (until now the height was increased so that fewer columns were used, and the box could be pushed to the next page)
277
+ - **`-ah-text-decoration-line`, `-ah-text-decoration-style`, `-ah-text-decoration-color` and `-ah-text-line-width`** (HTML; with every style): these AH Formatter text decoration extensions are now read as `text-decoration-line`, `-style`, `-color` and `-thickness` (the line style `wave` as `wavy`; styles that CSS does not have, such as `dot-dash`, are dropped as invalid). **Results change**: until now they were ignored
278
+ - **Line breaking with `line-break: auto`** (HTML; only with the AH Formatter compatibility style `--style ah`): lines may now also break before small kana, the prolonged sound mark (ー) and iteration marks (ゝ, 々 and so on) (CSS Text 3 §5.2 leaves the rules of `auto` to the UA; this follows AH Formatter's output; explicit values such as `line-break: normal` do not change). **Results change with `--style ah`**: line breaks change
279
+ - **Baseline grid (`-ah-baseline-grid`)** (HTML and XSL-FO): when the half-leading of the last line of a `new` or `root` box is negative (`line-height` smaller than the font size), the box now extends to the bottom of the em box. The `root` grid is now drawn from the top of the page's content area, not from the top of the box, with the font size and `line-height` of the document root (until now, the style of the first line laid out). **Results change**: positions after large headings in a baseline grid, and of boxes on the `root` grid (such as figure captions)
280
+ - **`-ah-last-line-end-indent`** (HTML; with every style): this AH Formatter extension (the same as `last-line-end-indent` of XSL 1.1 §7.16.3; inherited; a negative value moves the end of the last line outward) is now read (also on `::before` and `::after`). Percentages are not read. **Results change**: until now it was ignored
281
+ - **`auto` left and right margins of vertical boxes in horizontal text** (HTML): for a vertical box whose width is determined by its content (also a box with `-ah-display-align`), the remaining space now goes to `auto` values of `margin-left` and `margin-right` (CSS 2.1 §10.3.3). **Results change**: until now the box was placed at the left
282
+ - **`-ah-float-x`** (HTML; with every style): of the AH Formatter float extensions, the horizontal position `-ah-float-x` is now read for `left`, `right`, `start`, `end`, `inside` (the gutter side) and `outside` (the fore-edge side), and is laid out the same as `float` to that side (when `float` is specified, `float` is used). On a `position: running()` element, the box is placed against that edge inside the page-margin box (`content: element()`). A box wider than the margin box overflows on the opposite side, and the part that leaves the page is cut at the bleed edge. **Results change**: `-ah-float-x` used to be ignored. A chapter mark (thumb tab) placed in the fore-edge margin with `-ah-float-x: inside` overlapped the left edge of the body text on left pages; it now appears at the left (fore) edge of the page, symmetric with right pages. `center`, `alternate`, `column-outside`, and declarations that also set `-ah-float-y` (the vertical position) are not read (same as no declaration; reported as unsupported)
283
+ - **Font of `position: running()` elements** (HTML; only with the AH Formatter compatibility style `--style ah`): when the element has no `font-family` of its own, its font is the `font-family` of the page-margin box that displays it (or of `@page` when the box has none), as in AH Formatter. **Results change with `--style ah`**: a running() element that specifies only a weight (`font-weight`), such as the number of a chapter mark, is set in that weight of the margin box's font instead of the bold of the body font. With the other styles it is inherited from its original position in the document, as before (CSS GCPM 3 §1.2.1)
284
+ - **Height of `line-height: normal` lines and glyphs from fallback fonts** (HTML): on a line with `line-height: normal`, glyphs set in the second or a later font of the `font-family` list (fonts loaded with `@font-face`, `--font` or `fonts`) now contribute that font's ascent, descent and line gap to the height of the line (CSS Inline 3 §5.3, CSS 2.1 §10.8.1; the same as browsers; also in vertical writing and for ruby bases). **Results change**: in a document with `line-height: normal` that lists a font for a tall script (Myanmar, Tibetan and so on) after a Japanese font, the lines containing that script become taller and no longer overlap (for example, three 20pt lines with `font-family: J, SM` (Noto Serif JP, Noto Serif Myanmar) go from 86.2pt to 149.9pt; Chromium gives 150.5pt). When a Japanese font is listed after a Latin font (both loaded), the lines containing Japanese characters get the height of the Japanese font. When a generic name (`serif` and so on) or the name of a default font comes before the loaded font in the `font-family` list, the first available font is the default font, so the `normal` line height is 1.2 (previously the value of the later, loaded font was applied to every line). Lines whose `line-height` is a number, a length or a percentage, and documents with the default style (`line-height: 1.75`), do not change. The `normal` line height of the default fonts (fonts that are not loaded) is still 1.2 times the font size, and they are not counted when used as fallback fonts
285
+ - **The baseline position within a line now comes from the font's metrics** (horizontal lines in HTML): the distance from the top of a line to the baseline is (line-height + A − D) ÷ 2, where A and D are the ascent and descent of the first available font (hhea ascent and descent) (CSS Inline 3 §5.3, CSS 2.1 §10.8.1; the same as browsers). Until now the baseline was placed 0.88em below the top of the font-size box for every font. **Results change**: glyphs move slightly up or down on every horizontal line in HTML. With the default fonts (generic `serif` = Latin Tinos + Japanese Noto Serif JP; the first available font is Tinos) they move up by 0.0425 times the font size (about 0.43pt at 10pt); `sans-serif` moves up by 0.033 times and `monospace` by 0.114 times; lines whose first font is a Japanese font named explicitly (Noto Serif JP, for example) move down by 0.0525 times. The line pitch does not change. However, when a line contains an element that names another font (monospace `code` within body text, for example), the boxes are aligned on their baselines and enclosed, so that line alone becomes slightly taller (for `monospace` glyphs of the same size and `line-height` within `serif` body text, by 0.07 times the font size = about 0.7pt at 10pt; browsers do the same). Page breaks therefore move in some documents (the "HTML and CSS" manual keeps its 139 pages, but on 19 pages the lines that fall on the page changed). To keep the lines even, give that element `line-height: 1` or similar. This also fixes lines that became slightly taller than needed when they contained a small `inline-block` or an image with `vertical-align: text-top`. Vertical lines and XSL-FO are unchanged. Antenna House compatibility (`--style ah`) is also unchanged (it keeps the baseline at the position of the character frame, to match the samples of Antenna House)
286
+ - **The default style no longer makes lines taller for monospace elements in body text** (HTML; only with the default style `kumiori`): inline `code`, `kbd`, `samp` and `tt` get `line-height: 1` (inside `pre` and the like they inherit the line-height of `pre`). Since the baseline within a line now comes from the font's metrics, a line of body text (generic `serif` or `sans-serif`) containing such a monospace element was about 0.07 times the font size taller; it now has the same height as the other lines (CSS 2.1 §10.8.1, CSS Inline 3 §5.3; when the body text's line-height is at least 1.15 times the font size). Backgrounds and borders keep their extent. A line-height in the author style sheet takes precedence. **Results change**: with the default style, lines with `code` and the like have the same line pitch as the body text (the English HTML and CSS conformance manual again breaks pages as in the previous version, except for one page). `--style browser`, `ah`, `weasyprint` and `vivliostyle` do not change
287
+ - **The page margins under `--style weasyprint` are now WeasyPrint's default of 75px (56.25pt)** (HTML): `@page { margin: 75px }` from WeasyPrint's default style sheet (css/html5_ua.css in WeasyPrint 65.1) is now part of the `--style weasyprint` default style sheet. Until now the margins were Kumiori's default of 20mm (56.69pt), shifting the whole page content by 0.44pt. A `margin` in the document's `@page` still takes precedence. **Results change**: documents under `--style weasyprint` that do not set page margins in `@page`
288
+ - **`line-height: normal` under `--style browser` and `browser-margin` now comes from the font's metrics for the default fonts too** (HTML): when a default font (Noto Serif JP, Tinos, Cousine and so on) is the first available font, the normal line height is its hhea ascent + descent + lineGap, and glyphs set in a default font as a fallback also count toward the line height (CSS Inline 3 §5.3 and §6.4, CSS 2.1 §10.8.1; the same as Chromium, the reference for these styles). A Latin-only line under the generic `serif` changes from 1.2 to 1.150 times the font size, a line with Japanese characters becomes 1.437 times, and a line under the generic `monospace` 1.133 times. **Results change**: the line pitch of `line-height: normal` documents under `--style browser` and `browser-margin` changes and comes closer to Chromium (median baseline difference from Chromium for the e2e/fixtures: sample 31.5 → 1.4pt (and 3 pages, as in Chromium), japanese 52.9 → 6.2pt, book 4.8 → 0.5pt, layout 9.5 → 6.2pt; the column pitch of vertical text 14.4 → 17.3pt against 18pt in Chromium). The other styles keep 1.2 times the font size for the default fonts
289
+ - **XSL-FO: the spaces before and after a `span="all"` block are now resolved by the rules for reference-area boundaries (results change).** In a multi-column body, only spaces with `conditionality="retain"` remain around a change of `span="all"` (XSL 1.1 §4.3.1, §6.4.14; previously the larger of the two spaces was kept). In compatibility mode (`--compat antenna`) the same applies to a single-column body (as Antenna House does)
290
+ - **XSL-FO: the `top` of an absolutely positioned `fo:block-container` that follows a `span="all"` block is now measured from the top of the area after the span (results change)** (XSL 1.1 §7.6.1; multi-column bodies, and single-column bodies in compatibility mode)
291
+ - **XSL-FO: when before-floats (`fo:float` with `float="before"`) are stacked, the last `space-after` in the content of each is now kept between it and the following before-float (results change)** (XSL 1.1 §4.3.1: the float areas are not reference areas, so the space remains up to the next float; previously they were stacked with no space). At the end of the before-float area (before the separator and the body text) the space is discarded in spec mode and kept in compatibility mode (`--compat antenna`), as Antenna House does. Stacked top floats in HTML (`float: top` and similar) are also spaced apart
292
+ - **XSL-FO compatibility mode (`--compat antenna`): a table row or `fo:list-item` with an integer-strength `keep-together` (such as `keep-together.within-column="1"`) that does not fit even on a new page (column) is now split from the current position, without applying the keep (results change)**. Previously it was not split and overflowed the bottom of the page, the same as `always`. This follows how Antenna House typesets (rows with `always` are still not split). Spec mode is unchanged
293
+ - **XSL-FO compatibility mode (`--compat antenna`): when a `keep-with-next` chain that starts at the top of a page (headings and the like) and the following block with `keep-together="always"` do not fit on one page, the block is no longer moved to the next page; it is placed after the chain without splitting and overflows the bottom of the page (results change)**. Previously only the block was moved to the next page (leaving a page with only the headings, and adding a page). This follows how Antenna House typesets (XSL 1.1 §4.8 does not list not fitting in the area as a reason to relax a keep). A warning is given when it overflows. Spec mode is unchanged
294
+ - **XSL-FO spec mode (`--compat spec`, the default): a table row or `fo:list-item` with `keep-together` that does not fit even on a new page (column) is now split from the current position, without applying the keep (results change)**. Previously it was not split and overflowed the bottom of the page. This matches `keep-together` on blocks (split when taller than a page); XSL 1.1 §4.8 does not settle how keeps are treated when the content does not fit in the area
295
+ - **XSL-FO compatibility mode (`--compat antenna`): in Japanese and Chinese text, line breaks are now allowed before and after ambiguous characters set full-width (≧, ①, ※ and the like; Line_Break AI in UAX #14) (results change)**. Previously they were treated as Latin letters (AL), so a sequence such as "fo:table-body≧fo:table-row" could not be broken. This follows Antenna House's output (UAX #14 allows AI to be treated as ID for compatibility with East Asian legacy implementations). Characters set half-width in a Latin font, spec mode and HTML are unchanged. Of the 217 samples, only table-keep-together-overflow-1 changes, and it now has 12 pages like the sample
296
+ - XSL-FO: `axf:outline-level` on a block inside `fo:static-content` no longer makes a bookmark and is reported as unsupported. Previously a bookmark was added each time the static content was read again for a page master, and none of them had a destination (with a missing-destination warning for each)
297
+ - HTML: a table (`table`) with `clear` is now placed below the floats on that side (CSS 2.1 §9.5.2). Previously the `clear` of a table was not read, and the table was placed over the area of the float, so cell text could overlap the float
298
+ - **XSL-FO: the font set is now chosen by the language of the element (results change)**. In an element whose `xml:lang` or `language` is not Japanese, Chinese or Korean (`xml:lang="en"`, `xml:lang="ru"` and so on; the three-letter codes `jpn`, `zho` and `kor` count as Japanese, Chinese and Korean), the default font set sets symbols (`—`, `§` and the like) and single Greek and Cyrillic letters (Russian `и`, `в`, `у` and the like) in the Latin font rather than the Japanese font. An element that inherits `font-family` gives the same result as one that specifies it (the same as `lang` in HTML; CSS Fonts 4 §5.2). A Japanese element inside a Latin-language element goes back to the Japanese font. In English documents (with `xml:lang="en"` on the whole document) the widths of dashes and similar characters change, and so does line breaking. Lists that name loaded fonts (MS Mincho and the like) are unchanged. Of the 217 samples, the 37 that specify a language: 3 better, 0 worse
299
+ - XSL-FO: the unprefixed `background-content-width` and `background-content-height` (names not in XSL 1.1) are now read only in compatibility mode (`--compat antenna`). In spec mode they are not read and are reported as unsupported. `axf:background-content-width` and `-height` are still read in every mode
300
+ - XSL-FO: values that cannot be read are now reported as warnings rather than silently dropped: keywords that are not in the value table (the Value line of each section of XSL 1.1), such as `display-align="justify"`, `hyphenate="none"`, `white-space="pre-wrap"`, `table-omit-header-at-break="column"`, `force-page-count="odd-document"`, `odd-or-even="odd-document"` and `page-position="second"`, and lengths with units that are not in XSL 1.1 §5.9.13 (`rem`, `ch`, `vw`, `q`, `jpt` and so on). The elements inside an `fo:page-sequence-master` that no `fo:page-sequence` refers to are no longer reported as unsupported
301
+ - XSL-FO: the background color of `fo:inline` is now also painted only up to the padding rectangle (XSL 1.1 §4.9.4; as with blocks and other boxes, only for boxes whose borders let the background show through, i.e. dashed, dotted, double and similar styles, or transparent and translucent border colors). Previously the background of an inline box was painted to the outer edge of the border and showed through the gaps in the border
302
+ - **XSL-FO: the outer half of the outer border of a table with `border-collapse="collapse"` is now placed outside the table regardless of the space around it (results change).** A table whose surrounding space is smaller than half the border moves up by half the border width (CSS2 §17.6.2)
303
+ - XSL-FO: `axf:border-radius` on `fo:inline` (rounded corners of inline boxes) and `axf:baseline-grid` (line grid; `new`, `root`, `none`) are now read
304
+ - XSL-FO: attributes and elements that were dropped silently (ineffective `axf:` extensions, misspellings, properties not read on that element) now appear in the warning "ignored unsupported XSL-FO elements/properties". String values of `text-align` (`<string>`) are also reported as unsupported
305
+ - Characters for which no loaded font has a glyph (drawn as the missing-glyph box) are now reported in a warning with the characters and their counts (XSL-FO and HTML)
306
+ - **Text extracted from PDF (lines with widened letter gaps)**: runs whose letter gaps are widened to 0.1em or more — a justified last line (`text-align-last: justify`, `text-align: justify-all`), `letter-spacing`, evenly spread ruby, dotted leaders in a table of contents — now carry the original character sequence (PDF ActualText). Text copied or extracted from the PDF no longer has spaces between the letters ("最 後 の 行"), and searching for "最後の行" finds it (in software that reads ActualText; verified with PDFium, used by the PDF viewer of Chrome and Edge, and with Poppler: `pdftotext` and Poppler-based viewers. MuPDF still splits by the gap width even with ActualText, so it is as before). **Glyph positions and the appearance do not change**; only the spaces in extracted text change, and the PDF content of lines that are not widened is the same as before. Some viewers select such a run as a whole. Where the font, the weight or an inline element (`span` etc.) changes within a line, the run is split there and a space may still appear. For vertical lines, see the next item
307
+ - **Text extracted from PDF (vertical lines)**: the characters of a vertical line (upright characters) are now written as glyphs of a PDF vertical font (Identity-V), one continuous run per line. They used to be placed one by one, so text copied or extracted from the PDF came out one character per line and words could not be searched (Poppler: `pdftotext` and Poppler-based viewers; PDFium, used by the PDF viewer of Chrome and Edge, did the same on pages with few vertical lines). Each line is now extracted as one line (PDFium joins a paragraph into one), and searching for a word such as "縦書き" finds it. Tate-chu-yoko is written as one unit inside the line with its character sequence (PDF ActualText; "平成12年" is extracted as a run). **Glyph positions and the appearance do not change**. The PDF content of horizontal lines is the same as before, and the PDF of a vertical document becomes slightly smaller. Vertical lines whose letter gaps are widened (0.1em or more) also carry the original character sequence, as in the previous item. Remaining: `pdftotext -raw` and MuPDF still put each glyph of a vertical font on its own line. Poppler may reverse the order of lines in multi-column vertical text, and may split a line at sideways Latin text, tate-chu-yoko and tightened consecutive punctuation
308
+ - **PDF: glyphs without a color picture in fonts that have pictures for only some glyphs (such as Source Code Pro, whose SVG table covers only a handful of glyphs)**: they are now written as ordinary text in an embedded font subset. Until now every glyph of such a font went through the color-glyph path (Type 3 fonts), so body text looked heavier, the PDF was larger, and the font name was lost. Glyphs that do have a color picture are still drawn in color (fonts with COLR, sbix or CBDT are unchanged). **Results change** (glyph positions are the same; how the glyphs are drawn changes)
309
+ - **How much glyphs are emboldened when the font has no bold face** (PDF, Canvas): the width of the stroke drawn around the outline is now 0.02 times the font size instead of 0.03 (it looked too heavy; this matches the output of widely used formatters). **Results change** (synthesized bold text gets slightly lighter; glyph positions and advances are the same)
310
+ - **Replacing the default fonts (`--font-dir`, `loadFont`)**: when the bold slot (`NotoSansJP-Bold.ttf` and so on) is given a file with the same contents as the regular weight of the same font, the font is treated as having no bold face and bold text is drawn by emboldening the regular face. Until now the same file was registered as the bold face, so bold text came out without any emboldening
311
+ - **Results change: bold Japanese text in Mincho is typeset in the bold Mincho face (Noto Serif JP Bold)** (HTML and XSL-FO; with every compatibility setting and default style sheet): until now the default Mincho font had no bold face, so bold Japanese text (`<b>`, `<strong>`, headings, `font-weight: bold`, `font-weight="bold"` in XSL-FO) inside Mincho text (`serif`, or no font specified) was typeset in Gothic (Noto Sans JP Bold). The specifications ask for the bold face of the same font (CSS Fonts 4 §5.2, XSL 1.1 §7.9.9), so Noto Serif JP Bold is added to the default fonts and bold Mincho text stays in Mincho. Headings of documents that specify no font also change from Gothic to bold Mincho (to keep Gothic headings, specify the font, for example `h1, h2, h3 { font-family: sans-serif; }`). Latin text is in Tinos Bold as before. Kanji, kana and full-width punctuation have the same advances, so line breaks do not change (half-width symbols set in the Japanese font, such as dashes, the quotation marks “ ” ‘ ’ and Greek letters, differ slightly in width). Text set back to the normal weight inside bold text (`font-weight="normal"` in XSL-FO), which stayed in Gothic, also returns to Mincho. Bold Japanese text with a monospace family in XSL-FO (until now drawn by emboldening the Mincho face) is also set in Noto Serif JP Bold
312
+ - **The default fonts fetched on first run grow by about 8MB** (`NotoSerifJP-Bold.ttf`; the fonts loaded for every document go from about 21MB to about 29MB in total). `DEFAULT_FONTS.base` of the API, and the fonts passed to `loadFont`, gain one entry
313
+ - If you replace the default fonts with your own through `--font-dir` or `loadFont`, provide `NotoSerifJP-Bold.ttf` too (when it is missing, Noto Serif JP Bold comes from the cache or the network like any other default font). When replacing with a font that has no bold face (MS Mincho and the like), place the same file as `NotoSerifJP-Regular.ttf` under the name `NotoSerifJP-Bold.ttf`: bold text is then drawn by emboldening that Mincho font instead of switching to Gothic. The same holds for the web app (`public/fonts/`)
314
+ - **Italic faces and faces of different widths** (HTML and XSL-FO; `--font`, `fonts`, `@font-face`, and fonts passed along with an XSL-FO document): faces within a family are now matched by width (`font-stretch`), then slant (`font-style`), then weight, as in CSS Fonts 4 §5.2. **Typesetting results change** (for documents that are given italic faces or faces of different widths):
315
+ - An italic or oblique font file (for `@font-face`, a `font-style: italic` / `oblique` descriptor) is used for `font-style: italic` / `oblique` text. Until now italic faces were not loaded and the upright glyphs were slanted. The advances are now those of the italic face, so line breaks can change. A family without an italic face is still drawn by slanting the upright glyphs
316
+ - Fonts that share a family name and differ in width (such as Arial and Arial Narrow) can now be given together with `--font` / `fonts`. Until now the one given later replaced the other (with Arial Narrow given later, all text requesting Arial came out in Arial Narrow). Without a request the normal-width face is used; `font-stretch: condensed` and the like, or the name of that face alone (`font-family: "Arial Narrow"`), selects the face of the other width. Glyphs set in a face of another width are not scaled. The `font-stretch` descriptor of `@font-face` works the same way
317
+ - `--style ah`: an `@font-face` without a `font-style` descriptor that points to an italic font file is used as an italic face (by default it is an upright face, as in CSS Fonts 4 §4.4)
318
+ - In the result (Area Tree), `GlyphArea.fontFamily` of a glyph set in an italic face or a face of another width has a mark after the font name (`Arial{ital=1}`, `Arial{wdth=75}`)
319
+ - **`font-family` lists in XSL-FO**: when the list names two or more loaded fonts (such as `font-family="Times New Roman, MS Mincho"`), characters missing from the first font (Japanese characters, for example) are now typeset in the next font of the list (XSL 1.1 §7.9.2: each character is looked up through the list in order, the same as in HTML). **Typesetting results change**: until now such characters were typeset in the default font (Noto Serif JP and so on), not in the later fonts of the list
320
+ - **Images supplied through `resolveResource` (references with `%xx` in the name)**: image references whose names contain spaces, parentheses, Japanese and so on, such as `<img src="/a%20b.png">`, came out as "image not found" even when `resolveResource` returned the data (the function was asked with the URL as written, `%xx` included, while images were matched by the decoded name, so the two did not meet). Fixed; the same applies to CSS `url()` and XSL-FO `fo:external-graphic`. Images passed in `files`, and references to CSS files and fonts, already worked
321
+ - **The exception "Trying to access beyond buffer length" when drawing to a canvas (`renderPage`)**: a page with a no-break space (U+00A0, `&nbsp;`) set in the default Latin font (Arimo) with OpenType features applied (`font-feature-settings` and so on) threw and could not be drawn. Fixed. The cause was that fontkit reads the glyph header even for TrueType glyphs without an outline (spaces), so it read past the table when the last glyph of the font is a space (U+00A0 in Arimo). The bounding box of an outline-less glyph is now empty without reading glyf (which also corrects the bogus boxes other spaces got from the neighboring glyph). In addition, a run that cannot be turned into outlines is now drawn with `fillText`, so the rest of the page is still drawn
322
+ - **Warnings on the screen (Kumiori in the browser)**: warnings from reading the document are now listed one by one in the left column (before, only the layout warnings were shown, joined into one line; the others went to the console or were not shown). Added: unsupported CSS / XSL-FO and unknown CSS properties, links whose actions were not written to the PDF for safety, nesting deeper than 128 levels and too many `@import`s, EPUB items skipped for exceeding the limits, images not fetched, and font notices. Identical messages are merged, and four or more are collapsed to a count (the count also appears in the top bar)
323
+ - **"Default page size" in the screen settings**: choose the paper for HTML that does not specify `size` in `@page` from A4, A5, B5, JIS-B5, letter or free input (`A5 landscape`, `148mm 210mm`); the same as the CLI's `--page-size` and the API's `pageSize` (the default stays A4)
324
+ - **Position of SVG `text` when its first character is inside a `tspan`** (SVG images in HTML and XSL-FO): **results change.** In `<text x="…" y="…"><tspan>…</tspan></text>`, where the first character is inside a child `tspan`, the `x` and `y` of the `text` were ignored and the characters were placed at the origin (usually outside the picture). Fixed (SVG 1.1 §10.5: when the `tspan` has no value of its own, the ancestor’s value applies to that character). An empty `y=""` or `dy=""` on a `tspan` is read as not specified. Text that used to disappear now shows in documents that use such an SVG as a background (for example a watermark given as `background-image` on `fo:region-body` in XSL-FO) or as an image
325
+ - **XSL-FO: an `fo:flow` is flowed into the region that matches its `flow-name`** (XSL 1.1 §6.4.1.4): **results may change.** When an `fo:page-sequence` has several `fo:flow` elements, the first one used to be flowed into the body whatever its `flow-name`. Now the `fo:flow` whose name matches the body region (`fo:region-body`: its `region-name` if given, otherwise `xsl-region-body`) is flowed into the body. Documents with a single `fo:flow`, and documents whose first `fo:flow` matches the body region, are unchanged. An `fo:flow` whose name matches no region, or one without `flow-name`, is still flowed into the body, with a warning ("no region matches flow-name "…"; its content was flowed into the body region"; it used to be reported as the unread attribute flow-name)
326
+ - **XSL-FO: unprefixed attributes on `axf:form-field`** (`field-type`, `field-name`, `field-default-text`, `field-maxlen`, `field-multiline`, `field-checked`, `field-value`, `field-button-face`, `action-type`, and `field-submit-method` on `axf:form`, among others): **results change.** Attributes written without `axf:` on `axf:form` and `axf:form-field`, as in Antenna House’s examples and samples, were not read (every field became a "text" field with a generated name, and default values, options and button captions were lost). They are now read like the `axf:` names (`axf:field-type` etc.), whatever `--compat` is (the `axf:` name wins when both are present). Per-event actions (`axf:form-field-event`) and button `action-type` values other than `submit` and `reset` (`javascript`, `uri` etc.) are still not written to the PDF (no scripts are written); the warning now names them
327
+ - **XSL-FO: gradients in `background-image`** (`linear-gradient()`, `radial-gradient()`, `repeating-linear-gradient()`, `repeating-radial-gradient()`): in compatibility mode (`--compat antenna`, `compat: 'antenna'`) they are drawn as the same gradient backgrounds as in HTML (**results change in compatibility mode**: nothing was drawn before, and there was no warning). The values of `background-image` in XSL 1.1 §7.8.3 are `<uri-specification> | none`, so in specification mode they are not drawn and a warning reports them (`background-image:linear-gradient()`). The same applies to a gradient inside the `background` shorthand
328
+ - XSL-FO: `axf:background-size` (size of the background image: lengths, percentages, `auto`, `cover`, `contain`; first layer only) is read, whatever `--compat` is (**results change for documents that use this attribute**: it used to be reported as unread). `background-image`, `background-repeat` and `background-position` on `fo:simple-page-master` are read as the page background image in compatibility mode only (by the specification the background properties do not apply to `fo:simple-page-master`, so in specification mode they are still reported in the warning)
329
+ - XSL-FO: a `start-indent` written as a length on the `fo:list-item-body` of the second and later list items is read (XSL 1.1 §7.11.7). When it equals the value on the first item the result is unchanged and the warning "unread attribute start-indent (fo:list-item-body)" no longer appears. A value larger than the first item’s indents that body by the difference (**results change for documents written that way**: the body used to be placed at the first item’s position). A smaller value cannot be placed and is still reported in the warning
330
+ - **XSL-FO: the background color is now painted up to the padding rectangle** (XSL 1.1 §4.9.4; independent of `--compat`): **results (appearance) change.** The background color used to be painted up to the outer edge of the border (the border box), so it showed through the gaps of dashed, dotted and double borders and under borders with a transparent color. It is now painted up to the inner edge of the border (the padding rectangle), as the specification says. Only boxes that have both a background color and a border with gaps (dashed, dotted, dot-dash, double, wave) or a transparent color on the same element change (`fo:block`, `fo:block-container`, `fo:table`, `fo:table-cell`, region borders in compatibility mode, and so on). Boxes with opaque solid or 3D-style (`groove`, `ridge`, `inset`, `outset`) borders and boxes without borders are unchanged. With rounded corners (`axf:border-radius`) the background corners follow the inner curve of the border. The parts that overlap the outer border of a collapsed-border table are not changed yet (backgrounds of inline boxes, `fo:inline`, are also painted up to the padding rectangle, as described in a separate item above)
331
+ - **Content written after `</body></html>`** (HTML; the Node command and the API; **the result changes**): elements and text written after `</html>` (or `</body>`), as in `<html><body><p>a</p></body></html><p>b</p>`, were dropped. They are now laid out as a continuation of body, as browsers do (the "after body" and "after after body" insertion modes of the HTML Standard). Comments after the end, and whitespace at the end of the document, add nothing, as before
332
+ - **Positive left and right `margin` on inline boxes and line wrapping** (HTML; **the result changes**): the left and right `margin` of a `display: inline` box (`span` and so on) is no longer separated from the first and last characters of the box (CSS 2.1 §9.4.2, CSS Text 3 §5.5: a line is broken outside the margin edge of the box). Before, the end `margin` could be left at the start of the next line, shifting the first character to the right (setting `一二三四<span style="margin-right: 30pt">五</span>六七` five characters wide shifted 六 by 30pt), the start `margin` could be left at the end of the previous line, an empty line was added at the end of a paragraph, and a full stop could come to the start of a line. Now, when the `margin` does not fit on the line, the character moves to the next line with it (as in browsers). An inline box with `box-decoration-break: clone` also gets its left and right `margin` on each fragment (CSS Fragmentation 3 §5.4). Only with the AH Formatter compatible style (`--style ah`), a start `margin` that comes to the start of a wrapped line is dropped (as in the reference output). Inline boxes without `margin`, negative `margin`, and `space-start` / `space-end` in XSL-FO are unchanged
333
+ - **Heading of the conversion report on the screen**: the report said "XSL-FO 変換レポート" (XSL-FO conversion report) even for HTML documents (EPUB included); the heading now follows the kind of document ("HTML 変換レポート" for HTML; the hint for images not found and the line shown when nothing is unsupported also follow the kind of document)
334
+ - **`@font-face` fonts of a previously opened document staying on the screen (Kumiori in the browser)**: when HTML documents that use the same `font-family` name for different font files were opened one after another, the later document was set in the font of the earlier one (and a bold face that only the earlier document had could be used for bold text in the later one). Each time a document is opened, its `@font-face` files are now registered again and faces that only the previous document had are removed (including the fonts registered with the browser). Re-laying out the same document after changing a setting does not reload the fonts. The Node command and the API already keep fonts separate per document and are unchanged
335
+ - **Kerning in content-size estimates (max-content, min-content)** (HTML): content widths such as those of flex items (children of `display: flex`) were estimated without kerning, so runs that kerning widens (such as "2.2" in some fonts) did not fit the item's width and split into "2." and "2" with `overflow-wrap: break-word`. The estimate now adds the same kerning to the same character pairs as line layout does (following `font-kerning` and the "kern" setting of `font-feature-settings`). **Results change** (boxes sized by their content, with kerned Latin text, get slightly different widths)
336
+ - **XSL-FO: `background-color` on `fo:simple-page-master` is read only in compatibility mode (`--compat antenna`)**: the background properties do not apply to `fo:simple-page-master` (XSL 1.1 §6.4.13), so in specification mode (the default) it is not read and the load warnings report it. **Results change for documents typeset in specification mode** (a background color written on the page master no longer appears). `axf:background-color`, whose name carries the prefix, is read in every mode
337
+ - **PDF: the original text (ActualText) attached to words in right-to-left scripts (Arabic, Hebrew) is now written in reading order** (ISO 32000-2 §14.9.4: replacement text is the characters equivalent to what a person sees). It used to be written in drawing order (left to right). **Text extracted from the PDF changes**: in the Chrome and Edge viewers (PDFium) the characters of each word now come out in reading order (they were reversed); poppler's pdftotext and MuPDF also reorder ActualText characters, so their words now come out reversed (they used to be in reading order). The appearance does not change
338
+
7
339
  ## 0.1.1 (2026-11-09)
8
340
 
9
341
  A release that completes the notices for third-party software and documents. Typesetting behaviour and the API are the same as in 0.1.0.
@@ -25,5 +357,5 @@ The first public release.
25
357
  - **Pages**: page masters, running heads and page numbers (folios), footnotes, multi-column layout, floats, tables (splitting, repeated headers, automatic column width), page number references, bookmarks, links, annotations, forms
26
358
  - **Output**: Canvas preview, PDF (subset font embedding, trim marks, PDF/X-3 marking)
27
359
  - **Other scripts**: right-to-left scripts such as Arabic and Hebrew (UAX #9, joined forms of Arabic letters), Latin hyphenation
28
- - **Usage**: the browser web app, the Node CLI `kumiori` (`--help`, `--version`, `--lang ja|en` and `KUMIORI_LANG` for English messages, a cache for the default fonts, warnings for unsupported CSS and XSL-FO), the library (`kumiori`: ES module; `kumiori/browser`: a single file for browsers with the dependencies bundled)
360
+ - **Usage**: the browser web app, the Node CLI `kumiori` (`--help`, `--version`, `--lang ja|en` and `KUMIORI_LANG` for English messages, a cache for the default fonts, warnings for unsupported CSS and XSL-FO), the library (`kumiori`: ES module; `kumiori/browser`: a single file for browsers with the dependencies bundled; the `lang` option for English warnings)
29
361
  - **Documentation**: the Conformance Guide (HTML and CSS volume, XSL-FO volume; Japanese and English editions), the Area Tree JSON specification, and English versions of the README and docs (README.en.md, docs/en/)