Docs: update Sphinx config and refactor single-page module RSTs.

This commit is contained in:
Nathan Williis 2024-12-03 13:20:06 +00:00
parent 7fadfa4e81
commit 10778cd2c2
11 changed files with 90 additions and 23 deletions

View File

@ -2,7 +2,14 @@
afmLib: Read and write Adobe Font Metrics files afmLib: Read and write Adobe Font Metrics files
############################################### ###############################################
.. rubric:: Overview:
:heading-level: 2
.. automodule:: fontTools.afmLib .. automodule:: fontTools.afmLib
:members:
:undoc-members:
.. autoclass:: fontTools.afmLib.AFM
:members: .. rubric:: Module members:
:heading-level: 2

View File

@ -2,5 +2,15 @@
agl: Interface to the Adobe Glyph List agl: Interface to the Adobe Glyph List
###################################### ######################################
.. rubric:: Overview:
:heading-level: 2
.. automodule:: fontTools.agl .. automodule:: fontTools.agl
:members: toUnicode, UV2AGL, AGL2UV :members:
:undoc-members:
:member-order: bysource
.. rubric:: Module members:
:heading-level: 2

View File

@ -38,15 +38,19 @@ extensions = [
"sphinx.ext.autosectionlabel", "sphinx.ext.autosectionlabel",
] ]
autodoc_mock_imports = ["gtk", "reportlab"] autodoc_mock_imports = ["gtk", "reportlab", "Quartz"]
autodoc_default_options = { autodoc_default_options = {
"members": True, "members": True,
"inherited-members": True, "inherited-members": False,
"show-inheritance": True, "show-inheritance": True,
"member-order": "bysource", "member-order": "bysource",
} }
# This option allows show-inheritace to work but not clutter up the output
# with the (surplus) full inheritance stack.
autodoc_inherit_docstrings = False
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"] templates_path = ["_templates"]

View File

@ -3,6 +3,5 @@ config: Configure fontTools
########################### ###########################
.. automodule:: fontTools.config .. automodule:: fontTools.config
:inherited-members:
:members: :members:
:undoc-members: :undoc-members:

View File

@ -87,12 +87,10 @@ License
fontTools is licensed under the `MIT license <https://github.com/fonttools/fonttools/blob/main/LICENSE>`_. Refer to the full text of the license for details. fontTools is licensed under the `MIT license <https://github.com/fonttools/fonttools/blob/main/LICENSE>`_. Refer to the full text of the license for details.
Table of Contents
-----------------
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 1
:caption: Library :hidden:
afmLib afmLib
agl agl
@ -108,6 +106,7 @@ Table of Contents
mtiLib mtiLib
otlLib/index otlLib/index
pens/index pens/index
qu2cu/index
subset/index subset/index
svgLib/index svgLib/index
t1Lib t1Lib
@ -115,7 +114,6 @@ Table of Contents
ttLib/index ttLib/index
ttx ttx
ufoLib/index ufoLib/index
unicode
unicodedata/index unicodedata/index
varLib/index varLib/index
voltLib/index voltLib/index

View File

@ -2,9 +2,12 @@
merge: Merge multiple fonts into one merge: Merge multiple fonts into one
#################################### ####################################
``fontTools.merge`` provides both a library and a command line interface .. rubric:: Overview:
:heading-level: 2
:mod:`fontTools.merge` provides both a library and a command line interface
(``fonttools merge``) for merging multiple fonts together. (``fonttools merge``) for merging multiple fonts together.
.. autoclass:: fontTools.merge.Merger .. autoclass:: fontTools.merge.Merger
:inherited-members:
:members: :members:
:undoc-members:

View File

@ -2,13 +2,27 @@
mtiLib: Read Monotype FontDame source files mtiLib: Read Monotype FontDame source files
########################################### ###########################################
FontTools provides support for reading the OpenType layout tables produced by .. rubric:: Overview
:heading-level: 2
FontTools provides support for reading the OpenType Layout tables produced by
Monotype's FontDame and Font Chef font editors. These tables are written in a Monotype's FontDame and Font Chef font editors. These tables are written in a
simple textual format. The ``mtiLib`` library parses these text files and creates simple textual format. The :py:mod:`mtiLib` library parses these text files and creates
table objects representing their contents. table objects representing their contents.
Additionally, ``fonttools mtiLib`` will convert a text file to TTX XML. Additionally, running the ``fonttools mtiLib`` command will convert a text file to TTX XML.
.. rubric:: Module members:
:heading-level: 2
.. autofunction:: fontTools.mtiLib.build
.. autofunction:: fontTools.mtiLib.main
.. automodule:: fontTools.mtiLib .. automodule:: fontTools.mtiLib
:members: build, main :members:
:undoc-members:
:exclude-members: build, main

View File

@ -2,7 +2,17 @@
t1Lib: Read and write PostScript Type 1 fonts t1Lib: Read and write PostScript Type 1 fonts
############################################# #############################################
.. rubric:: Overview:
:heading-level: 2
Note also that :mod:`t1Lib` supports some :doc:`optional </optional>`
external libraries.
.. automodule:: fontTools.t1Lib .. automodule:: fontTools.t1Lib
:inherited-members:
:members: :members:
:undoc-members: :undoc-members:
.. rubric:: Module members:
:heading-level: 2

View File

@ -2,7 +2,18 @@
tfmLib: Read TeX Font Metrics files tfmLib: Read TeX Font Metrics files
########################################### ###########################################
.. automodule:: fontTools.tfmLib .. rubric:: Overview
:heading-level: 2
.. autoclass:: fontTools.tfmLib.TFM
:members: .. automodule:: fontTools.tfmLib
:members: TFM
:undoc-members:
:exclude-members: TFMException
.. rubric:: Module contents:
:heading-level: 2
.. autoexception:: fontTools.tfmLib.TFMException

View File

@ -57,6 +57,5 @@ It is possible that different glyphs use the same name. If this happens, we forc
Because the order in which glyphs are stored inside the binary font is important, we maintain an ordered list of glyph names in the font. Because the order in which glyphs are stored inside the binary font is important, we maintain an ordered list of glyph names in the font.
.. automodule:: fontTools.ttx .. automodule:: fontTools.ttx
:inherited-members:
:members: :members:
:undoc-members: :undoc-members:

View File

@ -1,8 +1,20 @@
:orphan:
####### #######
unicode unicode
####### #######
.. rubric:: Overview:
:heading-level: 2
The :mod:`fonttools.unicode` module is a helper for
:mod:`fontTools.ttx` that provides access to Unicode data and manages
fallback support.
Note also that :mod:`unicode` supports some :doc:`optional </optional>`
external libraries.
.. automodule:: fontTools.unicode .. automodule:: fontTools.unicode
:inherited-members:
:members: :members:
:undoc-members: :undoc-members: