* 重构字体
This commit is contained in:
parent
7ae4bb613d
commit
9dfdb310ba
@ -21,6 +21,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
using System.ComponentModel;
|
||||
using static System.Drawing.FontConverter;
|
||||
|
||||
namespace Sunny.UI
|
||||
{
|
||||
@ -85,6 +86,15 @@ namespace Sunny.UI
|
||||
set => UIStyles.FontSize = value;
|
||||
}
|
||||
|
||||
[Editor("System.Drawing.Design.FontNameEditor", "System.Drawing.Design.UITypeEditor")]
|
||||
[TypeConverter(typeof(FontNameConverter))]
|
||||
[DefaultValue("微软雅黑")]
|
||||
public string FontName
|
||||
{
|
||||
get => UIStyles.FontName;
|
||||
set => UIStyles.FontName = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 版本
|
||||
/// </summary>
|
||||
|
@ -26,9 +26,11 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using static System.Drawing.FontConverter;
|
||||
|
||||
namespace Sunny.UI
|
||||
{
|
||||
@ -41,6 +43,10 @@ namespace Sunny.UI
|
||||
|
||||
public static bool ZoomScale { get; set; }
|
||||
|
||||
[Editor("System.Drawing.Design.FontNameEditor", "System.Drawing.Design.UITypeEditor")]
|
||||
[TypeConverter(typeof(FontNameConverter))]
|
||||
public static string FontName { get; set; } = "微软雅黑";
|
||||
|
||||
public static float FontSize { get; set; } = 12;
|
||||
|
||||
private static readonly ConcurrentDictionary<string, byte> FontCharSets = new ConcurrentDictionary<string, byte>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user