Repository navigation
Update web font - #934
Update web font#934maxrjones wants to merge 3 commits into
Conversation
|
Looks good with Microsft Edge, Google Chrome, Safari, and Firefox on macOS. |
|
From my limited knowledge of web design, I think we could serve the actual webfont file and then it should work regardless of platform. |
|
Google Fonts makes it really easy to test sentences containing I and l. |
|
What about IBM Plex Sans? It differentiates lower-case L and upper-case I even more: To use one of the many Google Fonts, we could either:
In either case we don't have to bank on folks having the font installed locally, I think. |
|
I am not knowledgeable enough about licensing to know whether it's an option to ship fonts with PyGMT. In the python packages that I use most often, I have noticed fonts included for logos (e.g., matplotlib) but generally not for the main docs. |
Yeah, I think option 1) is pretty standard and likely makes more sense to keep the repo smaller etc. All Google Fonts are open-source: https://developers.google.com/fonts/faq#can_i_use_fonts_from_the_google_fonts_catalog_on_any_page Edit: Looks like Google actually recommends using an HTML link: https://developers.google.com/fonts/faq#will_web_fonts_slow_down_my_page |
Most Google services and sites are blocked in China 😞. I'd appreciate it if we can avoid using these external font resources. |
Co-authored-by: Liam Toney <[email protected]>
Shoot, I didn't realize. Good point. |
|
I made a branch This setup does not use Google. IBM Plex Sans is licensed under OFL, meaning it's free to use and serve etc. Many fonts fall into this category. Font files are about 300 KB in total so not much of an impact on repo size I think. Serving the font guarantees that all users see the same thing (I think). I think this looks pretty nice, but I'm a bit of an aesthete... |
Yes. |
|
I opened #936 so we can get a preview. We can keep discussion here though (as I note in that PR). Edit: Preview link: https://pygmt-ocupv4u4w.vercel.app/ |
I feel like the small letter I (i) looks too much like a small letter L (l), not enough spacing between the dot of the small letter i with the lower vertical part 😅 |
|
I see what you mean. Maybe worse on lower-resolution screens? Though that could be a case for a lot of fonts. |



Description of proposed changes
This PR serves to preview different web font options based on the discussion at #933.
Fixes #933
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version