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
###############################################
.. rubric:: Overview:
:heading-level: 2
.. 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
######################################
.. rubric:: Overview:
:heading-level: 2
.. 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",
]
autodoc_mock_imports = ["gtk", "reportlab"]
autodoc_mock_imports = ["gtk", "reportlab", "Quartz"]
autodoc_default_options = {
"members": True,
"inherited-members": True,
"inherited-members": False,
"show-inheritance": True,
"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.
templates_path = ["_templates"]

View File

@ -3,6 +3,5 @@ config: Configure fontTools
###########################
.. automodule:: fontTools.config
:inherited-members:
: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.
Table of Contents
-----------------
.. toctree::
:maxdepth: 2
:caption: Library
:maxdepth: 1
:hidden:
afmLib
agl
@ -108,6 +106,7 @@ Table of Contents
mtiLib
otlLib/index
pens/index
qu2cu/index
subset/index
svgLib/index
t1Lib
@ -115,7 +114,6 @@ Table of Contents
ttLib/index
ttx
ufoLib/index
unicode
unicodedata/index
varLib/index
voltLib/index

View File

@ -2,9 +2,12 @@
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.
.. autoclass:: fontTools.merge.Merger
:inherited-members:
:members:
:undoc-members:

View File

@ -2,13 +2,27 @@
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
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.
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
:members: build, main
:members:
:undoc-members:
:exclude-members: build, main

View File

@ -2,7 +2,17 @@
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
:inherited-members:
:members:
:undoc-members:
.. rubric:: Module members:
:heading-level: 2

View File

@ -2,7 +2,18 @@
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.
.. automodule:: fontTools.ttx
:inherited-members:
:members:
:undoc-members:

View File

@ -1,8 +1,20 @@
:orphan:
#######
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
:inherited-members:
:members:
:undoc-members: