Module resilient.utils

Common utilities for re·sil·ient.

Info:

  • Copyright: (c) 2023-2025 Omikhleia / Didier Willis
  • License: MIT

Functions

interwordSpace () Measure an inter-word space (which, depending on settings, might be variable and thus have stretch/shrink).
castKern (kern) Cast a kern length (e.g., as found in styles), also supporting the special "iwsp" pseudo-unit for interword space.
recursiveTableMerge (t1, t2) Merge two tables.


Functions

interwordSpace ()
Measure an inter-word space (which, depending on settings, might be variable and thus have stretch/shrink).

Returns:

    SILE.types.length interwordSpace
castKern (kern)
Cast a kern length (e.g., as found in styles), also supporting the special "iwsp" pseudo-unit for interword space.

Parameters:

  • kern string or SILE.types.length The kern value to cast

Returns:

    SILE.types.length The kern value as a length
recursiveTableMerge (t1, t2)
Merge two tables. It turns out that pl.tablex.union() does not recurse into the table, so let's do it the proper way. N.B. modifies t1 (and t2 wins on "leaves" existing in both tables)

Parameters:

  • t1 table The first table
  • t2 table The second table

Returns:

    table The merged table
generated by LDoc 1.5.0 Last updated 2025-09-14 22:28:52