Skip to content

v0.22.0 — preview matches export

Latest

Choose a tag to compare

@SteliyanH SteliyanH released this 17 Nov 16:30
d76453f

OverlayHost now previews overlays where, and at the size, kadr's export draws them. Requires kadr 1.2.0 (Xcode 26).

Fixed

  • Text size. TextStyle.fontSize is in render pixels, but the preview drew it in screen points. In a phone-sized preview of a 1080p video, text was about three times too big for its box and was cut down to "…". Text is now laid out at the composition's size and scaled to the host, so font size, line wrapping and slide-in distances match the export.
  • Default box. An overlay without .size was previewed in a 30% × 30% box. It now gets the box the export gives it: text hugs its text (TextOverlay.naturalSize(in:), new in kadr 1.2), and an image or sticker takes its pixel size.
  • Explicit box. Text in a box taller than the text sits at the top, as the export draws it, instead of centred.
  • Animated text font. Text with a TextAnimation was drawn in Helvetica, and .medium as regular. It now uses the system font at the style's weight.
  • Animated text opacity. Its opacity was applied twice, so .opacity(0.5) previewed at 0.25.

Behaviour note

An image or sticker overlay without .size now previews at its full pixel size. That is what the export has always drawn; the old 30% box hid it. If your app adds photos without a size, give them one.

Changed

  • Requires kadr 1.2.0, and so Xcode 26 (Swift 6.2). The manifest declares swift-tools-version: 6.2.

Full changelog: v0.21.0...v0.22.0