【问题标题】:How to use specific fonts, Verdana for example with libharu in Ubuntu如何在 Ubuntu 中使用特定字体,例如 Verdana 和 libharu
【发布时间】:2011-12-12 08:43:36
【问题描述】:

我在 /usr/share/fonts/type1/gsfonts/ 中有一些 type1 类型,在安装 msttcorefonts 后甚至更多。但是在字体的多样性中,我不知道哪个是 verdana 或 arial 或其他。在 /usr/share/fonts/X11/Type1/fonts.dir 中没有找到任何 verdana 条目。

这是我加载字体的代码:

font_name = HPDF_LoadType1FontFromFile (pdf, "/usr/share/fonts/type1/gsfonts/a010013l.afm",
  "/usr/share/fonts/type1/gsfonts/a010013l.pfb");

编辑: 看起来使用下一个函数调用可以解决问题:

font_name = HPDF_LoadTTFontFromFile (pdf,
  "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/Verdana.ttf", 
  HPDF_TRUE);

【问题讨论】:

  • msttcorefonts 是 TTF,不是 Type1。
  • 非常感谢,您为我指明了正确的方向))

标签: c linux libharu


【解决方案1】:

msttcorefonts 是 TTF,而不是 Type1。

【讨论】:

    猜你喜欢
    • 2014-12-11
    • 1970-01-01
    • 2016-09-22
    • 1970-01-01
    • 2020-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多