Here's the -V arguments I'm calling when running convert_via_pandoc with my custom Docker image. The -V margin-[side] arguments work perfectly, I can change them, or omit them, and those changes are reflected in the output PDF. But the -V fontfamily=helvet argument appears to be ignored.

Some portions are blurred for privacy (repo, -o output file path, input file path), see attached image from my action log.

Thanks for any help!

On Thursday, July 1, 2021 at 9:52:53 AM UTC-4 pedro....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
OK, there's something weird going on with Pandoc (not the Docker image). I created a test file with the following in the front matter:

---
fontfamily: helvet
header-includes:
- \renewcommand\familydefault{\sfdefault}
---

If I run `pandoc -o myfile.pdf`, it does NOT use Helvetica. However, if I run `pandoc -o myfile.tex` and then `pdflatex myfile`, the document DOES come out in Helvetica. Not sure where to go from here, though.


> Em 01/07/2021, à(s) 03:22, Shakrmaker <toj...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> escreveu:
>
> Oh, and further to my last post in this thread, this is what I see in the CLI on my custom Docker image also. Thanks in advance for any help!
>
> /opt/texlive/texmf-local # tlmgr info | grep "font pack"
> arphic: Arphic (Chinese) font packages
> i avantgar: URW "Base 35" font pack for LaTeX
> i bookman: URW "Base 35" font pack for LaTeX
> i collection-metapost: MetaPost and Metafont packages
> i courier: URW "Base 35" font pack for LaTeX
> grotesq: URW Grotesq font pack for LaTeX
> i helvetic: URW "Base 35" font pack for LaTeX
> mweights: Support for multiple-weight font packages
> i ncntrsbk: URW "Base 35" font pack for LaTeX
> i palatino: URW "Base 35" font pack for LaTeX
> i symbol: URW "Base 35" font pack for LaTeX
> i times: URW "Base 35" font pack for LaTeX
> wadalab: Wadalab (Japanese) font packages
> i zapfchan: URW "Base 35" font pack for LaTeX
> i zapfding: URW "Base 35" font pack for LaTeX
>
>
> On Wednesday, June 30, 2021 at 7:34:11 PM UTC-4 Shakrmaker wrote:
> Ok, well I built a custom docker image based on:
> pandoc/latex:2.14.0.3
>
> Then I did this in my custom Docker container, hoping I'd get at least some fonts installed. It appears to install quite a few, and exited normally.
> tlmgr install collection-fontsrecommended
>
> Then in my custom Docker container CLI, I do this, I look for Helvetica, and get this:
> /opt/texlive/texmf-local # tlmgr search --all "fonts" | grep helv
> helvetic - URW "Base 35" font pack for LaTeX
> helvetic:
> texmf-dist/fonts/afm/adobe/helvetic/phvb8a.afm
> texmf-dist/fonts/afm/adobe/helvetic/phvb8an.afm
> texmf-dist/fonts/afm/adobe/helvetic/phvbo8a.afm
> texmf-dist/fonts/afm/adobe/helvetic/phvbo8an.afm
> texmf-dist/fonts/afm/adobe/helvetic/phvr8a.afm
> ...etc
>
> I've pushed this custom Docker image to my repo on Docker Hub, and my GitHub Action in another repo loads my custom Docker image, and calls convert_via_pandoc with this arg
> -V fontfamily=helvet
>
> While it runs my custom Docker image, and converts the PDF, I still don't get Helvetica, I still get Latin Modern in the PDF. What am I doing wrong?
>
> Note: I can tell that "helvet" is the desired spelling. Since if I misspell it intentionally, or feed that -V fontamily argument some bogus font family name, the conversion will fail on the missing '.sty'.
>
> Is there something I still have to configure in my custom Docker container image to use that installed Helvetica font? Or should that tlmgr install collection-fontsrecommended have been sufficient?
>
> Thanks
>
> On Wednesday, June 30, 2021 at 3:10:32 PM UTC-4 Shakrmaker wrote:
> Thanks Pedro for confirming. I guess I will look at building a custom docker image with a basic sans serif font installed, and use and maintain that image going forward.
>
> On Wednesday, June 30, 2021 at 7:07:24 AM UTC-4 pedro....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> This is the normal behavior. Latin Modern comes packaged in LaTeX itself. If you need a different font, you can customize your own docker image based on the pandoc/latex image and install the appropriate package (installing packages at runtime has not worked for me), or use --pdf-engine=xelatex and map your fonts directory as a volume onto the docker container. In the latter case, you can no longer use the `uses:` syntax in GitHub Actions, but have to declare it with `run:`.
>
> Em quarta-feira, 30 de junho de 2021 às 05:11:25 UTC+1, Shakrmaker escreveu:
> Well, when I tried Elham my GitHub action run failed on the font, and when I check these in the factory local docker/latex 2.14.0.3 image, I seem to be coming up empty:
>
> # ls /usr/share/fonts
> ls: /usr/share/fonts: No such file or directory
> # ls /usr/local/share/fonts
> ls: /usr/local/share/fonts: No such file or directory
> # ls ~./fonts
> ls: ~./fonts: No such file or directory
> # fc-list
> #
>
> The interesting thing to a newbie like me - is where is pandoc getting its default Latin Modern from the docker/latex image? Since the docs say for this latex variable:
>
> https://pandoc.org/MANUAL.html#variables-for-latex > Fonts:
> "fontfamily font package for use with pdflatex: The default is Latin Modern."
>
> On Tuesday, June 29, 2021 at 11:50:21 PM UTC-4 Shakrmaker wrote:
> Well, if I'm doing this correctly... when I spin up the 2.14.0.3 docker/latex image and poke around, in:
> /usr/share/fontconfig/conf.avail/
>
> I see in: 40-nonlatin.conf:
>
> <!--
> Sans-serif faces
> -->
> <alias>
> <family>Arshia</family>
> <default><family>sans-serif</family></default>
> </alias>
> <alias>
> <family>Elham</family>
> <default><family>sans-serif</family></default>
> </alias>
>
> ...and a continued long list of sans serif ^ font family entries.
>
> Does this mean they're available as a GitHub Action arg with -V fontfamily=Elham, etc? I will try that out next.
>
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/XrbnaQl88Dk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to pandoc-discus...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f6a86403-c99d-41b3-8568-c4f6aef23812n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1e628991-6606-4d72-80c9-7489b9d08518n%40googlegroups.com.