Ideal method to truncate a string with ellipsis
I like the idea of letting “thin” characters count as half a character. Simple and a good approximation. The main issue with most ellipsizings however, are (imho) that they chop of words in the middle. Here is a solution taking word-boundaries into account (but does not dive into pixel-math and the Swing-API). private final static … Read more