Added flag CompressPropSubSup for compressing proportional fonts sub & superscript (used by Calvert)

Use CompressPropSubSup
Use  CompressPropSubSup
This commit is contained in:
Kathy Ruffing 2014-06-27 12:16:10 +00:00
parent 4b476ebd48
commit 9fb17c103c
6 changed files with 44 additions and 5 deletions

View File

@ -2139,6 +2139,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _CompressHPSuper, "@CompressHPSuper"); return LazyLoad(ref _CompressHPSuper, "@CompressHPSuper");
} }
} }
private LazyLoad<bool> _CompressPropSubSup;
public bool CompressPropSubSup
{
get
{
return LazyLoad(ref _CompressPropSubSup, "@CompressPropSubSup");
}
}
private LazyLoad<bool> _UndSpecialStepsFoldout; private LazyLoad<bool> _UndSpecialStepsFoldout;
public bool UndSpecialStepsFoldout public bool UndSpecialStepsFoldout
{ {

View File

@ -433,6 +433,8 @@ namespace Volian.Print.Library
if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue; if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue;
PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper; PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;
PrintOverride.CompressSub = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub; PrintOverride.CompressSub = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSub;
PrintOverride.CompressPropSubSup = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressPropSubSup;
OnStatusChanged((mySection.DisplayNumber ?? "") == "" ? mySection.DisplayText : mySection.DisplayNumber, PromsPrinterStatusType.Progress, progress++); OnStatusChanged((mySection.DisplayNumber ?? "") == "" ? mySection.DisplayText : mySection.DisplayNumber, PromsPrinterStatusType.Progress, progress++);
// Set up Helper for the particular Section // Set up Helper for the particular Section
if (_MyHelper == null) if (_MyHelper == null)

View File

@ -17,6 +17,7 @@ namespace Volian.Print.Library
{ {
public static bool CompressSub = false; public static bool CompressSub = false;
public static bool CompressSuper = false; public static bool CompressSuper = false;
public static bool CompressPropSubSup = false;
private static System.Drawing.Color _TextColor = System.Drawing.Color.Empty; private static System.Drawing.Color _TextColor = System.Drawing.Color.Empty;
public static System.Drawing.Color TextColor public static System.Drawing.Color TextColor
{ {
@ -204,15 +205,29 @@ namespace Volian.Print.Library
else else
chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
if (visualText.Format.SuperScript > 0) if (visualText.Format.SuperScript > 0)
{
if (PrintOverride.CompressPropSubSup)
{
chk.SetTextRise(.33F * chk.Font.Size);
chk.Font.Size *= .5f;
}
else
{ {
chk.SetTextRise(.25F * chk.Font.Size); chk.SetTextRise(.25F * chk.Font.Size);
if (PrintOverride.CompressSuper) chk.Font.Size = 9; if (PrintOverride.CompressSuper) chk.Font.Size = 9;
} }
}
else if (visualText.Format.SuperScript < 0) else if (visualText.Format.SuperScript < 0)
{
if (PrintOverride.CompressPropSubSup)
chk.Font.Size *= .5f;
else
{ {
chk.SetTextRise(-.25F * chk.Font.Size); chk.SetTextRise(-.25F * chk.Font.Size);
if (PrintOverride.CompressSub) chk.Font.Size = 9; if (PrintOverride.CompressSub) chk.Font.Size = 9;
} }
}
else else
chk.SetTextRise(0); chk.SetTextRise(0);
switch (visualText.Format.Alignment) switch (visualText.Format.Alignment)

View File

@ -674,6 +674,7 @@ public struct StepSection
public string ContinueSectionHeader; public string ContinueSectionHeader;
public string CompressHPSub; public string CompressHPSub;
public string CompressHPSuper; public string CompressHPSuper;
public string CompressPropSubSup;
//public string UndSpecialStepsFoldout; //public string UndSpecialStepsFoldout;
public string UnderlineAllMetaTitles; public string UnderlineAllMetaTitles;
public string BoldOnlySectionZero; public string BoldOnlySectionZero;
@ -4017,6 +4018,7 @@ namespace fmtxml
else fmtdata.SectData.StepSectionData.CompressHPSub = "False"; else fmtdata.SectData.StepSectionData.CompressHPSub = "False";
if (XtraFlags.CompressHPSuper == "True") fmtdata.SectData.StepSectionData.CompressHPSuper = "True"; if (XtraFlags.CompressHPSuper == "True") fmtdata.SectData.StepSectionData.CompressHPSuper = "True";
else fmtdata.SectData.StepSectionData.CompressHPSuper = "False"; else fmtdata.SectData.StepSectionData.CompressHPSuper = "False";
fmtdata.SectData.StepSectionData.CompressPropSubSup = "False";
//if (XtraFlags.UndSpecialStepsFoldout == "True") fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "True"; //if (XtraFlags.UndSpecialStepsFoldout == "True") fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "True";
//else fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "False"; //else fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "False";
if (XtraFlags.UnderlineAllMetaTitles == "True") fmtdata.SectData.StepSectionData.UnderlineAllMetaTitles = "True"; if (XtraFlags.UnderlineAllMetaTitles == "True") fmtdata.SectData.StepSectionData.UnderlineAllMetaTitles = "True";
@ -5061,6 +5063,7 @@ namespace fmtxml
if (msctstp.ContinueSectionHeader != null && msctstp.ContinueSectionHeader == ssctstp.ContinueSectionHeader) subFmt.SectData.StepSectionData.ContinueSectionHeader = "null"; if (msctstp.ContinueSectionHeader != null && msctstp.ContinueSectionHeader == ssctstp.ContinueSectionHeader) subFmt.SectData.StepSectionData.ContinueSectionHeader = "null";
if (msctstp.CompressHPSub != null && msctstp.CompressHPSub == ssctstp.CompressHPSub) subFmt.SectData.StepSectionData.CompressHPSub = "null"; if (msctstp.CompressHPSub != null && msctstp.CompressHPSub == ssctstp.CompressHPSub) subFmt.SectData.StepSectionData.CompressHPSub = "null";
if (msctstp.CompressHPSuper != null && msctstp.CompressHPSuper == ssctstp.CompressHPSuper) subFmt.SectData.StepSectionData.CompressHPSuper = "null"; if (msctstp.CompressHPSuper != null && msctstp.CompressHPSuper == ssctstp.CompressHPSuper) subFmt.SectData.StepSectionData.CompressHPSuper = "null";
if (msctstp.CompressPropSubSup != null && msctstp.CompressPropSubSup == ssctstp.CompressPropSubSup) subFmt.SectData.StepSectionData.CompressPropSubSup = "null";
//if (msctstp.UndSpecialStepsFoldout != null && msctstp.UndSpecialStepsFoldout == ssctstp.UndSpecialStepsFoldout) subFmt.SectData.StepSectionData.UndSpecialStepsFoldout = "null"; //if (msctstp.UndSpecialStepsFoldout != null && msctstp.UndSpecialStepsFoldout == ssctstp.UndSpecialStepsFoldout) subFmt.SectData.StepSectionData.UndSpecialStepsFoldout = "null";
if (msctstp.UnderlineAllMetaTitles != null && msctstp.UnderlineAllMetaTitles == ssctstp.UnderlineAllMetaTitles) subFmt.SectData.StepSectionData.UnderlineAllMetaTitles = "null"; if (msctstp.UnderlineAllMetaTitles != null && msctstp.UnderlineAllMetaTitles == ssctstp.UnderlineAllMetaTitles) subFmt.SectData.StepSectionData.UnderlineAllMetaTitles = "null";
if (msctstp.BoldOnlySectionZero != null && msctstp.BoldOnlySectionZero == ssctstp.BoldOnlySectionZero) subFmt.SectData.StepSectionData.BoldOnlySectionZero = "null"; if (msctstp.BoldOnlySectionZero != null && msctstp.BoldOnlySectionZero == ssctstp.BoldOnlySectionZero) subFmt.SectData.StepSectionData.BoldOnlySectionZero = "null";

View File

@ -7,8 +7,19 @@ namespace fmtxml
{ {
public partial class FmtFileToXml public partial class FmtFileToXml
{ {
private void AddBGEALNfmt(ref FormatData fmtdata)
{
fmtdata.SectData.StepSectionData.CompressHPSub = "False";
fmtdata.SectData.StepSectionData.CompressPropSubSup = "True";
fmtdata.PrintData.SpecialCaseCalvert = "True";
fmtdata.StepData[2].TabData.IdentEdit = "WINDOW ";
fmtdata.StepData[2].TabData.Ident = "WINDOW ";
fmtdata.StepData[42].UseOldTemplate = "True";
}
private void AddBGEEOPfmt(ref FormatData fmtdata) private void AddBGEEOPfmt(ref FormatData fmtdata)
{ {
fmtdata.SectData.StepSectionData.CompressHPSub = "False";
fmtdata.SectData.StepSectionData.CompressPropSubSup = "True";
fmtdata.PrintData.UnitNumber = "True"; fmtdata.PrintData.UnitNumber = "True";
fmtdata.PrintData.SpecialCaseCalvert = "True"; fmtdata.PrintData.SpecialCaseCalvert = "True";
fmtdata.SectData.SectionNumber.Level0Big = "True"; fmtdata.SectData.SectionNumber.Level0Big = "True";

Binary file not shown.