Index: trunk/src/org/expeditee/assets/resources-public/framesets/authentication/1.exp
===================================================================
--- trunk/src/org/expeditee/assets/resources-public/framesets/authentication/1.exp	(revision 1368)
+++ trunk/src/org/expeditee/assets/resources-public/framesets/authentication/1.exp	(revision 1369)
@@ -1,8 +1,8 @@
-V 826
+V 828
 p 40
 U authadmin
 D 23Nov2018[12:31]
-M authadmin
-d 23May2019[10:29]
+M nobody
+d 23May2019[12:15]
 B 100 100 39 100
 Z
@@ -546,13 +546,57 @@
 Z
 
-ActiveTime:18992043:12:17
-DarkTime:-18982463:-8:-10
-29:18:317 516 406 Ld
-29:18:605 516 406 Rd
-29:18:866 516 406 Ru
-29:18:882 516 406 Lu
-29:21:389 737 384 Rd
-29:21:404 737 384 Md
-29:21:562 737 384 Ru
-29:21:578 737 384 Mu
-29:21:826 828 455 kRIGHT_ARROW
+ActiveTime:19857915:43:23
+DarkTime:-19848023:-39:-16
+15:44:927 669 287 kBACKSPACE
+15:45:427 655 287 kBACKSPACE
+15:45:460 641 287 kBACKSPACE
+15:45:493 627 287 kBACKSPACE
+15:45:526 613 287 kBACKSPACE
+15:45:559 599 287 kBACKSPACE
+15:45:592 585 287 kBACKSPACE
+15:45:624 571 287 kBACKSPACE
+15:45:658 557 287 kBACKSPACE
+15:45:691 543 287 kBACKSPACE
+15:45:724 529 287 kBACKSPACE
+15:45:757 515 287 kBACKSPACE
+15:45:791 501 287 kBACKSPACE
+15:45:825 487 287 kBACKSPACE
+15:45:867 473 287 kBACKSPACE
+15:45:894 459 287 kBACKSPACE
+15:46:135 445 287 kBACKSPACE
+15:46:313 431 287 kBACKSPACE
+15:46:489 417 287 kBACKSPACE
+15:49:442 762 228 kSHIFT
+15:49:609 762 228 kT
+15:50:288 773 228 kO
+15:50:489 782 228 kG
+15:50:626 791 228 kG
+15:50:708 799 228 kL
+15:50:799 804 228 kE
+15:50:985 813 228 kSHIFT
+15:51:040 813 228 kA
+15:51:181 826 228 kU
+15:51:328 835 228 kT
+15:51:408 840 228 kH
+15:51:688 849 228 kCTRL
+15:51:912 849 228 kA
+15:53:555 801 220 Ld
+15:53:719 801 220 Lu
+15:55:337 797 218 Md
+15:55:400 797 218 Rd
+15:55:494 797 218 Ru
+15:55:527 797 218 Mu
+15:57:033 721 219 kSHIFT
+15:57:111 721 219 kM
+15:57:329 737 219 kA
+15:57:569 745 219 kX
+15:57:760 754 219 kSHIFT
+15:57:977 754 219 kW
+15:58:304 771 219 kI
+15:58:403 776 219 kD
+15:58:601 785 219 kT
+15:58:671 790 219 kH
+15:58:809 798 219 kSHIFT
+16:02:263 789 216 Md
+16:02:383 789 216 Mu
+16:03:697 790 222 kRIGHT_ARROW
Index: trunk/src/org/expeditee/assets/resources-public/framesets/authentication/2.exp
===================================================================
--- trunk/src/org/expeditee/assets/resources-public/framesets/authentication/2.exp	(revision 1368)
+++ trunk/src/org/expeditee/assets/resources-public/framesets/authentication/2.exp	(revision 1369)
@@ -1,8 +1,8 @@
-V 288
+V 292
 p 40
 U authadmin
 D 07Dec2018[12:19]
 M authadmin
-d 23May2019[10:23]
+d 23May2019[12:16]
 B 100 100 39 100
 Z
@@ -127,4 +127,5 @@
 p 44
 _ph Password
+_maxW 300
 
 S T 130
@@ -150,4 +151,5 @@
 p 44
 _ph Password Again
+_maxW 300
 
 S T 672
@@ -172,4 +174,5 @@
 p 44
 _ph Email Again
+_maxW 300
 
 S T 671
@@ -194,4 +197,5 @@
 p 44
 _ph Email
+_maxW 300
 
 S T 190
@@ -496,13 +500,39 @@
 Z
 
-ActiveTime:01:20:28
+ActiveTime:01:21:37
 DarkTime:01:32:58
-23:46:958 183 338 Ld
-23:47:092 183 338 Rd
-23:47:242 183 338 Ru
-23:47:250 183 338 Lu
-23:48:621 136 388 Md
-23:48:706 136 388 Rd
-23:48:818 136 388 Ru
-23:48:841 136 388 Mu
-23:49:603 110 475 kRIGHT_ARROW
+16:45:082 190 331 Ld
+16:45:153 190 331 Rd
+16:45:287 190 331 Ru
+16:45:295 190 331 Lu
+16:46:234 73 272 Md
+16:46:298 73 272 Rd
+16:46:399 73 272 Ru
+16:46:431 73 272 Mu
+16:47:249 612 348 kCTRL
+16:47:401 612 348 kS
+16:48:151 591 338 Ld
+16:48:217 591 338 Rd
+16:48:327 591 338 Lu
+16:48:335 591 338 Ru
+16:48:858 640 279 Md
+16:48:919 640 279 Rd
+16:49:119 640 279 Ru
+16:49:143 640 279 Mu
+16:49:810 571 391 Ld
+16:49:881 571 391 Rd
+16:49:991 571 391 Lu
+16:49:992 571 391 Ru
+16:50:649 605 290 Md
+16:50:689 605 290 Rd
+16:50:823 605 290 Ru
+16:50:847 605 290 Mu
+16:51:728 180 393 Ld
+16:51:775 180 393 Rd
+16:51:879 180 393 Lu
+16:51:887 180 393 Ru
+16:52:448 108 280 Md
+16:52:495 108 280 Rd
+16:52:623 108 280 Ru
+16:52:639 108 280 Mu
+16:53:456 108 280 kLEFT_ARROW
Index: trunk/src/org/expeditee/assets/resources-public/framesets/authentication/3.exp
===================================================================
--- trunk/src/org/expeditee/assets/resources-public/framesets/authentication/3.exp	(revision 1368)
+++ trunk/src/org/expeditee/assets/resources-public/framesets/authentication/3.exp	(revision 1369)
@@ -1,8 +1,8 @@
-V 94
+V 98
 p 40
 U authadmin
 D 07Jan2019[14:34]
-M nobody
-d 23May2019[10:36]
+M authadmin
+d 23May2019[12:16]
 B 100 100 39 100
 Z
@@ -123,4 +123,5 @@
 p 44
 _ph New Password
+_maxW 300
 
 S T 81
@@ -144,4 +145,5 @@
 p 44
 _ph New Password Again
+_maxW 300
 
 S T 45
@@ -286,7 +288,15 @@
 Z
 
-ActiveTime:00:16:10
+ActiveTime:00:16:15
 DarkTime:00:20:25
-37:16:179 496 492 Rd
-37:16:341 496 492 Ru
-37:17:121 496 492 kRIGHT_ARROW
+16:39:689 115 222 kCTRL
+16:40:095 115 222 kS
+16:41:371 537 319 Ld
+16:41:464 537 319 Rd
+16:41:631 537 319 Ru
+16:41:647 537 319 Lu
+16:42:602 121 249 Md
+16:42:681 121 249 Rd
+16:42:775 121 249 Ru
+16:42:823 121 249 Mu
+16:43:865 20 240 kLEFT_ARROW
Index: trunk/src/org/expeditee/assets/resources-public/framesets/authentication/4.exp
===================================================================
--- trunk/src/org/expeditee/assets/resources-public/framesets/authentication/4.exp	(revision 1368)
+++ trunk/src/org/expeditee/assets/resources-public/framesets/authentication/4.exp	(revision 1369)
@@ -1,8 +1,8 @@
-V 218
+V 222
 p 40
 U authadmin
 D 07Jan2019[14:34]
-M nobody
-d 23May2019[10:37]
+M authadmin
+d 23May2019[12:16]
 B 100 100 39 100
 Z
@@ -83,4 +83,5 @@
 p 44
 _ph Username
+_maxW 300
 
 S T 333
@@ -142,4 +143,5 @@
 p 44
 _ph Identity Number
+_maxW 300
 
 S T 515
@@ -207,4 +209,5 @@
 p 44
 _ph Password Piece Two
+_maxW 300
 
 S T 603
@@ -227,4 +230,5 @@
 p 44
 _ph Password Piece One
+_maxW 300
 
 S T 417
@@ -248,4 +252,5 @@
 p 44
 _ph New Password Again
+_maxW 300
 
 S T 418
@@ -269,4 +274,5 @@
 p 44
 _ph New Password
+_maxW 300
 
 S T 503
@@ -561,9 +567,15 @@
 Z
 
-ActiveTime:01:36:47
+ActiveTime:01:37:02
 DarkTime:02:33:57
-38:34:241 956 28 Ld
-38:34:327 956 28 Rd
-38:34:437 956 28 Ru
-38:34:445 956 28 Lu
-38:36:496 846 150 kRIGHT_ARROW
+16:31:593 895 405 kCTRL
+16:31:978 895 405 kS
+16:34:563 219 335 Ld
+16:34:657 219 335 Rd
+16:34:783 219 335 Ru
+16:34:799 219 335 Lu
+16:37:970 115 222 Md
+16:38:071 115 222 Rd
+16:38:231 115 222 Ru
+16:38:255 115 222 Mu
+16:39:199 115 222 kLEFT_ARROW
Index: trunk/src/org/expeditee/gui/AttributeUtils.java
===================================================================
--- trunk/src/org/expeditee/gui/AttributeUtils.java	(revision 1368)
+++ trunk/src/org/expeditee/gui/AttributeUtils.java	(revision 1369)
@@ -289,4 +289,6 @@
 			_Attrib.put("MinWidth", 			Item.class.getMethod("getMinWidthToSave"), 
 												Item.class.getMethod("setMinWidth", pIntO));
+			_Attrib.put("MaxWidth", 			Item.class.getMethod("getMaxWidthToSave"), 
+												Item.class.getMethod("setMaxWidth", pIntO));
 			_Attrib.put("X",                    null,
 			                                    Item.class.getMethod("setX", pFloat));
Index: trunk/src/org/expeditee/io/DefaultFrameReader.java
===================================================================
--- trunk/src/org/expeditee/io/DefaultFrameReader.java	(revision 1368)
+++ trunk/src/org/expeditee/io/DefaultFrameReader.java	(revision 1369)
@@ -178,4 +178,5 @@
 			
 			_ItemTagsExt.put("_ph", Text.class.getMethod("setPlaceholder", pString));
+			_ItemTagsExt.put("_maxW", Text.class.getMethod("setMaxWidth", pIntO));
 		} catch (Exception e) {
 			e.printStackTrace();
Index: trunk/src/org/expeditee/io/DefaultFrameWriter.java
===================================================================
--- trunk/src/org/expeditee/io/DefaultFrameWriter.java	(revision 1368)
+++ trunk/src/org/expeditee/io/DefaultFrameWriter.java	(revision 1369)
@@ -153,6 +153,6 @@
 			_ItemTags.put('/', Item.class.getMethod("getMagnetizedItemBottom"));
 			
-			//_ItemTags.put('=', Text.class.getMethod("getPlaceholder"));
 			_ItemTagsExt.put("_ph", Text.class.getMethod("getPlaceholder"));
+			_ItemTagsExt.put("_maxW", Text.class.getMethod("getMaxWidthToSave"));
 		} catch (Exception e) {
 			e.printStackTrace();
Index: trunk/src/org/expeditee/items/Item.java
===================================================================
--- trunk/src/org/expeditee/items/Item.java	(revision 1368)
+++ trunk/src/org/expeditee/items/Item.java	(revision 1369)
@@ -1170,4 +1170,8 @@
 		return getMinWidth();
 	}
+	
+	public Integer getMaxWidthToSave() {
+		return getMaxWidth();
+	}
 
 	public Integer getWidth()
@@ -1177,4 +1181,8 @@
 	
 	public Integer getMinWidth() {
+		return null;
+	}
+	
+	public Integer getMaxWidth() {
 		return null;
 	}
@@ -2296,4 +2304,8 @@
 		throw new UnsupportedOperationException("Item type does not support minwidth attribute.");
 	}
+	
+	public void setMaxWidth(Integer width) throws UnsupportedOperationException {
+		throw new UnsupportedOperationException("Item type does not support maxwidth attribute");
+	}
 
 	public void setRightMargin(int i, boolean fixWidth)
Index: trunk/src/org/expeditee/items/Text.java
===================================================================
--- trunk/src/org/expeditee/items/Text.java	(revision 1368)
+++ trunk/src/org/expeditee/items/Text.java	(revision 1369)
@@ -136,7 +136,9 @@
 	 * the user. Initially set to be as wide as possible.
 	 */
+	private Integer _width = -Integer.MAX_VALUE;
+
+	private Integer _minWidth = -Integer.MAX_VALUE;
+	
 	private Integer _maxWidth = -Integer.MAX_VALUE;
-
-	private Integer _minWidth = -Integer.MAX_VALUE;
 
 	private Justification _justification = Justification.left;
@@ -186,4 +188,6 @@
 	// The font to display this text in
 	private Font _font;
+	private Font _substituteFont;
+	private boolean _useSubstituteFont = false;
 
 	// The optional mask character to us in place of the text's content.
@@ -395,5 +399,5 @@
 		}
 
-		_maxWidth = width;
+		_width = width;
 		rebuild(true);
 		invalidateAll();
@@ -414,4 +418,19 @@
 		invalidateAll();
 	}
+	
+	public void setMaxWidth(Integer width) {
+		invalidateAll();
+
+		if (width == null) {
+			setJustification(Justification.left);
+			setRightMargin(DisplayController.getFramePaintAreaWidth(), false);
+			return;
+		}
+		
+		_maxWidth = width;
+		rebuild(true);
+		invalidateAll();
+	}
+	
 
 	/**
@@ -428,17 +447,17 @@
 	@Override
 	public Integer getWidth() {
-		if (_maxWidth == null || _maxWidth <= 0) {
+		if (_width == null || _width <= 0) {
 			return null;
 		}
 
-		return _maxWidth;
+		return _width;
 	}
 
 	public Integer getAbsoluteWidth() {
-		if (_maxWidth == null) {
+		if (_width == null) {
 			return Integer.MAX_VALUE;
 		}
 
-		return Math.abs(_maxWidth);
+		return Math.abs(_width);
 	}
 
@@ -449,4 +468,11 @@
 		return _minWidth;
 	}
+	
+	public Integer getMaxWidth() {
+		if (_maxWidth == null || _maxWidth <= 0) {
+			return null;
+		}
+		return _maxWidth;
+	}
 
 	public Integer getAbsoluteMinWidth() {
@@ -456,5 +482,12 @@
 		return Math.abs(_minWidth);
 	}
-
+	
+	public Integer getAbsoluteMaxWidth() {
+		if (_maxWidth == null) {
+			return Integer.MIN_VALUE;
+		}
+		return Math.abs(_maxWidth);
+	}
+	
 	@Override
 	public Colour getHighlightColor() {
@@ -1300,8 +1333,12 @@
 	 */
 	public Font getPaintFont() {
-		final Font f = getFont();
+		Font f = getFont();
 		if (f == null) {
 			_font = EcosystemManager.getFontManager().getDefaultFont().clone();
-			return _font;
+			f = _font;
+			
+			if (_useSubstituteFont) {
+				f = _substituteFont;
+			}
 		}
 		return f;
@@ -1693,8 +1730,16 @@
 
 			int minWidth = getAbsoluteMinWidth();
+			int maxWidth = getAbsoluteMaxWidth();
 
 			minX = Math.min(minX, bounds.getMinX());
 			maxX = minWidth < Integer.MAX_VALUE ? Math.max(minX + minWidth, bounds.getMaxX())
 					: Math.max(maxX, bounds.getMaxX());
+			if ((maxWidth - minX) < maxX) {
+				this._useSubstituteFont = true;
+				this._substituteFont.setSize(this._substituteFont.getSize() - 1);
+			} else {
+				this._useSubstituteFont = false;
+				this._substituteFont = this._font;
+			}
 			minY = Math.min(minY, (int) (bounds.getMinY() + y));
 			maxY = Math.max(maxY, (int) (bounds.getMaxY() + y));
@@ -1808,5 +1853,5 @@
 		float width = Float.MAX_VALUE;
 		if (limitWidth) {
-			if (_maxWidth == null) {
+			if (_width == null) {
 				width = DisplayController.getFramePaintAreaWidth() - getX();
 			} else {
@@ -1889,9 +1934,9 @@
 
 	private boolean hasFixedWidth() {
-		assert (_maxWidth != null);
-		if (_maxWidth == null) {
+		assert (_width != null);
+		if (_width == null) {
 			justify(false);
 		}
-		return _maxWidth > 0;
+		return _width > 0;
 	}
 
