You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace Scale
|
|
|
|
|
{
|
|
|
|
|
public class IconfontHelper
|
|
|
|
|
{
|
|
|
|
|
private static System.Drawing.Text.PrivateFontCollection pfcc;
|
|
|
|
|
|
|
|
|
|
public static System.Drawing.Text.PrivateFontCollection PFCC
|
|
|
|
|
{
|
|
|
|
|
get { return pfcc ?? LoadFont(); }
|
|
|
|
|
set { pfcc = value; }
|
|
|
|
|
}
|
|
|
|
|
public static bool JzFont { get; private set; } = false;
|
|
|
|
|
public static System.Drawing.Text.PrivateFontCollection LoadFont()
|
|
|
|
|
{
|
|
|
|
|
if (!JzFont)
|
|
|
|
|
{
|
|
|
|
|
pfcc = new System.Drawing.Text.PrivateFontCollection();
|
|
|
|
|
pfcc.AddFontFile(Environment.CurrentDirectory + "/iconfont.ttf");
|
|
|
|
|
JzFont = true;
|
|
|
|
|
}
|
|
|
|
|
return pfcc;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|