Hello, while using meander 0.4.1 as the package, I’ve had issues with changing font families in level: 2 and level: 3 headings. I use Merriweather Sans as a heading font; after replacing the font with, e.g., Open Sans, the package immediately throws an error:
error: array index out of bounds (index: 2, len: 1)
┌─ @preview/meander:0.4.1/src/bisect.typ:246:27
│
246 │ if fits-inside(rebuild(inner.slice(0, i + 1).join(" ")) + atom) {
│ ^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this call of function `has-text`
┌─ @preview/meander:0.4.1/src/bisect.typ:630:4
│
630 │ has-text(ct, dispatch, fits-inside, cfg)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this call of function `dispatch`
┌─ @preview/meander:0.4.1/src/bisect.typ:451:22
│
451 │ let (left, right) = split-dispatch(hanging, ct => fits-inside(rebuild((..inner.slice(0, i), ct))), cfg)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this call of function `has-children`
┌─ @preview/meander:0.4.1/src/bisect.typ:636:4
│
636 │ has-children(ct, dispatch, fits-inside, cfg)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this call of function `dispatch`
┌─ @preview/meander:0.4.1/src/bisect.typ:713:2
│
713 │ dispatch([#ct], ct => fits-inside(dims, ct, size: size), cfg)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this call of function `fill-box`
┌─ @preview/meander:0.4.1/src/threading.typ:113:27
│
113 │ let (fits, overflow) = bisect.fill-box(max-dims, size: size, cfg: body.style, [#current-fill] + [#body.data])
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this call of function `smart-fill-boxes`
┌─ @preview/meander:0.4.1/src/layouts.typ:49:31
│
49 │ let (full, overflow) = threading.smart-fill-boxes(
│ ╭────────────────────────────────^
50 │ │ size: size,
51 │ │ avoid: data.obstacles,
52 │ │ boxes: elem.contour,
53 │ │ flow,
54 │ │ )
│ ╰─────────^
help: error occurred in this call of function `fill-page`
┌─ @preview/meander:0.4.1/src/layouts.typ:108:40
│
108 │ let (content, overflow, vspace) = fill-page(elems, flow, size: size, page-offset: page-offset)
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: error occurred in this function call
┌─ @preview/meander:0.4.1/src/tiling.typ:401:21
│
401 │ layout(size => inner(size))
│ ^^^^^^^^^^^
Is it a font issue, or Meander has a page limit to be supported? When I compile the document with one chapter instead of the whole content, the issue does not appear. The document counts 260 pages as for now.