if PageItem font CPI is null, then default to 12 CPI
Commented out script caution logic (used in NSP for 16-bit VE-PROMS)
This commit is contained in:
@@ -997,7 +997,9 @@ namespace Volian.Print.Library
|
||||
// Take the difference between the width in Points of a character at 12CPI and a character
|
||||
// at the defined font's CPI. Multiply that times the length of title and divide by two
|
||||
// to find the half-way point.
|
||||
colAdj16bit = (1 + text.Length) * ((72 / (float)pageItem.Font.CPI) - (72 / 12)) / 2;
|
||||
|
||||
// if the PageItem's font CPI is null, then default to 12 CPI
|
||||
colAdj16bit = (1 + text.Length) * ((72 / (float)(pageItem.Font.CPI ?? 12)) - (72 / 12)) / 2;
|
||||
}
|
||||
}
|
||||
svgText.Font = pageItem.Font.WindowsFont;
|
||||
|
Reference in New Issue
Block a user