Skip to content

POC + WIP: What's the best font for the workmark?#4627

Draft
seisman wants to merge 1 commit intopygmtlogofrom
pygmtlogo-font
Draft

POC + WIP: What's the best font for the workmark?#4627
seisman wants to merge 1 commit intopygmtlogofrom
pygmtlogo-font

Conversation

@seisman
Copy link
Copy Markdown
Member

@seisman seisman commented May 7, 2026

The "Space Grotesk" font used in the original PyGMT logo design (#1404 (comment)) looks great. However, this font is not available in GMT. If we want to use it, there are two possible approaches:

  1. Configure PyGMT to download and use the font dynamically, which would require an internet connection.
  2. Convert the glyphs of the font into polygons and render them using Figure.plot.

Option 2 is technically feasible, and the polygons could potentially be generated using AI tools such as ChatGPT. However, the resulting polygon data would likely be extremely complex and verbose.

Given these limitations, I think we will probably need to rely on the built-in GMT fonts instead. Currently, we use font 13 (AvantGarde-Book). I temporarily modified the source code to allow the wordmark font to be set dynamically and tested all available GMT fonts.

import pygmt

fig = pygmt.Figure()
with fig.subplot(nrows=5, ncols=8, subsize=("2.5c", "3c"), tag=0):
    for font in range(0, 34):
        with fig.set_panel(panel=font):
            fig.pygmtlogo(font=font, wordmark="vertical")
fig.show()
fig.savefig("logos-vertical.png")

fig = pygmt.Figure()
with fig.subplot(nrows=9, ncols=4, subsize=("9c", "2.5c"), tag=0):
    for font in range(0, 34):
        with fig.set_panel(panel=font):
            fig.pygmtlogo(font=font, wordmark="horizontal")
fig.show()
fig.savefig("logos-horizontal.png")

GMT Fonts: https://docs.generic-mapping-tools.org/dev/reference/postscript-fonts.html

Horizontal (the subplot tag is the font ID)

logos-horizontal

Vertical (the subplot tag is the font ID)

logos-vertical

@yvonnefroehlich
Copy link
Copy Markdown
Member

I also really like the font Space Grotesk by Florian Karsten, but I think it's much easier to use a font supported by GMT.
Also not sure about the copyright for this font (https://fonts.google.com/specimen/Space+Grotesk/license?preview.script=Latn).

@seisman
Copy link
Copy Markdown
Member Author

seisman commented May 8, 2026

The 34 GMT built-in fonts can be broadly divided into four groups:

  • Serif fonts: Times (4–7), Bookman (17–20), NewCenturySchlbk (25–28), and Palatino (29–32)
  • Sans-serif fonts: Helvetica (0–3), AvantGarde (13–16), and Helvetica-Narrow (21–24)
  • Monospace fonts: Courier (8–11)
  • Special fonts: Symbol (12) and ZapfChancery-MediumItalic (33)

Here are my thoughts on the font choices:

  • Monospace fonts are generally awkward for branding because the fixed-width spacing gives a typewriter or terminal-like appearance.
  • Serif fonts are more commonly associated with publication typography, books, and long-form reading rather than modern software branding.
  • Sans-serif fonts usually appear cleaner and more modern, and many software projects/packages (e.g., Python, xarray, seaborn, and pandas) also use sans-serif fonts in their logos or branding.
  • In the AvantGarde font family, I feel that the letter T is too thin compared to the other letters, making the wordmark appear slightly imbalanced.
  • For Helvetica or Helvetica-Narrow, the bold variants make the wordmark appear too heavy relative to the circular logo, while the italic variants look a little unnatural to me.

This leaves Helvetica (0) and Helvetica-Narrow (21) as the remaining candidates.

For the horizontal version, I do not particularly like the regular Helvetica font because the wordmark appears much wider than the circular logo (the width ratio is about 3.4:1), making the text visually dominant. In comparison, Helvetica-Narrow produces a more balanced composition between the icon and the wordmark (the width ratio is 2.7:1).

For the vertical version, however, the situation is reversed. Since the wordmark is placed below the logo, horizontal compactness becomes less important. In this layout, Helvetica-Narrow appears slightly too narrow relative to the circular logo, whereas the regular Helvetica font provides a more balanced overall appearance.

Of course, the balance could also be improved by adjusting the text size. Another possible solution is to use Helvetica-Narrow for the horizontal version and regular Helvetica for the vertical version. Since the two fonts belong to the same font family and are visually very similar, this approach would still maintain a consistent overall branding style while achieving better balance in each layout.

Here is a comparison of Helvetica, Helvetica-Narrow, and AvantGarde-Book:

import pygmt

fig = pygmt.Figure()
with fig.subplot(nrows=3, ncols=2, subsize=("10c,3c", "3.5c"), tag=True): 
    for font in ("Helvetica", "Helvetica-Narrow", "AvantGarde-Book"):
        for orientation in ("horizontal", "vertical"):
            with fig.set_panel(tag=font):
                fig.pygmtlogo(font=font, wordmark=orientation)
fig.show()
fig.savefig("logos.png")
logos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants