fixing textarea issues with newlines #105 #68

This commit is contained in:
andreas schlegel 2018-09-22 23:05:22 +08:00
parent cc775e7e31
commit 02b34a6fa6

View File

@ -198,7 +198,8 @@ public class ControlFont {
myString = w + " "; myString = w + " ";
} }
} }
txt.add( myString.substring( 0 , myString.length( ) - 1 ) ); //txt.add( myString.substring( 0 , myString.length( ) - 1 ) );
txt.add( myString.substring( 0 , PApplet.max( 0 , myString.length( ) - 1 ) ) );
myString = ""; myString = "";
} }
if ( theLabel.getHeight( ) % theLabel.getLineHeight( ) != 0 ) { if ( theLabel.getHeight( ) % theLabel.getLineHeight( ) != 0 ) {
@ -289,4 +290,3 @@ public class ControlFont {
// textorize, a Ruby-based font rasterizer command line utility for Mac OS X // textorize, a Ruby-based font rasterizer command line utility for Mac OS X
// http://textorize.org/ // http://textorize.org/