Avoid cropping Text when kerning/tracking with negative values

Hi Everybody,

Using kerning or tracking on Text with negative values reduces the space between characters. Unfortunately, this also effects the trailing end of the text, which is then cropped.

This is the expected behaviour according to Apple's documentation (https://developer.apple.com/documentation/swiftui/text/kerning(_:)) but not really what is intended (by me, at least) and looks rather weird (see example in the docs where 'raffle' is cropped).

How to use kerning/tracking with negative values without cropping trailing characters? Any easy fix for that?

Thanks!

Avoid cropping Text when kerning/tracking with negative values
 
 
Q