Skip to content

Conversation

seisman
Copy link
Member

@seisman seisman commented Aug 5, 2024

Description of proposed changes

Add the table of standard 35 postscript fonts to the Technical Reference, so that we don't have to visit the GMT documentation.

Preview:

xref: #2834

PyGMT supports the standard 35 PostScript fonts. The table below lists the 35 fonts with
font number and the font name.

| Font Number | Font Name | Font Number | Font Name |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table is added so that users can directly copy the font name. The figure is added so that users can choose the suitable font visually.

@seisman seisman marked this pull request as ready for review August 5, 2024 12:06
@seisman seisman added documentation Improvements or additions to documentation needs review This PR has higher priority and needs review. labels Aug 5, 2024
@seisman seisman added this to the 0.13.0 milestone Aug 5, 2024
@michaelgrund
Copy link
Member

Highly appreciate that the codes are now listed directly on the PyGMT site @seisman.

Co-authored-by: Michael Grund <[email protected]>
Co-authored-by: Yvonne Fröhlich <[email protected]>
Comment on lines 12 to 30
|-------------|----------------------------|-------------|----------------------------|
| 0 | Helvetica | 17 | Bookman-Demi |
| 1 | Helvetica-Bold | 18 | Bookman-DemiItalic |
| 2 | Helvetica-Oblique | 19 | Bookman-Light |
| 3 | Helvetica-BoldOblique | 20 | Bookman-LightItalic |
| 4 | Times-Roman | 21 | Helvetica-Narrow |
| 5 | Times-Bold | 22 | Helvetica-Narrow-Bold |
| 6 | Times-Italic | 23 | Helvetica-Narrow-Oblique |
| 7 | Times-BoldItalic | 24 | Helvetica-Narrow-BoldOblique |
| 8 | Courier | 25 | NewCenturySchlbk-Roman |
| 9 | Courier-Bold | 26 | NewCenturySchlbk-Italic |
| 10 | Courier-Oblique | 27 | NewCenturySchlbk-Bold |
| 11 | Courier-BoldOblique | 28 | NewCenturySchlbk-BoldItalic|
| 12 | Symbol | 29 | Palatino-Roman |
| 13 | AvantGarde-Book | 30 | Palatino-Italic |
| 14 | AvantGarde-BookOblique | 31 | Palatino-Bold |
| 15 | AvantGarde-Demi | 32 | Palatino-BoldItalic |
| 16 | AvantGarde-DemiOblique | 33 | ZapfChancery-MediumItalic |
| | | 34 | ZapfDingbats |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if I should change the table to display three fonts per row, to save some vertical spaces.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just changed my mind, and now I think two fonts per row matches the figure below and is better.

Comment on lines -18 to -20
For all supported octal codes and fonts see the GMT Technical Reference
:gmt-docs:`reference/octal-codes.html` and
:gmt-docs:`reference/postscript-fonts.html`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to remove this sentence because this gallery example should focus on "Typesetting text like symbols".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can reduce the sentence to:

For all supported fonts see :doc:`/techref/fonts`.

and move it up:

(less than 256 characters). Optionally, you can append
**+f**\ *font,outlinecolor* to select a particular font [Default is
:gmt-term:`FONT_ANNOT_PRIMARY`] and outline color [Default is black] as well
as **+j**\ *justify* to change the justification [Default is CM]. For all supported
fonts see :doc:`/techref/fonts`. The fill color of the text symbols can be set with
the ``fill`` parameter, and the outline width can be customized with the ``pen``
parameter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 9132a3f.

Comment on lines 12 to 30
|-------------|----------------------------|-------------|----------------------------|
| 0 | Helvetica | 17 | Bookman-Demi |
| 1 | Helvetica-Bold | 18 | Bookman-DemiItalic |
| 2 | Helvetica-Oblique | 19 | Bookman-Light |
| 3 | Helvetica-BoldOblique | 20 | Bookman-LightItalic |
| 4 | Times-Roman | 21 | Helvetica-Narrow |
| 5 | Times-Bold | 22 | Helvetica-Narrow-Bold |
| 6 | Times-Italic | 23 | Helvetica-Narrow-Oblique |
| 7 | Times-BoldItalic | 24 | Helvetica-Narrow-BoldOblique |
| 8 | Courier | 25 | NewCenturySchlbk-Roman |
| 9 | Courier-Bold | 26 | NewCenturySchlbk-Italic |
| 10 | Courier-Oblique | 27 | NewCenturySchlbk-Bold |
| 11 | Courier-BoldOblique | 28 | NewCenturySchlbk-BoldItalic|
| 12 | Symbol | 29 | Palatino-Roman |
| 13 | AvantGarde-Book | 30 | Palatino-Italic |
| 14 | AvantGarde-BookOblique | 31 | Palatino-Bold |
| 15 | AvantGarde-Demi | 32 | Palatino-BoldItalic |
| 16 | AvantGarde-DemiOblique | 33 | ZapfChancery-MediumItalic |
| | | 34 | ZapfDingbats |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just changed my mind, and now I think two fonts per row matches the figure below and is better.

@seisman seisman changed the title Add the list of 35 standard Postscript fonts to Technical Reference Document the supported 35 standard Postscript fonts in the Technical Reference section Aug 6, 2024
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. final review call This PR requires final review and approval from a second reviewer labels Aug 7, 2024
@seisman seisman merged commit b468769 into main Aug 8, 2024
@seisman seisman deleted the docs/fonts branch August 8, 2024 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants