]> git.baikalelectronics.ru Git - kernel.git/commitdiff
docs: improve readability for people with poorer eyesight
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 5 Oct 2018 01:06:03 +0000 (18:06 -0700)
committerJonathan Corbet <corbet@lwn.net>
Sun, 7 Oct 2018 15:16:50 +0000 (09:16 -0600)
My eyesight is not in good shape, which means that I have difficulty
reading the online Linux documentation.  Specifically, body text is
oddly small compared to list items and the contrast of various text
elements is too low for me to be able to see easily.

Therefore, alter the HTML theme overrides to make the text larger and
increase the contrast for better visibility, and trust the typeface
choices of the reader's browser.

For the PDF output, increase the text size, use a sans-serif typeface
for sans-serif text, and use a serif typeface for "roman" serif text.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/conf.py
Documentation/sphinx-static/theme_overrides.css

index b691af4831fadcae3b43e51c498a2469a5b6a8da..89946361e5455defb96a26ed3809006bc422aa99 100644 (file)
@@ -259,7 +259,7 @@ latex_elements = {
 'papersize': 'a4paper',
 
 # The font size ('10pt', '11pt' or '12pt').
-'pointsize': '8pt',
+'pointsize': '11pt',
 
 # Latex figure (float) alignment
 #'figure_align': 'htbp',
@@ -272,8 +272,8 @@ latex_elements = {
     'preamble': '''
        % Use some font with UTF-8 support with XeLaTeX
         \\usepackage{fontspec}
-        \\setsansfont{DejaVu Serif}
-        \\setromanfont{DejaVu Sans}
+        \\setsansfont{DejaVu Sans}
+        \\setromanfont{DejaVu Serif}
         \\setmonofont{DejaVu Sans Mono}
 
      '''
index 522b6d4c49d4cf64e055b9ecf821f1883365f3af..e21e36cd6761796e7832b454b504f5a938e011e7 100644 (file)
@@ -4,6 +4,44 @@
  *
  */
 
+/* Improve contrast and increase size for easier reading. */
+
+body {
+       font-family: serif;
+       color: black;
+       font-size: 100%;
+}
+
+h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend {
+       font-family: sans-serif;
+}
+
+.wy-menu-vertical li.current a {
+       color: #505050;
+}
+
+.wy-menu-vertical li.on a, .wy-menu-vertical li.current > a {
+       color: #303030;
+}
+
+div[class^="highlight"] pre {
+       font-family: monospace;
+       color: black;
+       font-size: 100%;
+}
+
+.wy-menu-vertical {
+       font-family: sans-serif;
+}
+
+.c {
+       font-style: normal;
+}
+
+p {
+       font-size: 100%;
+}
+
 /* Interim: Code-blocks with line nos - lines and line numbers don't line up.
  * see: https://github.com/rtfd/sphinx_rtd_theme/issues/419
  */