From a7e6a65bd392969a83a44c519165cd01f1e04882 Mon Sep 17 00:00:00 2001 From: Sunny Date: Tue, 9 Aug 2022 22:10:07 +0800 Subject: [PATCH] =?UTF-8?q?+=20=E5=A2=9E=E5=8A=A0LineAweSome=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=9B=BE=E6=A0=87=EF=BC=8C=E6=B5=8B=E8=AF=95=E4=B8=8B?= =?UTF-8?q?=E7=9C=8B=E7=9C=8B=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Font/UIFontImage.cs | 37 +++++++++++++--- SunnyUI/Font/UIFontImageDefine.cs | 11 ++--- SunnyUI/Font/UIFontImages.cs | 33 ++++++++++++++ SunnyUI/Font/UIFontImages.designer.cs | 44 +++++++++---------- SunnyUI/Font/UIFontImages.resx | 62 ++++++++++++++++++++++++++- 5 files changed, 152 insertions(+), 35 deletions(-) diff --git a/SunnyUI/Font/UIFontImage.cs b/SunnyUI/Font/UIFontImage.cs index 832824a8..dad96977 100644 --- a/SunnyUI/Font/UIFontImage.cs +++ b/SunnyUI/Font/UIFontImage.cs @@ -63,11 +63,29 @@ namespace Sunny.UI /// public static readonly FontImages FontAwesomeV5Solid; - public const int FontAwesomeV4Count = 786; - public const int ElegantIconsCount = 360; - public const int FontAwesomeV5RegularCount = 151; - public const int FontAwesomeV5SolidCount = 1001; - public const int FontAwesomeV5BrandsCount = 457; + /// + /// FontAwesomeV5Brands + /// + public static readonly FontImages LineAwesomeBrands; + + /// + /// FontAwesomeV5Regular + /// + public static readonly FontImages LineAwesomeRegular; + + /// + /// FontAwesomeV5Solid + /// + public static readonly FontImages LineAwesomeSolid; + + //public const int FontAwesomeV4Count = 786; + //public const int ElegantIconsCount = 360; + //public const int FontAwesomeV5RegularCount = 151; + //public const int FontAwesomeV5SolidCount = 1001; + //public const int FontAwesomeV5BrandsCount = 457; + //public const int LineAwesomeRegularCount = 151; + //public const int LineAwesomeSolidCount = 960; + //public const int LineAwesomeBrandsCount = 433; /// /// ¹¹Ô캯Êý @@ -79,6 +97,9 @@ namespace Sunny.UI FontAwesomeV5Brands = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.fa-brands-400.ttf")); FontAwesomeV5Regular = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.fa-regular-400.ttf")); FontAwesomeV5Solid = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.fa-solid-900.ttf")); + LineAwesomeBrands = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.la-brands-400.ttf")); + LineAwesomeRegular = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.la-regular-400.ttf")); + LineAwesomeSolid = new FontImages(ReadFontFileFromResource("Sunny.UI.Font.la-solid-900.ttf")); } private static byte[] ReadFontFileFromResource(string name) @@ -214,6 +235,12 @@ namespace Sunny.UI return FontAwesomeV5Regular.GetFont(symbolValue, imageSize); case UISymbolType.FontAwesomeV5Solid: return FontAwesomeV5Solid.GetFont(symbolValue, imageSize); + case UISymbolType.LineAwesomeBrands: + return LineAwesomeBrands.GetFont(symbolValue, imageSize); + case UISymbolType.LineAwesomeRegular: + return LineAwesomeRegular.GetFont(symbolValue, imageSize); + case UISymbolType.LineAwesomeSolid: + return LineAwesomeSolid.GetFont(symbolValue, imageSize); default: if (symbol > 0xF000) return FontAwesomeV4.GetFont(symbolValue, imageSize); diff --git a/SunnyUI/Font/UIFontImageDefine.cs b/SunnyUI/Font/UIFontImageDefine.cs index a5cf5b9d..0fdaeb86 100644 --- a/SunnyUI/Font/UIFontImageDefine.cs +++ b/SunnyUI/Font/UIFontImageDefine.cs @@ -38,12 +38,9 @@ namespace Sunny.UI FontAwesomeV4 = 0, FontAwesomeV5Brands = 1, FontAwesomeV5Regular = 2, - FontAwesomeV5Solid = 3 - } - - public enum ImageFont - { - FontAwesome, - Elegant + FontAwesomeV5Solid = 3, + LineAwesomeBrands = 4, + LineAwesomeRegular = 5, + LineAwesomeSolid = 6 } } \ No newline at end of file diff --git a/SunnyUI/Font/UIFontImages.cs b/SunnyUI/Font/UIFontImages.cs index 1796f2b7..848501fc 100644 --- a/SunnyUI/Font/UIFontImages.cs +++ b/SunnyUI/Font/UIFontImages.cs @@ -39,6 +39,9 @@ namespace Sunny.UI private readonly ConcurrentQueue