using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PDF_Master.Helper
{
public static class EditHelper
{
///
/// 字体更改失效:
///MT Extra
///Symbol
///HoloLens MDL2 Assets
///Wingdings
///Wingdings 2
///Wingdings 3
///Webdings
///ZWAdobeF
///Algerian
///Bookshelf Symbol 7
///Castellar
///Marlett
///MS Outlook(adobe、万兴没效果)
///MS Reference Specialty
///Segoe Fluent Icons(adobe、万兴没效果)
///Segoe MDL2 Assets(adobe、万兴没效果)
///Stencil
/// 未选择 文本时候,暂时注释SDK 目前没有效果的字体
///
public static List FontFamily { get; set; } = new List
{
"Adobe Devanagari",
"Arial",
"Arial Black",
"Arvo",
"Bahnschrift",
"Bahnschrift Condensed",
"Bahnschrift Light Condensed",
"Bahnschrift Light SemiCondensed",
"Bahnschrift SemiBold Condensed",
"Bahnschrift SemiCondensed",
"Bahnschrift SemiLight",
"Bahnschrift SemiLight Condensed",
"Calibri",
"Cambria",
"Cambria Math",
"Candara",
"Cascadia Code",
"Cascadia Code SemiLight",
"Cascadia Mono",
"Cascadia Mono SemiLight",
"Comic Sans MS",
"Consolas",
"Constantia",
"Corbel",
"Courier New",
"DejaVu Math TeX Gyre",
"Droid Serif",
"Ebrima",
"Franklin Gothic",
"Gabriola",
"Gadugi",
"Georgia",
//"HoloLens MDL2 Assets",
"Impact",
"Indie Flower",
"Ink Free",
"Javanese Text",
"Leelawadee UI",
"Leelawadee UI Semilight",
"Lobster",
"Lucida Console",
"Lucida Sans Unicode",
"MS Gothic",
"MS PGothic",
"MS UI Gothic",
//"MT Extra",
"MV Boli",
"Malgun Gothic",
"Malgun Gothic Semilight",
//"Marlett",
"Microsoft Himalaya",
"Microsoft JhengHei",
"Microsoft JhengHei UI",
"Microsoft New Tai Lue",
"Microsoft PhagsPa",
"Microsoft Sans Serif",
"Microsoft Tai Le",
"Microsoft YaHei UI",
"Microsoft Yi Baiti",
"MingLiU-ExtB",
"MingLiU_HKSCS-ExtB",
"Mongolian Baiti",
"Myanmar Text",
"Nirmala UI",
"Nirmala UI Semilight",
"Open Sans",
"PMingLiU-ExtB",
"Palatino Linotype",
"Poiret One",
"Raleway",
"Roboto",
"Roboto Condensed",
"Roboto Slab",
"Sans Serif Collection",
//"Segoe Fluent Icons",
//"Segoe MDL2 Assets",
"Segoe Print",
"Segoe Script",
"Segoe UI",
"Segoe UI Black",
"Segoe UI Emoji",
"Segoe UI Historic",
"Segoe UI Semilight",
"Segoe UI Symbol",
"Segoe UI Variable Display",
"Segoe UI Variable Small",
"Segoe UI Variable Text",
"SimSun-ExtB",
"Sitka Banner",
"Sitka Display",
"Sitka Heading",
"Sitka Small",
"Sitka Subheading",
"Sitka Text",
"Sylfaen",
//"Symbol",
"Tahoma",
"Times New",
"Trebuchet MS",
"Verdana",
//"Webdings",
//"Wingdings",
"Yu Gothic",
"Yu Gothic UI",
"Yu Gothic UI Semilight",
//"ZWAdobeF",
"等线",
"仿宋",
"黑体",
"楷体",
"宋体",
"微软雅黑"
};
public static List GetFontFamily()
{
return FontFamily.OrderBy(item => IsChinese(item)).ThenBy(item => item).ToList();
}
private static bool IsChinese(string str)
{
foreach (char c in str)
{
if (c >= 0x4E00 && c <= 0x9FFF)
{
return true;
}
}
return false;
}
}
}