Empty Genmac fix, split cover page title fix
logic for Delta on HLS tab, better check for proportional font different way to register fonts , check for null base font fixed problem of too many carriage returns in some plot definitions.
This commit is contained in:
@@ -30,14 +30,15 @@ namespace Volian.Svg.Library
|
||||
{
|
||||
if (!iTextSharp.text.FontFactory.IsRegistered(fontName))
|
||||
{
|
||||
foreach (string name in FontKey.GetValueNames())
|
||||
{
|
||||
if (name.StartsWith(fontName))
|
||||
{
|
||||
string fontFile = (string)FontKey.GetValue(name);
|
||||
iTextSharp.text.FontFactory.Register(fontFile.Contains("\\") ? fontFile : FontFolder + "\\" + fontFile);
|
||||
}
|
||||
}
|
||||
//foreach (string name in FontKey.GetValueNames())
|
||||
//{
|
||||
// if (name.StartsWith(fontName))
|
||||
// {
|
||||
// string fontFile = (string)FontKey.GetValue(name);
|
||||
// iTextSharp.text.FontFactory.Register(fontFile.Contains("\\") ? fontFile : FontFolder + "\\" + fontFile);
|
||||
// }
|
||||
//}
|
||||
iTextSharp.text.FontFactory.RegisterDirectories();
|
||||
}
|
||||
}
|
||||
private static RegistryKey _FontKey = Registry.LocalMachine.OpenSubKey("Software").OpenSubKey("Microsoft").OpenSubKey("Windows NT").OpenSubKey("CurrentVersion").OpenSubKey("Fonts");
|
||||
@@ -598,6 +599,10 @@ namespace Volian.Svg.Library
|
||||
float fontSize = scale.M(new SvgMeasurement(Font.SizeInPoints, E_MeasurementUnits.PT));
|
||||
int fontStyle = (Font.Bold ? iTextSharp.text.Font.BOLD : 0) + (Font.Italic ? iTextSharp.text.Font.ITALIC : 0);
|
||||
VolianPdf.RegisterFont(Font.Name);
|
||||
//if (iTextSharp.text.FontFactory.IsRegistered(Font.Name) == false)
|
||||
//{
|
||||
// //iTextSharp.text.FontFactory.RegisterDirectories();
|
||||
//}
|
||||
iTextSharp.text.Font font = FontFactory.GetFont(Font.Name, BaseFont.IDENTITY_H, true, fontSize, fontStyle, new Color(FillColor));
|
||||
|
||||
Phrase ph = BuildPhrase(text, fontSize, fontStyle, font);
|
||||
@@ -638,6 +643,12 @@ namespace Volian.Svg.Library
|
||||
|
||||
private Phrase BuildPhrase(string text, float fontSize, int fontStyle, iTextSharp.text.Font font)
|
||||
{
|
||||
//if (text == "Caution")
|
||||
//{
|
||||
// if (iTextSharp.text.FontFactory.IsRegistered("VolianScript"))
|
||||
// Console.WriteLine("Is Registered");
|
||||
// Console.WriteLine("stop");
|
||||
//}
|
||||
bool fontUnderline = false;
|
||||
float fontTextRise = 0;
|
||||
|
||||
@@ -704,7 +715,7 @@ namespace Volian.Svg.Library
|
||||
{
|
||||
iTextSharp.text.pdf.FontSelector fs = new FontSelector();
|
||||
fs.AddFont(font);
|
||||
if (font.BaseFont.GetWidthPoint("m", 12) == font.BaseFont.GetWidthPoint(".", 12))
|
||||
if (font.BaseFont != null && font.BaseFont.GetWidthPoint("m", 12) == font.BaseFont.GetWidthPoint(".", 12))
|
||||
{
|
||||
VolianPdf.RegisterFont("VESymbFix");
|
||||
fs.AddFont(FontFactory.GetFont("VESymbFix", BaseFont.IDENTITY_H, true, fontSize, fontStyle, new Color(FillColor)));
|
||||
|
Reference in New Issue
Block a user