Added flag CompressPropSubSup for compressing proportional fonts sub & superscript (used by Calvert)
Use CompressPropSubSup Use CompressPropSubSup
This commit is contained in:
parent
4b476ebd48
commit
9fb17c103c
@ -214,7 +214,7 @@ namespace VEPROMS.CSLA.Library
|
||||
while (indx < Templates.Count)
|
||||
{
|
||||
// level of 0 starts a new group.
|
||||
if (Templates[indx].level == 0) TopTemplateTypes[Templates[indx + 1].type] = indx+1;
|
||||
if (Templates[indx].level == 0) TopTemplateTypes[Templates[indx + 1].type] = indx + 1;
|
||||
indx++;
|
||||
}
|
||||
}
|
||||
@ -2139,6 +2139,14 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _CompressHPSuper, "@CompressHPSuper");
|
||||
}
|
||||
}
|
||||
private LazyLoad<bool> _CompressPropSubSup;
|
||||
public bool CompressPropSubSup
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _CompressPropSubSup, "@CompressPropSubSup");
|
||||
}
|
||||
}
|
||||
private LazyLoad<bool> _UndSpecialStepsFoldout;
|
||||
public bool UndSpecialStepsFoldout
|
||||
{
|
||||
|
@ -433,6 +433,8 @@ namespace Volian.Print.Library
|
||||
if (myFoldoutSection != null && myFoldoutSection.ItemID != mySection.ItemID) continue;
|
||||
PrintOverride.CompressSuper = mySection.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.CompressHPSuper;
|
||||
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++);
|
||||
// Set up Helper for the particular Section
|
||||
if (_MyHelper == null)
|
||||
|
@ -17,6 +17,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
public static bool CompressSub = false;
|
||||
public static bool CompressSuper = false;
|
||||
public static bool CompressPropSubSup = false;
|
||||
private static System.Drawing.Color _TextColor = System.Drawing.Color.Empty;
|
||||
public static System.Drawing.Color TextColor
|
||||
{
|
||||
@ -205,13 +206,27 @@ namespace Volian.Print.Library
|
||||
chk.SetUnderline(font.Color, 0, 0.05F, 0, -.131F, PdfContentByte.LINE_CAP_ROUND); // Relative Based upon font size
|
||||
if (visualText.Format.SuperScript > 0)
|
||||
{
|
||||
chk.SetTextRise(.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSuper) chk.Font.Size = 9;
|
||||
if (PrintOverride.CompressPropSubSup)
|
||||
{
|
||||
chk.SetTextRise(.33F * chk.Font.Size);
|
||||
chk.Font.Size *= .5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
chk.SetTextRise(.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSuper) chk.Font.Size = 9;
|
||||
}
|
||||
|
||||
}
|
||||
else if (visualText.Format.SuperScript < 0)
|
||||
{
|
||||
chk.SetTextRise(-.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSub) chk.Font.Size = 9;
|
||||
if (PrintOverride.CompressPropSubSup)
|
||||
chk.Font.Size *= .5f;
|
||||
else
|
||||
{
|
||||
chk.SetTextRise(-.25F * chk.Font.Size);
|
||||
if (PrintOverride.CompressSub) chk.Font.Size = 9;
|
||||
}
|
||||
}
|
||||
else
|
||||
chk.SetTextRise(0);
|
||||
|
@ -674,6 +674,7 @@ public struct StepSection
|
||||
public string ContinueSectionHeader;
|
||||
public string CompressHPSub;
|
||||
public string CompressHPSuper;
|
||||
public string CompressPropSubSup;
|
||||
//public string UndSpecialStepsFoldout;
|
||||
public string UnderlineAllMetaTitles;
|
||||
public string BoldOnlySectionZero;
|
||||
@ -4017,6 +4018,7 @@ namespace fmtxml
|
||||
else fmtdata.SectData.StepSectionData.CompressHPSub = "False";
|
||||
if (XtraFlags.CompressHPSuper == "True") fmtdata.SectData.StepSectionData.CompressHPSuper = "True";
|
||||
else fmtdata.SectData.StepSectionData.CompressHPSuper = "False";
|
||||
fmtdata.SectData.StepSectionData.CompressPropSubSup = "False";
|
||||
//if (XtraFlags.UndSpecialStepsFoldout == "True") fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "True";
|
||||
//else fmtdata.SectData.StepSectionData.UndSpecialStepsFoldout = "False";
|
||||
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.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.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.UnderlineAllMetaTitles != null && msctstp.UnderlineAllMetaTitles == ssctstp.UnderlineAllMetaTitles) subFmt.SectData.StepSectionData.UnderlineAllMetaTitles = "null";
|
||||
if (msctstp.BoldOnlySectionZero != null && msctstp.BoldOnlySectionZero == ssctstp.BoldOnlySectionZero) subFmt.SectData.StepSectionData.BoldOnlySectionZero = "null";
|
||||
|
@ -7,8 +7,19 @@ namespace fmtxml
|
||||
{
|
||||
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)
|
||||
{
|
||||
fmtdata.SectData.StepSectionData.CompressHPSub = "False";
|
||||
fmtdata.SectData.StepSectionData.CompressPropSubSup = "True";
|
||||
fmtdata.PrintData.UnitNumber = "True";
|
||||
fmtdata.PrintData.SpecialCaseCalvert = "True";
|
||||
fmtdata.SectData.SectionNumber.Level0Big = "True";
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user