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 (kerning(_:) | Apple Developer Documentation) 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?



Maybe just add a space to the end of all your textes ? Could have side effects though.

This is not related to the Swift langue per se but to Apple privates SDKs which means your question should be posted on Apple developer forums.

Thank you, Alexis! Adding spaces, dots or anything at the end does not change the cropping.