j'ava部署到了tomcat,发现了一个问题,我们登录的验证码出现了乱码,和字符 然而在windows服务器上,或者说我们本地的开发环境上面,则没有这种现象, 这是为什么? 查看源码,发现有一段代码: new Font("Times New Roman", 0, 18) 原来windows操作系统上面有自带的默认字体,即Times New Roman 而我们的linux系统,以centos7.3为例,则没有这个字体,毕竟我们的linux系统是没有图形化操作界面的,所以也没有默认自带字…
1: /* 2: * To change this license header, choose License Headers in Project Properties. 3: * To change this template file, choose Tools | Templates 4: * and open the template in the editor. 5: */ 6: package compiler; 7: 8: import fileSystem.fileFil…
我之前在博客中介绍过几个矢量图库网站,在WPF程序中,一般接触到的矢量图标资源有XAML.SVG.字体这三种格式.XAML是标准格式就不说了,SVG并不是直接支持的,不过微软提供了Expression Design可以非常方便我们将其转换为XAML格式的资源.而对于字体,虽然WPF是直接支持的,但由于字体图标其特殊性,要将其显示为图标还是需要费点劲的.本文这里就以Font-Awesome为例,介绍一下如何在WPF中使用字体图标. Every Font Awesome 4.7.0 Icon, CS…
To create a Font object to draw text, it is necessary to specify the font face name. This example demonstrates how to retrieve all the font face names from a font family name. Unfortunately, the method is somewhat inefficient since it involves creati…