网站搭建南京微信平台商城开发
网站搭建南京,微信平台商城开发,wordpress导航下拉,中美军事最新消息背景#xff1a;润乾报表 win上面的项目直接上传到linux 上#xff0c;但预览下载报表时乱码如果含有斜线的单元格或统计图的报表在网页上发布时#xff0c;统计图或斜线单元格里的汉字会变成小方框#xff0c;此时往往是服务器端操作系统的中文安装包没有装全#x…背景润乾报表 win上面的项目直接上传到linux 上但预览下载报表时乱码如果含有斜线的单元格或统计图的报表在网页上发布时统计图或斜线单元格里的汉字会变成小方框此时往往是服务器端操作系统的中文安装包没有装全导致报表里用到的字体在服务器端的操作系统里找不到因此成了小方块。我这只配置到前 5 步就可以了不需要重启Linux 或字体服务步骤总结为以下1、检查字体是否已经安装fc-list ----------检查所有已有的字体fc-list :langzh -----------只检查中文2、到 C:\windows\fonts 复制对应字体库微软雅黑、宋体、黑体等各文件后缀可能不一样有的为ttf有的为ttc不影响使用。3、上传刚才复制的字体库到/usr/share/fonts/zh_CN目录下如果没有该目录用命令mkdir /usr/share/fonts/zh_CN来创建然后再上传。4、修改字体权限使root以外的用户可以使用这些字体使用777 赋予全部权限chmod -R 777 /usr/share/fonts/zh_CN5、建立字体缓存rootgxx:/usr/share/fonts# mkfontscalerootgxx:/usr/share/fonts# mkfontdirrootgxx:/usr/share/fonts# fc-cache -fv/usr/share/fonts: caching, new cache contents: 0 fonts, 4 dirs/usr/share/fonts/X11: caching, new cache contents: 0 fonts, 2 dirs/usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs/usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs/usr/share/fonts/cmap/adobe-cns1: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/cmap/adobe-gb1: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/cmap/adobe-japan1: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/cmap/adobe-japan2: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/cmap/adobe-korea1: caching, new cache contents: 0 fonts, 0 dirs/usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 1 dirs/usr/share/fonts/truetype/dejavu: caching, new cache contents: 21 fonts, 0 dirs/usr/share/fonts/zh_CN: caching, new cache contents: 419 fonts, 0 dirs/usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs/root/.local/share/fonts: skipping, no such directory/root/.fonts: skipping, no such directoryRe-scanning /usr/share/fonts: caching, new cache contents: 0 fonts, 4 dirsRe-scanning /usr/share/fonts/X11: caching, new cache contents: 0 fonts, 2 dirsRe-scanning /usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirsRe-scanning /usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirsRe-scanning /usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 1 dirs/var/cache/fontconfig: cleaning cache directory/root/.cache/fontconfig: not cleaning non-existent cache directory/root/.fontconfig: not cleaning non-existent cache directoryfc-cache: succeeded6、重启 Tomcat以上文章中有的说要重启 Linux系统有的说要重启字体库服务但我都没有而且也没有字体服务只是重启了Tomcat 执行后有效。7、可以再次使用 fc-list 查看字体库已经包含了新加入的字体或者使用上边的Java 输出也包含了新字体打印中文水印也OK。rootgxx:~# fc-list :langzh/usr/share/fonts/zh_CN/msyhl.ttc: Microsoft YaHei UI,Microsoft YaHei UI Light:styleLight,Regular/usr/share/fonts/zh_CN/Dengl.ttf: DengXian,等线,DengXian Light,等线 Light:styleLight,Regular/usr/share/fonts/zh_CN/msyh.ttc: Microsoft YaHei UI:styleRegular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/simsun.ttc: SimSun,宋体:styleRegular,常规/usr/share/fonts/zh_CN/Dengb.ttf: DengXian,等线:styleBold/usr/share/fonts/zh_CN/SIMLI.TTF: LiSu,隶书:styleRegular/usr/share/fonts/zh_CN/Deng.ttf: DengXian,等线:styleRegular/usr/share/fonts/zh_CN/STXINWEI.TTF: STXinwei,华文新魏:styleRegular/usr/share/fonts/zh_CN/STHUPO.TTF: STHupo,华文琥珀:styleRegular/usr/share/fonts/zh_CN/msjhl.ttc: Microsoft JhengHei,微軟正黑體,微軟正黑體 Light,Microsoft JhengHei Light:styleLight,Regular/usr/share/fonts/zh_CN/simkai.ttf: KaiTi,楷体:styleRegular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/STSONG.TTF: STSong,华文宋体:styleRegular/usr/share/fonts/zh_CN/STFANGSO.TTF: STFangsong,华文仿宋:styleRegular/usr/share/fonts/zh_CN/simhei.ttf: SimHei,黑体:styleRegular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/FZYTK.TTF: FZYaoTi,方正姚体:styleRegular/usr/share/fonts/zh_CN/FZSTK.TTF: FZShuTi,方正舒体:styleRegular/usr/share/fonts/zh_CN/msjh.ttc: Microsoft JhengHei,微軟正黑體:styleNormal,Regular,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/STXINGKA.TTF: STXingkai,华文行楷:styleRegular/usr/share/fonts/zh_CN/msyh.ttc: Microsoft YaHei,微软雅黑:styleRegular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/msjhl.ttc: Microsoft JhengHei UI,Microsoft JhengHei UI Light:styleLight,Regular/usr/share/fonts/zh_CN/simsun.ttc: NSimSun,新宋体:styleRegular,常规/usr/share/fonts/zh_CN/STLITI.TTF: STLiti,华文隶书:styleRegular/usr/share/fonts/zh_CN/STZHONGS.TTF: STZhongsong,华文中宋:styleRegular/usr/share/fonts/zh_CN/STKAITI.TTF: STKaiti,华文楷体:styleRegular/usr/share/fonts/zh_CN/msjhbd.ttc: Microsoft JhengHei,微軟正黑體:styleNegreta,Bold,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia/usr/share/fonts/zh_CN/msjh.ttc: Microsoft JhengHei UI:styleNormal,Regular,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/msyhbd.ttc: Microsoft YaHei,微软雅黑:styleBold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia/usr/share/fonts/zh_CN/msyhl.ttc: Microsoft YaHei,微软雅黑,Microsoft YaHei Light,微软雅黑 Light:styleLight,Regular/usr/share/fonts/zh_CN/msjhbd.ttc: Microsoft JhengHei UI:styleNegreta,Bold,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia/usr/share/fonts/zh_CN/STXIHEI.TTF: STXihei,华文细黑:styleRegular/usr/share/fonts/zh_CN/STCAIYUN.TTF: STCaiyun,华文彩云:styleRegular/usr/share/fonts/zh_CN/SIMYOU.TTF: YouYuan,幼圆:styleRegular/usr/share/fonts/zh_CN/simfang.ttf: FangSong,仿宋:styleRegular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta/usr/share/fonts/zh_CN/msyhbd.ttc: Microsoft YaHei UI:styleBold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/86365.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!