bug fix BB2012-189 – added logic for RNOWithAlt
fixed width calculation For the screen display, force the use of Letter Gothic Tall when Letter Gothic is set. Some of the Letter Gothic characters have a different width whereas Letter Gothic Tall characters have a consistent width.
This commit is contained in:
		@@ -2069,7 +2069,15 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
							// the tab start & tab width to calculate the overall width.
 | 
												// the tab start & tab width to calculate the overall width.
 | 
				
			||||||
							TabFormat = "";	// this is set so that TextWidth command below will be correct
 | 
												TabFormat = "";	// this is set so that TextWidth command below will be correct
 | 
				
			||||||
							_IgnoreResize = true;
 | 
												_IgnoreResize = true;
 | 
				
			||||||
							ContentWidth = _MyParentEditItem.ContentWidth;
 | 
												// Use the RNOWidthAlt value if it exists instead of the default RNO width
 | 
				
			||||||
 | 
												// Note that I needed to add 1 to the ToDisplay() value to be closer to the needed
 | 
				
			||||||
 | 
												// width for the screen (this does not affect the printout)
 | 
				
			||||||
 | 
												string[] splitRNOWidthAlt = MyStepSectionLayoutData.RNOWidthAlt.Split(',');
 | 
				
			||||||
 | 
												int ovrRNOWidth = (RNOLevel < splitRNOWidthAlt.Length)?MyStepPanel.ToDisplay(float.Parse(splitRNOWidthAlt[RNOLevel])+1) : 0;
 | 
				
			||||||
 | 
												if (MyStepSectionLayoutData.RNOWidthAlt != null && ovrRNOWidth > 1)
 | 
				
			||||||
 | 
													ContentWidth = ovrRNOWidth;
 | 
				
			||||||
 | 
												else
 | 
				
			||||||
 | 
													ContentWidth =_MyParentEditItem.ContentWidth;
 | 
				
			||||||
							_IgnoreResize = false;
 | 
												_IgnoreResize = false;
 | 
				
			||||||
							if (RNOLevel <= MyItemInfo.ColumnMode)
 | 
												if (RNOLevel <= MyItemInfo.ColumnMode)
 | 
				
			||||||
							{
 | 
												{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,7 +71,8 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
			get { return _MyStepRTB.Width; }
 | 
								get { return _MyStepRTB.Width; }
 | 
				
			||||||
			set
 | 
								set
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				Width = value + lblTab.Left + lblTab.Width;
 | 
									//Width = value + lblTab.Left + lblTab.Width;
 | 
				
			||||||
 | 
									Width = value + lblTab.Left + lblTab.Width + (this.Right - MyStepRTB.Right);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		public override int BorderWidth { get {return (_MyStepRTB.Width - _MyStepRTB.ClientRectangle.Width);} }
 | 
							public override int BorderWidth { get {return (_MyStepRTB.Width - _MyStepRTB.ClientRectangle.Width);} }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -378,6 +378,14 @@ namespace Volian.Controls.Library
 | 
				
			|||||||
						//Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
 | 
											//Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									// We found that the characters in the Letter Gothic font do not all use the same spacing.
 | 
				
			||||||
 | 
									// Also, the character spacing is even more different between screen resolutions.
 | 
				
			||||||
 | 
									// But the Letter Gothic font will print just fine.
 | 
				
			||||||
 | 
									// We also found that the Letter Gothic Tall font works just fine on the screen, the only difference
 | 
				
			||||||
 | 
									// is that the characters are a little bit taller.
 | 
				
			||||||
 | 
									// So we decided to use the Letter Gothic Tall font for the screen display any time that Letter Gothic is used.
 | 
				
			||||||
 | 
									if (_FormatFont.Name.ToUpper().Equals("LETTER GOTHIC"))
 | 
				
			||||||
 | 
										_FormatFont = new Font("Letter Gothic Tall", _FormatFont.Size, _FormatFont.Style);
 | 
				
			||||||
				return _FormatFont; 
 | 
									return _FormatFont; 
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			set { _FormatFont = value; }
 | 
								set { _FormatFont = value; }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user