pytorch_sphinx_theme icon indicating copy to clipboard operation
pytorch_sphinx_theme copied to clipboard

Missing fonts

Open adamjstewart opened this issue 4 years ago • 4 comments

When I use this theme to render my project documentation on Read the Docs, I see many errors related to missing fonts, and the font doesn't get rendered correctly:

Screen Shot 2021-09-03 at 10 00 28 AM

Documentation source code can be found at: https://github.com/microsoft/torchgeo/tree/main/docs

Documentation can be found at: https://torchgeo.readthedocs.io/en/latest/

Am I supposed to ship these fonts myself?

@calebrob6

adamjstewart avatar Sep 03 '21 15:09 adamjstewart

It seems these are shipped with pytorch_sphinx_theme under pytorch_sphinx_theme/static/fonts, not sure why they aren't being installed.

adamjstewart avatar Sep 03 '21 15:09 adamjstewart

Hmm, they are being installed. Is the theme just looking in the wrong location for them?

adamjstewart avatar Sep 03 '21 15:09 adamjstewart

If I move my requirements.txt to the docs directory and install pytorch_sphinx_theme in editable mode:

-e git+https://github.com/pytorch/pytorch_sphinx_theme#egg=pytorch_sphinx_theme

then the fonts get installed to the location that the theme expects (docs/_static/fonts). However, I don't think this should be necessary, and isn't necessary for other Sphinx themes.

adamjstewart avatar Sep 03 '21 15:09 adamjstewart

The reason is that they don't upload codes to PYPI any longer, and the version on PYPI is 3 years ago and already out-of-date.

Codes in current repository (v0.0.24) are working fine, so it works if you clone the repo and build a binary wheel to install based on the current codes. But the current binary wheel file uploaded to Pypi (v0.0.19) doesn't contain the font files as package data.

Current codes has the package data claimed in setup.py that includes the font files: https://github.com/pytorch/pytorch_sphinx_theme/blob/b4d00058a48604d8fb63771b513a50450f0ee188/setup.py#L22

If you install from github repo, you will have the up-to-date source codes and files including the font files. But if you simply use pip install pytorch-sphinx-theme, then you'll get the v0.0.19 which is uploaded 3 years ago.

ain-soph avatar Oct 04 '21 16:10 ain-soph