2

I'm trying to load Montserrat & FontAwesome from a local directory in conTeXt, while parsing markdown w/ pandoc.

Adding the font with mtxrun doesn't seem to work:

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

even trying to list the fonts afterwards with mtxrun --script fonts --list --all is unsuccessful.

Also generating a typescript seems to fail resulting in a mysterious 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

(with and without [features=default] or .otf on each \definefontsynonym) What am I doing wrong?

3
  • 1
    You can view my entire project on github: github.com/JKirchartz/resume/tree/context
    – JKirchartz
    Jul 16, 2017 at 16:37
  • 3
    To use fonts which are in the same directory as your document you have to use a typescript and the load the fonts by filename, e.g. \definefontsynonym [Serif] [file:myfontregular.otf] [features=defult]. Jul 16, 2017 at 17:23
  • @Metafox I tried creating typescripts as you suggested, but still cannot produce a PDF, instead of an error w/ a line number I now get a cryptic "pandoc: Error producing PDF"
    – JKirchartz
    Jul 16, 2017 at 21:35

1 Answer 1

2

The pandoc: Error producing PDF comes from your hilariously ill-formatted JKirchartz-Resume.md. The usage of \color is completely wrong and the rest just looks like markup hell.

To workaround part of the problems, I've filed a pull-request on your GitHub repo. Here is the commit message.

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.
1
  • Thanks, I'll look over this tonight -- I was converting this from a LaTeX project, and all that jazz worked over there.
    – JKirchartz
    Jul 17, 2017 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .