Git Product home page Git Product logo

Comments (6)

mickael-carl avatar mickael-carl commented on May 20, 2024

You will likely need to specify the full path to the font, e.g.:

\setmainfont[
    Path = ./,
    Extension = .ttf,
    Ligatures = TeX,
    BoldFont = Carlito-Bold,
    ItalicFont = Carlito-Italic,
]{Carlito-Regular}

and in your BUILD.bazel file:

latex_document(
    name = "foo",
    main = "main.tex",
    srcs = "glob(["*.ttf"]) + [
        ... other dependencies go here ....
    ],
)

Provided you copied the TTFs in your project. Can you give this a try? I just gave it a shot and it seemed to have worked for me.

from bazel-latex.

EvyBongers avatar EvyBongers commented on May 20, 2024

It works, thanks! Provided, I set path like Path = fonts/, since I keep the fonts in a subdirectory.

from bazel-latex.

EdSchouten avatar EdSchouten commented on May 20, 2024

Hmmm... Interesting. I can get the following document to build out of the box, only depending on //packages:fontspec:

\documentclass{report}
\usepackage{fontspec}
\setmainfont{Carlito}
\begin{document}
\chapter{This is a chapter}
\section{This is a section}
\textbf{This} \textit{document} uses Carlito!
\end{document}

from bazel-latex.

mickael-carl avatar mickael-carl commented on May 20, 2024

Same for me now with the font globally installed. Though I do wonder if relying on system font is a good idea.

from bazel-latex.

EvyBongers avatar EvyBongers commented on May 20, 2024

Does that example work when building against buildbarn-docker? I have the font globally installed, but the build failed as soon as I attempt to build it against the cluster. I'm assuming that this is because the font isn't installed on the build images.

Then again, even when building locally, I'd say that bazel-latex shouldn't rely on system-installed fonts. This kills reproducability.

from bazel-latex.

EdSchouten avatar EdSchouten commented on May 20, 2024

Oh, wait. I didn't test this against Buildbarn; just a direct build. Will try to figure out why this breaks.

from bazel-latex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.