从UBUNTU的TTF文件中查找FontName [英] Find FontName from a TTF file in UBUNTU
问题描述
我需要以编程方式为我的应用程序安装(在Ubuntu中)数百种字体(在Ruby on Rails中开发)并跟踪安装时安装的字体名称。
所以我需要一个工具或一些在UBUNTU中的库,它以 即使有是一些红宝石(创业板或任何可以帮助)的方式找到与给定的TTF文件的字体名称,将是很大的帮助。 感谢提前。 基本上我使用fop-ttfreader从TTF文件中获取细节.. http://manpages.ubuntu.com/manpages/natty/ man1 / fop-ttfreader.1.html 所以现在可以解析这个xml文件并获取字体的详细信息。 这看起来像它增加到2步,而不是由djangodude建议,它可以通过解析自己在一个简单的代码完成。在我的情况下,这将是一个像耙子一次性的过程..所以这帮助我完成了我的工作..:P 希望这可能有助于某人。 p> I need to programmatically install (In Ubuntu) few hundreds of fonts for my application (Developed in Ruby on rails) and track the font names installed while installing. So i need a tool or some library in UBUNTU which takes TTF file as input and provide the Font-Name as output. Even if there is some way in ruby (GEM OR anything which can help) to find the font-name with given TTF file, will be great help. Thanks in Advance. Basically i used fop-ttfreader to get the details from a TTF file.. http://manpages.ubuntu.com/manpages/natty/man1/fop-ttfreader.1.html So now this xml file can be parsed and get the font details. This looks like its increased to 2 steps, instead as suggested by djangodude, it can be done in a simple code by parsing ourself. In my case it will be a one time process like a rake.. So this helped me to finish my job.. :P Hope this may help someone. 这篇关于从UBUNTU的TTF文件中查找FontName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
fop-ttfreader fontfile.ttf xmlfile.xml
fop-ttfreader fontfile.ttf xmlfile.xml