mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 04:12:12 +00:00
Fixed: use application default font family for rendered labels if user-selected font is not available
This commit is contained in:
parent
76bfd79bd6
commit
607ac7751e
4 changed files with 14 additions and 5 deletions
|
@ -363,7 +363,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
scriptautoshowautocompletion = cfg.ReadSetting("scriptautoshowautocompletion", true);
|
||||
|
||||
//mxd. Text labels
|
||||
textlabelfontname = cfg.ReadSetting("textlabelfontname", "Arial");
|
||||
textlabelfontname = cfg.ReadSetting("textlabelfontname", "Microsoft Sans Serif");
|
||||
textlabelfontsize = cfg.ReadSetting("textlabelfontsize", 10);
|
||||
textlabelfontbold = cfg.ReadSetting("textlabelfontbold", false);
|
||||
|
||||
|
|
|
@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.0.0.3248")]
|
||||
[assembly: AssemblyVersion("3.0.0.3271")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
[assembly: AssemblyHash("99b1770")]
|
||||
[assembly: AssemblyHash("fed4b77")]
|
||||
|
|
|
@ -128,7 +128,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
{
|
||||
scale = value;
|
||||
font.Dispose();
|
||||
font = new Font(new FontFamily(General.Settings.TextLabelFontName), (float)Math.Round(scale * 0.75f), (General.Settings.TextLabelFontBold ? FontStyle.Bold : FontStyle.Regular));
|
||||
FontFamily ff;
|
||||
try
|
||||
{
|
||||
ff = new FontFamily(General.Settings.TextLabelFontName);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ff = General.MainWindow.Font.FontFamily;
|
||||
}
|
||||
font = new Font(ff, (float)Math.Round(scale * 0.75f), (General.Settings.TextLabelFontBold ? FontStyle.Bold : FontStyle.Regular));
|
||||
textsize = Size.Empty;
|
||||
textureupdateneeded = true;
|
||||
}
|
||||
|
|
|
@ -29,5 +29,5 @@ using System.Resources;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("3.0.0.3248")]
|
||||
[assembly: AssemblyVersion("3.0.0.3271")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||
|
|
Loading…
Reference in a new issue