从 ConTeXt 目录加载字体

从 ConTeXt 目录加载字体

我正在尝试从 conTeXt 中的本地目录加载 Montserrat 和 FontAwesome,同时使用 pandoc 解析 markdown。

添加字体mtxrun似乎不起作用:

export OSFONTDIR=$(pwd)/in/fonts/
mtxrun --script fonts --reload

甚至随后尝试列出字体也mtxrun --script fonts --list --all失败了。

生成打字稿似乎也失败了,导致出现一个神秘的情况pandoc: Error producing PDF

\usemodule[simplefonts][size=12pt]

\startenvironment montserrat
        \starttypescript[montserrat]
                \definefontsynonym [Sans] [file:Montserrat-Light.otf]
                \definefontsynonym [SansBold] [file:Montserrat-Bold.otf]
        \stoptypescript
\stopenvironment

\setmainfont[Sans]

\startenvironment fontawesome
        \starttypescript[fontawesome]
                \definefontsynonym [FA] [file:FontAwesome.otf]
        \stoptypescript
\stopenvironment

(有或没有[features=default].otf每个\definefontsynonym)我做错了什么?

答案1

来自pandoc: Error producing PDF您可笑的格式错误的JKirchartz-Resume.md。 的使用\color完全是错误的,其余部分看起来就像标记地狱。

为了解决部分问题,我提交了一个拉取请求在您的 GitHub 存储库上。以下是提交消息。

In response to https://tex.stackexchange.com/questions/380902

* Delete all the fonts.  They are all part of TeXlive and this do not have to
  be bundled.

* Make a typescript for the Montserrat fonts with the Light variant as default.

* Remove the (wrong) typescript for FontAwesome and just use the built-in
  symbol set.  Then adapt the definition of all the symbols.

* The usage of \color in JKirchartz-Resume.md is completely wrong.  To obtain
  the desired behaviour, monkey-patch it to be \directcolor.

相关内容