Purpose:
Tries to reduce a text string to a target length (measured in pixels, not letters) by removing letters. Starting at the end of the string, vowels are removed until the target length has been reached. If the string is still too long after all the vowels have been removed, the process repeats, removing consonants. The process stops when either the target has been achieved or all the letters have been removed.
If consonants must be removed, the returned string will have ellipses (…) appended to it. The number of letters that must be removed to achieve a target length will vary depending on the screen font in use.
Parameters:
TextIn The original text
GoalWidth Target string length (in screen pixels) or invalid to disable. Varying results will be achieved depending on the size of the font currently in use by the device.