Use the FreeMono font for symbols in the edit window
This commit is contained in:
@@ -844,9 +844,9 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
get { return _ReadingXml; }
|
||||
}
|
||||
private static Regex _ReplaceVESymbFix = new Regex(@"({\\f[0-9]+[^ ]* )(VESymbFix)(;})");
|
||||
private static Regex _ReplaceVESymbFix = new Regex(@"({\\f[0-9]+[^ ]* )(FreeMono)(;})"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
|
||||
private static Regex _ReplaceArialUnicodeMS = new Regex(@"({\\f[0-9]+[^ ]* )(Arial Unicode MS)(;})");
|
||||
private static Regex _ReplaceTextFont = new Regex(@"({\\f[0-9]+[^ ]* )(?((?!VESymbFix)(?!Arial Unicode MS))([^;]*)|(!!!!))(;})");
|
||||
private static Regex _ReplaceTextFont = new Regex(@"({\\f[0-9]+[^ ]* )(?((?!FreeMono)(?!Arial Unicode MS))([^;]*)|(!!!!))(;})"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
|
||||
private bool FontIsFixed(Font myFont)
|
||||
{
|
||||
Graphics grph = Graphics.FromHwnd(this.Handle);
|
||||
@@ -872,7 +872,7 @@ namespace Volian.Controls.Library
|
||||
if (StepRTB.MyFontFamily != null)
|
||||
{
|
||||
FontFamily ff = StepRTB.MyFontFamily;
|
||||
if (StepRTB.MySymbolFontName != "VESymbFix")
|
||||
if (StepRTB.MySymbolFontName != "FreeMono") // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
|
||||
str = _ReplaceVESymbFix.Replace(str, "$1" + StepRTB.MySymbolFontName + "$3");
|
||||
if (StepRTB.MySymbolFontName != "Arial Unicode MS")
|
||||
str = _ReplaceArialUnicodeMS.Replace(str, "$1" + StepRTB.MySymbolFontName + "$3");
|
||||
@@ -882,7 +882,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
FontFamily ff = vefont.WindowsFont.FontFamily;
|
||||
if (FontIsFixed(vefont.WindowsFont))
|
||||
str = _ReplaceArialUnicodeMS.Replace(str, "$1" + "VESymbFix" + "$3");
|
||||
str = _ReplaceArialUnicodeMS.Replace(str, "$1" + "FreeMono" + "$3"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing
|
||||
else
|
||||
str = _ReplaceVESymbFix.Replace(str, "$1" + "Arial Unicode MS" + "$3");
|
||||
str = _ReplaceTextFont.Replace(str, "$1" + ff.Name + "$4");
|
||||
|
Reference in New Issue
Block a user