Fedora Account System
Red Hat Associate
Red Hat Customer
When I use the Fedora 42 python3-sphinx_rtd_theme package, a project configured to use sphinx_rtd_theme does not properly include the icons, instead of nice icons from FontAwesome, I get blank squares. I removed the Fedora package and installed sphinx_rtd_theme with pip, and things work properly. I checked the resulting generated files, and the one generated with sphinx_rtd_theme from pip has a different way of specifying the FontAwesome which appears to work properly. I suspect there's something wrong or modified within the Fedora 42 package that makes it incompatible. I have not yet been able to figure out whats wrong with the Fedora package vs the one available through pip. The versions appear to be the same 3.0.2 version. Reproducible: Always Steps to Reproduce: 1. Install python3-sphinx_rtd_theme 2. Create a documentation project with a conf.py that sets html_theme to "sphinx_rtd_theme" 3. Make the HTML documentation Actual Results: The resulting documentation does not load the FontAwesome font icons such as the home icon. Expected Results: The FontAwesome icons are included with the packaged documentation and work properly. Additional Information: I tested against the upstream sphinx_rtd_theme and things appear to work. The
Created attachment 2107609 [details] diff stat of output for a simple test project This is a diff stat generated by git diff --no-index --stat which shows the overall difference between using the Fedora package vs using the pip install.
It looks like the version with the pip package installs the FontAwesome files, which the python3-sphinx_rtd_theme does not: /dev/null => output-with-pip/html/_static/css/fonts/fontawesome-webfont.eot | Bin 0 -> 165742 bytes /dev/null => output-with-pip/html/_static/css/fonts/fontawesome-webfont.svg | 2671 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /dev/null => output-with-pip/html/_static/css/fonts/fontawesome-webfont.ttf | Bin 0 -> 165548 bytes /dev/null => output-with-pip/html/_static/css/fonts/fontawesome-webfont.woff | Bin 0 -> 98024 bytes /dev/null => output-with-pip/html/_static/css/fonts/fontawesome-webfont.woff2 | Bin 0 -> 77160 bytes In addition, the css/theme.css file has a different start. For the Fedora package it shows: @font-face{font-family:FontAwesome;src:local("FontAwesome"),url('/.sysassets/fonts/fontawesome/fontawesome-webfont.ttf') format("truetype");font-weight:400;font-style:normal}.fa,.icon,.rst-content But for the pip package it shows this: @font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fo ntawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("tru etype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content This includes several more fonts and points to the fonts/fontawesome* files that get included with the package. Somehow I suspect that this .sysassets folder isn't being populated properly by my sphinx build setup, and/or there's something wrong with the way the Fedora python package works. I also noticed that the actual python3-sphinx_rtd_theme package doesn't appear to include the font files in its RPM. The pip package does include the FontAwesome files directly in its pip package. I even noticed that Fedora has the fontawesome-webfont.ttf file in some of its fontawesome packages, but installing these doesn't seem to help either.
You're right the content of the package is different - we don't ship the font files in Fedora package. Fedora package should use the system FontAwesome, Lato, Roboto fonts. Some of the font formats are forbidden in Fedora (like woff): https://docs.fedoraproject.org/en-US/packaging-guidelines/Web_Assets/#_fonts This used to work. I'll investigate what happened.
I created a fresh installation of Fedora 42 and installed python3-sphinx_rtd_theme. It brought the required font packages with it: Package Arch Version Repository Installing: python3-sphinx_rtd_theme noarch 3.0.2-2.fc42 fedora Installing dependencies: fontawesome4-fonts noarch 1:4.7.0-24.fc42 fedora google-roboto-slab-fonts noarch 1.100263-0.25.20150923git.fc42 fedora lato-fonts noarch 2.015-23.fc42 fedora <snip> I created a new doc project with sphinx, built html with the theme. I checked the docs in firefox and chromium, both displayed fontawesome glyphs correctly. Please check if you have the font packages installed in your system. If you have another reproducer, feel free to share.
I double checked, and I do have all the fonts installed. @ksurma when you say "the fontawesome glyphs display correctly", how are you verifying that? When I build the doc, the fonts and files are not included in the assets. Does that mean it relies on system fonts for whoever is *viewing* the site? I loaded and viewed the resulting docs on a different system, as the one I built documentation on is a headless server. When using the standard python module, all of the fonts get included with the assets so all users get the glyphs working properly. I've attached the Makefile, index.rst and conf.py which reproduces for me. Based on the documentation you provided above about web assets, I had another thought: Perhaps something is wrong with my HTTP server so that it doesn't let users load the system fonts?
Created attachment 2107716 [details] conf.py conf.py for a sample test project which reproduces for me
Created attachment 2107717 [details] Makefile Makefile which I used to build the sphinx doc.
Created attachment 2107718 [details] index.rst stub index.rst file for sphinx doc.
I noticed that the system did not have web-asset-filesystem or web-asset-devel installed. I also noticed that httpd doesn't appear to have any configuration mapping /usr/share/web-assets into being available, so the .sysassets/fonts/* links don't appear to work. Any idea whats wrong there?
I also did not have web-assets-httpd installed. I'm not sure how/why those aren't dependencies that get installed automatically.
Installing web-assets-httpd and web-assets-filesystem fixed things so that I no longer need to redistribute the fonts within my documentation, so from my perspective this is resolved. I believe at a minimum python3-sphinx_rtd_theme should depend on web-assets-filesystem, and somehow web-assets-httpd needs to get installed too or other users will have this same issue.
(In reply to Jacob Keller from comment #5) > I double checked, and I do have all the fonts installed. @ksurma > when you say "the fontawesome glyphs display correctly", how are you > verifying that? When I build the doc, the fonts and files are not included > in the assets. Does that mean it relies on system fonts for whoever is > *viewing* the site? I loaded and viewed the resulting docs on a different > system, as the one I built documentation on is a headless server. When using > the standard python module, all of the fonts get included with the assets so > all users get the glyphs working properly. > > I've attached the Makefile, index.rst and conf.py which reproduces for me. > Based on the documentation you provided above about web assets, I had > another thought: Perhaps something is wrong with my HTTP server so that it > doesn't let users load the system fonts? Now I see this, thank you for detailed problem description. Fedora's copy of sphinx_rtd_theme serves mainly as a theme for RPM packages which choose to build documentation and place it in /usr/share/doc/... So, the expectation is that folks look at the built documentation locally using a browser of their choice. Thank you for the debugging session for your use case, I'll add a dependency on web-assets-httpd if httpd is installed, which should achieve the goal and make package more robust.
https://src.fedoraproject.org/rpms/python-sphinx_rtd_theme/pull-request/22
FEDORA-2025-8d44fccd48 (python-sphinx_rtd_theme-3.0.2-7.fc44) has been submitted as an update to Fedora 44. https://bodhi.fedoraproject.org/updates/FEDORA-2025-8d44fccd48
FEDORA-2025-8d44fccd48 (python-sphinx_rtd_theme-3.0.2-7.fc44) has been pushed to the Fedora 44 stable repository. If problem still persists, please make note of it in this bug report.