这里贴一段VB的代码,C#参照也是类似的,读取C盘字体库中的字体,判断字体是否存在,不存在即可使用特殊方法对字体进行安装
这对部分B/S搭建的软件还是能起到作用的,毕竟有些软件设置的字体在系统库中并不存在,如果不安得话,会出现各种乱码的情况,所以
才需要这么做
Private Sub CheckPmingLiuFont() Implements IHealthCheck.CheckPmingLiuFont Try Dim Path As String = \"C:\\Windows\\Fonts\\mingliu.ttc\" Dim PFC As New PrivateFontCollection() If Path = \"C:\\Windows\\Fonts\\mingliu.ttc\" Then sbErrorLog.AppendLine() End If Catch ex As Exception sbErrorLog.AppendLine(\"Can\'t Find PMingLiu Font\") Finally Print(\"\") End Try End Sub
继续阅读与本文标签相同的文章
上一篇 :
VR/AR未来何去何从?
下一篇 :
数字化医院科研信息化管理平台的设计
-
虚拟主机有什么优、缺点?
2026-05-19栏目: 教程
-
服务注册
2026-05-19栏目: 教程
-
服务器被攻击 如何查找漏洞以及攻击手法
2026-05-19栏目: 教程
-
Spring Cloud Zuul的动态路由怎样做?集成Nacos实现很简单
2026-05-19栏目: 教程
-
springboot自动配置原理
2026-05-19栏目: 教程
