mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +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);
|
scriptautoshowautocompletion = cfg.ReadSetting("scriptautoshowautocompletion", true);
|
||||||
|
|
||||||
//mxd. Text labels
|
//mxd. Text labels
|
||||||
textlabelfontname = cfg.ReadSetting("textlabelfontname", "Arial");
|
textlabelfontname = cfg.ReadSetting("textlabelfontname", "Microsoft Sans Serif");
|
||||||
textlabelfontsize = cfg.ReadSetting("textlabelfontsize", 10);
|
textlabelfontsize = cfg.ReadSetting("textlabelfontsize", 10);
|
||||||
textlabelfontbold = cfg.ReadSetting("textlabelfontbold", false);
|
textlabelfontbold = cfg.ReadSetting("textlabelfontbold", false);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,6 @@ using CodeImp.DoomBuilder;
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("3.0.0.3248")]
|
[assembly: AssemblyVersion("3.0.0.3271")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||||
[assembly: AssemblyHash("99b1770")]
|
[assembly: AssemblyHash("fed4b77")]
|
||||||
|
|
|
@ -128,7 +128,16 @@ namespace CodeImp.DoomBuilder.Rendering
|
||||||
{
|
{
|
||||||
scale = value;
|
scale = value;
|
||||||
font.Dispose();
|
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;
|
textsize = Size.Empty;
|
||||||
textureupdateneeded = true;
|
textureupdateneeded = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,5 +29,5 @@ using System.Resources;
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("3.0.0.3248")]
|
[assembly: AssemblyVersion("3.0.0.3271")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
[assembly: NeutralResourcesLanguageAttribute("en")]
|
||||||
|
|
Loading…
Reference in a new issue