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).

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