SVG to PNG text not showing properly - Arial font

前端 未结 1 1846
故里飘歌
故里飘歌 2021-01-05 14:24

I\'m having an issue of converted PNG using Apache Batik is different when there is a text with different font-family, like Arial. The issue occurs in the environment where

1条回答
  •  悲&欢浪女
    2021-01-05 14:39

    You need to install Microsoft truetype fonts and make them available to java virtual machine by setting JAVA_FONTS environment variable.

    wget http://www.my-guides.net/en/images/stories/fedora12/msttcore-fonts-2.0-3.noarch.rpm
    
    rpm -ivh msttcore-fonts-2.0-3.noarch.rpm
    

    Open /etc/bashrc and add following to the end of the file

    JAVA_FONTS=/usr/share/fonts/msttcore
    
    export JAVA_FONTS
    

    http://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-microsoft-truetype-fonts-in-centos-6-rhel-6.html#axzz2aibHZaOI

    0 讨论(0)
提交回复
热议问题