ckoerber / luescher-nd

This repository supports the publication https://arxiv.org/abs/1912.04425
https://ckoerber.github.io/luescher-nd/
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Font not found #20

Closed evanberkowitz closed 5 years ago

evanberkowitz commented 5 years ago

When I do ./ERE-unitarity I get

findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.

I can try to fix this or we can try to pick a more specific font family?

ckoerber commented 5 years ago

I get the same error (I was hoping that it was an issue on my end). The idea was to match the font of the paper which is apparently computer modern. There is an option to actually LaTeX compile fonts into figure pdfs, but this increases the file size by more than 100kB.

If you know a way to easily match paper font type (and possibly size) without increasing the file size too much, please go ahead. In the worst case, we can still drop the font options

evanberkowitz commented 5 years ago

I'm actually happy with the sans-serif font. But if we go that way then we should pick one we mean, rather than just let python pick some default guy.

evanberkowitz commented 5 years ago

I tried doing a system install of Computer Modern (so it'd be available outside of TeX), to no avail.

I tried a manual install, as well as


brew tap caskroom/fonts
brew cask install font-computer-modern```
evanberkowitz commented 5 years ago

This seems to have gone away (I don't know what changed). However, the output of counterterm-nstep.py has a weird font mismatch. The numbers on the y-axes are serif while the numbers on the x-axes match the san-serif font of the other plots. I can't tell where how this difference arises. I thought it must be because of the exponents in the lower plot, but that doesn't explain the upper plot.

ckoerber commented 5 years ago

I think I have figured out to make it work in latex (export as pgf). There is a new branch (new-plots) for plotting I will merge in as soon as we have the new plots.

ckoerber commented 5 years ago

It seems to me that we have to solutions for consistent font export

  1. Use the maplotlib pgf backend.
  2. Write every text as math and actual text as mathrms.

Not using pdf has the advantage that it's WYSIWYG.

ckoerber commented 5 years ago

With commit 3da51c2e2a244c86568e4e96f74697fe126da4a6, the plots are now exported as pgfs and should thus resolve the font issues.