Skip to content

v0.1.15 — DirectWrite text backend + three-layer cache + ADR-006 progress

Choose a tag to compare

@github-actions github-actions released this 16 Jul 13:46
· 171 commits to master since this release

WhatsCanvas v0.1.15

Version bump 0.1.14 → 0.1.15 documenting the 17 PRs (#27#46) merged since 0.1.14.

Highlights

Text rendering

  • DirectWrite text backend (Windows): first-class native adapter selectable via TextBackendKind::DirectWrite. Covers measurement, real line breaking via IDWriteTextLayout, weight / slant / spacing / locale styling, custom in-memory font registration and fallback chains, underline / strikethrough decorations, and grayscale + ClearType raster modes. resolveFontFamilies now matches the portable backend.
  • Per-Paint TextRenderMode (Auto / Grayscale / ClearType): explicit per-draw opt-in for ClearType when the surface is known to be opaque and axis-aligned.
  • Cross-backend text decoration parity: underline and strikethrough now render consistently on the portable, DirectWrite, and software backends; a regression test pixel-compares all three.
  • Text sharpness / HiDPI: text rasterizes at effective device pixel size under a scaled transform or Canvas::setDevicePixelRatio, and glyph quads snap to the pixel grid on axis-aligned draws.

Performance

  • DirectWrite three-layer cache: repeat UI text draws pay only the scissor + quad-submit cost per frame.
    1. COM apartment + WIC/D2D factories cached process-wide.
    2. Rasterized bitmap + intrinsic metrics cached in an LRU (4 MB byte budget by default) keyed by (text, paint, dpr, render-mode).
    3. Canvas keeps a 256-entry LRU of GPU textures keyed by the backend-provided content id, so identical text skips the CPU→GPU upload entirely.

Rendering

  • Default anti-aliasing: Paint now defaults to AA strokes and fills; opt out with Paint::setAntiAlias(false).
  • OpenGL ClipFill primitive support in executeDrawList: a new DrawClipFillProgram mirrors Vulkan's clip pipeline (mask.r × tint color) — closes an ADR-006 parity gap.
  • Shared encoder resilience: CommandDrawListEncoder no longer aborts the whole encode on a clipped point/line/vector-text command; it warns and continues so the rest of the offscreen replay still produces output.

Fixes

  • MSVC on non-English Windows: CMakeLists.txt now passes /utf-8 to MSVC so UTF-8 source files decode consistently under the active ANSI code page.

Compatibility

  • Public API: fully backwards compatible with 0.1.14. TextRenderMode is a new opt-in enum with Auto default.
  • CMake: find_package(WhatsCanvas 0.1.15 CONFIG REQUIRED).

Validation

  • Full ctest suite (39/39) green on Windows Debug throughout the release.
  • Cross-Platform Validation matrix all SUCCESS: Windows / Linux / macOS unit, OpenGLES smoke, package-consumer, cmake-release, optional-font-stack, api-reference, Vulkan.
  • Release preflight (WhatsCanvasVersionConsistencyCheck, WhatsCanvasApiReferenceCheck, WhatsCanvasPackageConsumerSmoke): 3/3 PASS.

Documentation

  • Refreshed doc/DIRECTWRITE_DESIGN_REVIEW.md with a status table mapping each of the five original review issues to the PR(s) that closed it.
  • doc/DIRECTWRITE_TEXT_BACKEND.md known-limitations section rewritten around the three-layer cache.
  • ADR-006 gained a Progress Log section (PR #42 / PR #44).
  • doc/DIRECT3D_DESIGN_REVIEW.md added under version control.

See CHANGELOG.md for the full entry.