It looks like you have followed this documented process at 
https://sphinx-bootstrap-theme.readthedocs.io/en/latest/README.html#adding-custom-css
 
exactly, so I'm not sure if anything is broken there. 

Are you only changing the font family? I have found that it is difficult to 
get browsers to display an exact font because of browser default settings. 
This is especially true when viewing local files in a browser instead of 
viewing pages over http. I suggest you test with a more dramatic change, 
like turning the body text red or changing the size. 

If all else fails, there is another option for specifying the .css file in 
conf.py  by using the html_context option. Details are 
here: https://github.com/rtfd/sphinx_rtd_theme/issues/117


On Monday, March 13, 2017 at 5:33:28 AM UTC-4, Shubham Rathi wrote:
>
> I need to change the default font that sphinx renders my documentation in. 
> I'm using the sphinx_bootstrap_theme
>
> I've tried overriding the layout.html but that didnt work. How should I 
> fix this? 
>
> My steps:
>
> $ mkdir source/_templates
> $ touch source/_templates/layout.html
>
>
> Then, configure in “conf.py”:
>
> templates_path = ['_templates']
>
> Add a custom static media directory with a CSS file to override a style, 
> which in the demo would be something like:
>
> $ mkdir source/_static
> $ touch source/_static/my-styles.css
>
> Then, in “conf.py”, edit:
>
> html_static_path = ["_static"]
>
> Override template “source/_templates/layout.html” file configured as 
> above, but with the following code:
>
> {# Import the theme's layout. #}
> {% extends "!layout.html" %}
>
> {# Custom CSS overrides #}
> {% set bootswatch_css_custom = ['_static/my-styles.css'] %}
>
> Then, in the new file “source/_static/my-styles.css”, add any appropriate 
> styling
>
> body {
>   font: arial;
> }
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to