C2019-022 Removed the use of the Arial Unicode font (was in for backward compatibility) when using symbols with a proportional font. We now use FreeSerif (supplied by Volian)
C2019-022 When pre-processing table cells before we print a table, we now replace any Arial Unicode font reference with FreeSerif.
This commit is contained in:
parent
70fbe75672
commit
0ba08ae64d
@ -20,9 +20,13 @@ namespace Volian.Base.Library
|
|||||||
get {
|
get {
|
||||||
if (_ProportionalSymbolFont == null)
|
if (_ProportionalSymbolFont == null)
|
||||||
{
|
{
|
||||||
if (FindFontFamily("Arial Unicode MS"))
|
// C2019-022 Microsoft no longer supplies the Arial Unicode font. New computers more than likely do not have this font
|
||||||
_ProportionalSymbolFont = "Arial Unicode MS"; // microsoft no longer supplies this font as of Word16
|
// Since this font is no longer supported, we will now use FreeSerif or FreeMono for symbol characters
|
||||||
else if (FindFontFamily("FreeSerif"))
|
// when using a proportional font.
|
||||||
|
// We removed even checking if Arial Unicode was installed because we had a case (at Volian) where the font
|
||||||
|
// existed (was installed on a Windows 10 computer) but so some reason (unknown at time of writing) Windows say it was bad.
|
||||||
|
// PROMS would will try to use it when printing resulting in very slow print speed and often an un-readable PDF file.
|
||||||
|
if (FindFontFamily("FreeSerif"))
|
||||||
_ProportionalSymbolFont = "FreeSerif"; // volian supplied font but regular chars look like Times Roman
|
_ProportionalSymbolFont = "FreeSerif"; // volian supplied font but regular chars look like Times Roman
|
||||||
else if (FindFontFamily("FreeMono"))
|
else if (FindFontFamily("FreeMono"))
|
||||||
_ProportionalSymbolFont = "FreeMono"; // volian suppllied font but regular chars are fixed spaced and look like Courier
|
_ProportionalSymbolFont = "FreeMono"; // volian suppllied font but regular chars are fixed spaced and look like Courier
|
||||||
@ -49,11 +53,11 @@ namespace Volian.Base.Library
|
|||||||
get {
|
get {
|
||||||
if (_ReportsFont == null)
|
if (_ReportsFont == null)
|
||||||
{
|
{
|
||||||
if (FindFontFamily("Arial Unicode MS")) // microsoft no longer supplies this font as of Word16
|
// C2019-022 Microsoft no longer supplies the Arial Unicode font. New computers more than likely do not have this font
|
||||||
_ReportsFont = "Arial Unicode MS";
|
// Since this font is no longer supported, we will now use FreeSerif or FreeMono for symbol characters
|
||||||
else if (FindFontFamily("Meiryo")) // is a Japanise font (standard windows font) but cannot be used along with the Arial font - will shift text up half a character when mixing the two fonts.
|
// when using a proportional font.
|
||||||
_ReportsFont = "Meiryo";
|
// Also the Meiryo font will not be used as it cannot be used along with the Arial font.
|
||||||
else if (FindFontFamily("FreeSerif")) // volian supplied font but regular chars look like Times Roman
|
if (FindFontFamily("FreeSerif")) // volian supplied font but regular chars look like Times Roman
|
||||||
_ReportsFont = "FreeSerif";
|
_ReportsFont = "FreeSerif";
|
||||||
else if (FindFontFamily("FreeMono")) // volian suppllied font but regular chars are fixed spaced and look like Courier
|
else if (FindFontFamily("FreeMono")) // volian suppllied font but regular chars are fixed spaced and look like Courier
|
||||||
_ReportsFont = "FreeMono";
|
_ReportsFont = "FreeMono";
|
||||||
|
@ -825,6 +825,14 @@ namespace Volian.Print.Library
|
|||||||
// space before the 'ulnone' the following won't work. Also, this change was not
|
// space before the 'ulnone' the following won't work. Also, this change was not
|
||||||
// made in the non-table code. If the problem occurs there, it should be added.
|
// made in the non-table code. If the problem occurs there, it should be added.
|
||||||
_StatRTB.Rtf = Regex.Replace(str.Replace(@"\~", @"\u160?"), @"(?<!\\[a-z0-9]+) \\ulnone", @"\u160?\ulnone");
|
_StatRTB.Rtf = Regex.Replace(str.Replace(@"\~", @"\u160?"), @"(?<!\\[a-z0-9]+) \\ulnone", @"\u160?\ulnone");
|
||||||
|
string s = _StatRTB.Rtf;
|
||||||
|
// C2019-022 Microsoft no longer supplies the Arial Unicode font. New computers more than likely do not have this font
|
||||||
|
// This logic will replace the Arial Unicode font reference in each table cell with FreeSerif (supplied by Volian)
|
||||||
|
// this will avoid slow printing, font errors, and un-readable PDF files
|
||||||
|
// We had a case (at Volian) where the font existed (was installed on a Windows 10 computer)
|
||||||
|
// but so some reason (unknown at time of writing) Windows say it was bad.
|
||||||
|
s = s.Replace("Arial Unicode MS", "FreeSerif");
|
||||||
|
_StatRTB.Rtf = s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_StatRTB.Text = str;
|
_StatRTB.Text = str;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user