Documentation issues

I will likely come back here and dump stuff that I find for fixing.

The documentation is overall slightly messy, somewhat incomplete. Hence it would be nice if inconsistencies could be minimised as much as possible.

Question: Have you thought about improving the system how the documentation is generated? I asked that before but never really got answers. Maybe it could be improved from the ground up, maybe keeping things in mind like update-ability that is closer to the source and maybe also compatibility with documentation styles that are more common and hence could be implemented in apps like Dash.


GSFont.instances > Sample code says

# to delete an axis

:red_circle:# to delete an axis
:green_circle:# to delete an instance



There is inconsistency between del <something> and del(<something>). This is a bit confusing, especially for less experienced users. Please consider choosing one and updating the documentation.


Whenever there are several ways to delete something, for example:

# or

Consider presenting only one optimal way. This also causes confusion.

  • .remove() seems to be added to the wrapper, while del appears to be legacy. (?)
  • if remove() cannot handle deleting instances by index from the font (as del shows), consider adding that to the wrapper.

Please consider adding an “equivalent to” to the comments.



GSInstance.customParameters > Sample code has some quotes too many (or too few)

# 👇 here you see it easily, where the syntax highlighting goes loco.

parameter = GSCustomParameter("Name Table Entry", "1 1;"font name")
parameter = GSCustomParameter("Name Table Entry", "2 1;"style name")


The sample code shows how to add the CP to the Font but it is under GSInstance. To avoid confusion, consider sorting that out. Either change it here, or move it to GSFont . Or show both in both places and add a comment that it can be added to font or instance.


Consider unifying quote style. Either double or single. The sample code from point 3 has even both in one block.


  • [ ] 1
  • [ ] 2a
  • [ ] 2b
  • [ ] 3a
  • [ ] 3b
  • [ ] 4

Hmm. These are two pythonesque ways of removing items from a list, by index or by object. See 5. Data Structures — Python 3.11.4 documentation

1 Like

Fair enough. Then please consider adding an “equivalent to” to the comments. (added this above).

If you have a better idea I’m listening. Right now the documentation is generated from the source code of the python wrapper. It doesn’t get much closer.

That are two different things.
The first line removes based on the index/key, the second remove an actual item. Why del and len is still a keyword and print isn’t is beyond me. But that it is in python. del is not legacy.

They are not equivalent.

The wrapper file is in the GlyphsSDK. I just updated it with from the 3.2 branch (after I incorporated your suggestion).

You can check the code and fix it yourself if you like :wink:

Thanks a lot. I’ll have a look and report back :green_heart: