packages feed

ktx-font-0.2.0.0: CHANGELOG.md

# Changelog for `ktx-font`

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to the
[Haskell Package Versioning Policy](https://pvp.haskell.org/).

## 0.2.0.0 - 2026-09-02

- Requires `kb-text-layout >= 0.1.2.0`, whose emergency breaks stop inside
  shaping clusters, so a ligature is never split across lines by `placeText`.
- Migrated to `kb-text-shape >= 0.2.1.0`. The bundled kbts blobs changed
  format, so the `.ktxf` assets have to be rebuilt.
- Added the `Codec.Ktx2.Font.Layout` module: multiline layout on top of
  `kb-text-layout` with wrapping (greedy or optimal), alignment, and
  measurement helpers, all in the same cap-height units as the glyph planes.
  * `shapeText` does all the font work once, and the pure `placeText` breaks
    and places the result for any width, so resizes don't touch the fonts.
  * `layoutTextWith` is the two chained together.
- Added `Shaping.shapeClusters`: shaping along a single pen that keeps the
  codepoint index and advance of every glyph. `unsafeShapeClusters` is the same
  for callers already holding the locked context.
- `StackContext` gained a `layout` field with the measurement caches.
- The demo now lays out with wrapping: Left/Right adjust the wrap width,
  F1 toggles the break strategy.
- Fixed `Cursor.ySign` being applied to the glyph positioning offsets as well as
  to the line advance. The glyph planes and the offsets are both Y-up, so only
  the line advance follows the sign. `initialCursorDown` now really does advance
  the lines downwards, and stacked marks land on the correct side of the glyph.
- Fixed the swapped `PlacedGlyph.glyph` / `PlacedGlyph.plane` haddocks. `glyph`
  is the atlas box, `plane` is the screen box.
- `shape` now reads the font metrics while the fonts are known to be alive
  instead of leaving the lookup to the caller's laziness.
- `bundleFont` now fails on em-sized layouts from fonts without a cap height
  instead of writing infinities into the atlas planes.
- Added the `ktx-font-demo` executable (behind the `executables` flag), an
  interactive Brillo viewer for the bundles built from `assets.yaml`.

## 0.1.0.1 - 2026-03-18

- Make plane rescaling depend on `layout.atlas.sizeUnit`.
  * 1.0 if already caps-sized, unitsPerEm/capHeight otherwise.

## 0.1.0.0 - 2025-12-30

Initial release.