Comments (6)
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.
It works, thanks! Provided, I set path like Path = fonts/
, since I keep the fonts in a subdirectory.
from bazel-latex.
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.
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.
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.
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)
- How to make use of the metropolis beamer theme? HOT 3
- Support for aarch64-linux
- Allow enabling of debug information
- Make kpsewhich a bazel binary as a sub target of the latex document
- Investigate if we can generate our own texmf.cnf per build target
- Bzlmod support
- Toolchain error HOT 2
- failure building using pdfpages package HOT 4
- Printing glossaries HOT 5
- mtheme package HOT 1
- xelatex HOT 3
- Failing to build with long filenames
- The example fails to build on Linux: `latexrun` `IndexError` HOT 4
- Support for tikz-3dplot HOT 1
- Updating TexLive HOT 13
- Unable to add pgfplots HOT 1
- Missing toolchain for arm based Macs HOT 3
- Add buildifier to pipeline
- make the viewer helper scripts file agnostic
- Switch CI to GitHub Actions HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-latex.