icu_tool

v0.4.0 - 2026-07-13

0.4.0 Jul 13 2026 at 03:52 UTC

๐Ÿ”– Version Tag

  • ๐Ÿš€ New Features:
    • โœจ SVG gradient import/export โ€” usvg::Paint::LinearGradient / RadialGradient convert to mirx::Paint::LinearGradient / RadialGradient with stops, spread mode, gradient units, transform. SVG export emits <linearGradient> / <radialGradient> defs + url(#gradN) fill references. Pattern paints still dropped (no mirx Pattern variant).
    • โœจ SVG clipPath import/export โ€” <clipPath> elements convert to SceneOp::PushClip / PopClip with ResourceRef::Inline(Path). SVG export emits clip-path="url(#clipN)" attributes.
    • โœจ SVG filter wire โ€” <filter> primitives (feGaussianBlur, feColorMatrix) encode into GroupBegin.filter as a semicolon-separated ResourceRef::Token string (blur:<sx>:<sy> / cm:<matrix|saturate|hueRotate|luminance>). SVG export emits filter="url(#filterN)".
    • โœจ SVG <text> import โ€” usvg text feature enabled; <text> / <tspan> flatten to glyph outline paths via usvg::Tree::flattened(). Font size / family / weight resolved by usvg.
    • โœจ SVG <image> import โ€” <image href="..."> embeds raster data as a placeholder rect (usvg doesn't expose pixel data to the tree walker).
    • โœจ stroke-dasharray import/export โ€” usvg::Stroke::dasharray() maps to StrokePath.dash (Cow); SVG export emits stroke-dasharray="a,b,c" when dash is non-empty.
    • โœจ NonZero fill-rule โ€” usvg::FillRule::NonZero passes through to SceneOp::FillPath { fill_rule: NonZero } instead of being coerced to EvenOdd.
    • โœจ Font viewer glyph grid โ€” per-glyph thumbnail grid mode; click a glyph to inspect its outline path. Glyph diff mode overlays two atlases from different fonts.
    • โœจ Indexed image export โ€” save edited indexed data (palette + per-pixel indexes) back to PNG (palette-encoded) or LVGL binary (I1/I2/I4/I8). Dither slider + palette edit panel + merge panel for multi-font bundles.
    • โœจ Path viewer op inspector โ€” right panel shows selected SceneOp's fields (path cmds, paint, transform, fill_rule, stroke params).
    • โœจ Multi-font bundle โ€” FontData::MirxBundle variant + bundle selector in font viewer; icu merge-fonts CLI merges single-font .mirx files.
    • โœจ Theme-aware font rendering โ€” atlas tinted by theme fg color on bg, not raw grayscale; cache tint per theme, only re-render on theme switch.
    • โœจ woff2 font decode โ€” can_decode detects woff2 magic; font info panel decompresses woff to ttf for metadata.
  • ๐Ÿ”ง Improvements:
    • ๐Ÿงน Atlas render via SwRenderer draw_label โ€” proper SDF sampling instead of raw byte threshold; ARGB8888 output uses AlphaMode::Blend with RGB forced to fg color for clean alpha edges.
    • ๐Ÿงน mirui dependency bumped to v0.42.0 (crates.io) โ€” Paint enum replaces Color in FillPath/StrokePath; stops/dash fields move Vec โ†’ Cow<'static, [...]> for const construction. ICU wraps runtime-built stops/dash in Cow::Owned.
  • ๐Ÿ› Bug Fixes:
    • ๐Ÿ› Font atlas black edges fixed โ€” SDF threshold-to-alpha conversion tints by coverage instead of hard threshold.
    • ๐Ÿ› Indexed hover stuck on theme switch โ€” cache invalidated on theme change.
    • ๐Ÿ› Path highlight + diff conflict on simultaneous selection resolved.

๐Ÿ“ฆ Dependencies

  • mirui 0.41 โ†’ 0.42.0 (Paint enum, gradient/clip/blur, StrokePath cap/join/dash)