From a020857c922953a378e66fba939d85a23cae3e31 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 17:29:33 +0800 Subject: [PATCH 01/14] Add the list of 35 standard Postscript fonts to Technical Reference --- doc/techref/fonts.md | 15 +++++++++++++++ examples/gallery/symbols/text_symbols.py | 5 ++--- examples/tutorials/basics/text.py | 6 +++--- 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 doc/techref/fonts.md diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md new file mode 100644 index 00000000000..08b5a067e50 --- /dev/null +++ b/doc/techref/fonts.md @@ -0,0 +1,15 @@ +# Supported Fonts + +PyGMT (and GMT) supports the standard 35 PostScript fonts. + +## Standard PostScript Fonts + +The table below lists the standard 35 PostScript fonts that are supported by GMT and PyGMT. +The table shows the font number, the font name, and a sample of the font. + +![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/reference/postscript-fonts.html) + +For the special fonts Symbol (12) and ZapfDingbats (34), see the :doc:`/techref/encodings` for the character set. + +When specifying fonts in GMT, you can either give the entire font name or +just the font number listed in this table. For example, to use the Helvetica font, you can use either `Helvetica` or `0`. diff --git a/examples/gallery/symbols/text_symbols.py b/examples/gallery/symbols/text_symbols.py index e7caeabce38..50e7c732eac 100644 --- a/examples/gallery/symbols/text_symbols.py +++ b/examples/gallery/symbols/text_symbols.py @@ -15,9 +15,8 @@ as **+j**\ *justify* to change the justification [Default is CM]. 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. -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`. +For all supported octal codes and fonts see :doc:`/techref/encodings` and +:doc:`/techref/fonts`. """ # %% diff --git a/examples/tutorials/basics/text.py b/examples/tutorials/basics/text.py index 37b8cb4dc20..782b27a9f82 100644 --- a/examples/tutorials/basics/text.py +++ b/examples/tutorials/basics/text.py @@ -31,9 +31,9 @@ # There are several optional parameters to adjust the text label: # # * ``font``: Sets the size, family/weight, and color of the font for the text. -# A list of all recognized fonts can be found at -# :gmt-docs:`PostScript Fonts Used by GMT `, -# including details of how to use non-default fonts. +# A list of all recognized fonts can be found at :doc:`/techref/fonts`. +# For details of how to use non-default fonts, refer to +# :gmt-docs:`PostScript Fonts Used by GMT `. # * ``angle``: Specifies the rotation of the text. It is measured counter-clockwise # from the horizontal in degrees. # * ``justify``: Defines the anchor point of the bounding box for the text. It is From 811f6e9577347756d96b8bdaa0afdfb17c488f21 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 18:37:08 +0800 Subject: [PATCH 02/14] Add the table --- doc/techref/fonts.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index 08b5a067e50..f01871d5c8b 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -5,6 +5,45 @@ PyGMT (and GMT) supports the standard 35 PostScript fonts. ## Standard PostScript Fonts The table below lists the standard 35 PostScript fonts that are supported by GMT and PyGMT. + +| Font Number | Font Name | +|-------------|----------------------------| +| 0 | Helvetica | +| 1 | Helvetica-Bold | +| 2 | Helvetica-Oblique | +| 3 | Helvetica-BoldOblique | +| 4 | Times-Roman | +| 5 | Times-Bold | +| 6 | Times-Italic | +| 7 | Times-BoldItalic | +| 8 | Courier | +| 9 | Courier-Bold | +| 10 | Courier-Oblique | +| 11 | Courier-BoldOblique | +| 12 | Symbol | +| 13 | AvantGarde-Book | +| 14 | AvantGarde-BookOblique | +| 15 | AvantGarde-Demi | +| 16 | AvantGarde-DemiOblique | +| 17 | Bookman-Demi | +| 18 | Bookman-DemiItalic | +| 19 | Bookman-Light | +| 20 | Bookman-LightItalic | +| 21 | Helvetica-Narrow | +| 22 | Helvetica-Narrow-Bold | +| 23 | Helvetica-Narrow-Oblique | +| 24 | Helvetica-Narrow-BoldOblique | +| 25 | NewCenturySchlbk-Roman | +| 26 | NewCenturySchlbk-Italic | +| 27 | NewCenturySchlbk-Bold | +| 28 | NewCenturySchlbk-BoldItalic | +| 29 | Palatino-Roman | +| 30 | Palatino-Italic | +| 31 | Palatino-Bold | +| 32 | Palatino-BoldItalic | +| 33 | ZapfChancery-MediumItalic | +| 34 | ZapfDingbats | + The table shows the font number, the font name, and a sample of the font. ![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/reference/postscript-fonts.html) From 23ace6db84a1e4a02ac06c26cc10e74bbeb9b411 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 18:37:23 +0800 Subject: [PATCH 03/14] Fix image link --- doc/techref/fonts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index f01871d5c8b..965f0005e6a 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -46,7 +46,7 @@ The table below lists the standard 35 PostScript fonts that are supported by GMT The table shows the font number, the font name, and a sample of the font. -![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/reference/postscript-fonts.html) +![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png) For the special fonts Symbol (12) and ZapfDingbats (34), see the :doc:`/techref/encodings` for the character set. From bba62b73236a8770bdfaecdb1dd7a7812b1ad938 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 18:48:56 +0800 Subject: [PATCH 04/14] Convert the table into two columns to save vertical spaces --- doc/techref/fonts.md | 58 ++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 37 deletions(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index 965f0005e6a..4e1bb351ec7 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -6,43 +6,27 @@ PyGMT (and GMT) supports the standard 35 PostScript fonts. The table below lists the standard 35 PostScript fonts that are supported by GMT and PyGMT. -| Font Number | Font Name | -|-------------|----------------------------| -| 0 | Helvetica | -| 1 | Helvetica-Bold | -| 2 | Helvetica-Oblique | -| 3 | Helvetica-BoldOblique | -| 4 | Times-Roman | -| 5 | Times-Bold | -| 6 | Times-Italic | -| 7 | Times-BoldItalic | -| 8 | Courier | -| 9 | Courier-Bold | -| 10 | Courier-Oblique | -| 11 | Courier-BoldOblique | -| 12 | Symbol | -| 13 | AvantGarde-Book | -| 14 | AvantGarde-BookOblique | -| 15 | AvantGarde-Demi | -| 16 | AvantGarde-DemiOblique | -| 17 | Bookman-Demi | -| 18 | Bookman-DemiItalic | -| 19 | Bookman-Light | -| 20 | Bookman-LightItalic | -| 21 | Helvetica-Narrow | -| 22 | Helvetica-Narrow-Bold | -| 23 | Helvetica-Narrow-Oblique | -| 24 | Helvetica-Narrow-BoldOblique | -| 25 | NewCenturySchlbk-Roman | -| 26 | NewCenturySchlbk-Italic | -| 27 | NewCenturySchlbk-Bold | -| 28 | NewCenturySchlbk-BoldItalic | -| 29 | Palatino-Roman | -| 30 | Palatino-Italic | -| 31 | Palatino-Bold | -| 32 | Palatino-BoldItalic | -| 33 | ZapfChancery-MediumItalic | -| 34 | ZapfDingbats | +| Font Number | Font Name | Font Number | Font Name | +|-------------|----------------------------|-------------|----------------------------| +| 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 | + The table shows the font number, the font name, and a sample of the font. From 143ecfed1fd51ad8022bca7e44635ef41cad9eeb Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 18:49:55 +0800 Subject: [PATCH 05/14] Add to toctree --- doc/techref/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/techref/index.md b/doc/techref/index.md index 8ffd22fd851..dd4c9782a3c 100644 --- a/doc/techref/index.md +++ b/doc/techref/index.md @@ -9,5 +9,6 @@ visit the {gmt-docs}`GMT Technical Reference `. :maxdepth: 1 projections.md +fonts.md encodings.md ``` From 323cf483d22246ed63d62f50fb0e3b3be753bd5b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 18:50:30 +0800 Subject: [PATCH 06/14] Use markdown syntax --- doc/techref/fonts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index 4e1bb351ec7..1b647225eb2 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -32,7 +32,7 @@ The table shows the font number, the font name, and a sample of the font. ![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png) -For the special fonts Symbol (12) and ZapfDingbats (34), see the :doc:`/techref/encodings` for the character set. +For the special fonts Symbol (12) and ZapfDingbats (34), see the {doc}`/techref/encodings` for the character set. When specifying fonts in GMT, you can either give the entire font name or just the font number listed in this table. For example, to use the Helvetica font, you can use either `Helvetica` or `0`. From f8face5c312868c87b1e8affe9e81babf3840857 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 5 Aug 2024 19:49:59 +0800 Subject: [PATCH 07/14] Updates --- doc/techref/fonts.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index 1b647225eb2..e44f99624e4 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -1,10 +1,7 @@ # Supported Fonts -PyGMT (and GMT) supports the standard 35 PostScript fonts. - -## Standard PostScript Fonts - -The table below lists the standard 35 PostScript fonts that are supported by GMT and PyGMT. +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 | |-------------|----------------------------|-------------|----------------------------| @@ -27,12 +24,13 @@ The table below lists the standard 35 PostScript fonts that are supported by GMT | 16 | AvantGarde-DemiOblique | 33 | ZapfChancery-MediumItalic | | | | 34 | ZapfDingbats | +The figure below shows a visual sample for each font. -The table shows the font number, the font name, and a sample of the font. - -![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png) +![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){.align-center width="80%"} -For the special fonts Symbol (12) and ZapfDingbats (34), see the {doc}`/techref/encodings` for the character set. +For the special fonts Symbol (12) and ZapfDingbats (34), see the {doc}`/techref/encodings` +for the character set. -When specifying fonts in GMT, you can either give the entire font name or -just the font number listed in this table. For example, to use the Helvetica font, you can use either `Helvetica` or `0`. +When specifying fonts in GMT, you can either give the entire font name or just the font +number listed in this table. For example, to use the Helvetica font, you can use either +`Helvetica` or `0`. From 26bdcd5798081dc6037af5b6d101a414211e2386 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 6 Aug 2024 00:36:51 +0800 Subject: [PATCH 08/14] Update doc/techref/fonts.md Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> --- doc/techref/fonts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index e44f99624e4..0ad96e8f06e 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -1,6 +1,6 @@ # Supported Fonts -PyGMT supports the standard 35 PostScript fonts. The table below lists the 35 fonts with +PyGMT supports the 35 standard PostScript fonts. The table below lists the 35 fonts with font number and the font name. | Font Number | Font Name | Font Number | Font Name | From a6ace918cd3141e26161c3f2db0ab5330fc3b994 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 6 Aug 2024 06:44:01 +0800 Subject: [PATCH 09/14] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com> --- doc/techref/fonts.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index 0ad96e8f06e..94c9914bf43 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -1,7 +1,12 @@ # Supported Fonts -PyGMT supports the 35 standard PostScript fonts. The table below lists the 35 fonts with -font number and the font name. +PyGMT supports the 35 standard PostScript fonts. The table below lists them with their +font numbers and font names. When specifying fonts in PyGMT, you can either give the +entire font name or just the font number. For example, to use the font "Helvetica", you +can use either `"Helvetica"` or `"0"`. +For the special fonts "Symbol" (12) and "ZapfDingbats" (34), see the {doc}`/techref/encodings` +for the character set. +The image below the table shows a visual sample for each font. | Font Number | Font Name | Font Number | Font Name | |-------------|----------------------------|-------------|----------------------------| @@ -24,13 +29,5 @@ font number and the font name. | 16 | AvantGarde-DemiOblique | 33 | ZapfChancery-MediumItalic | | | | 34 | ZapfDingbats | -The figure below shows a visual sample for each font. - -![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){.align-center width="80%"} - -For the special fonts Symbol (12) and ZapfDingbats (34), see the {doc}`/techref/encodings` -for the character set. +![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){.align-left width="80%"} -When specifying fonts in GMT, you can either give the entire font name or just the font -number listed in this table. For example, to use the Helvetica font, you can use either -`Helvetica` or `0`. From 1dca229ab92f15a4d3578e84592e492188590195 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 6 Aug 2024 11:16:13 +0800 Subject: [PATCH 10/14] Update the font table --- doc/techref/fonts.md | 52 +++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index 94c9914bf43..bfd3d276b19 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -1,33 +1,31 @@ # Supported Fonts PyGMT supports the 35 standard PostScript fonts. The table below lists them with their -font numbers and font names. When specifying fonts in PyGMT, you can either give the -entire font name or just the font number. For example, to use the font "Helvetica", you -can use either `"Helvetica"` or `"0"`. -For the special fonts "Symbol" (12) and "ZapfDingbats" (34), see the {doc}`/techref/encodings` -for the character set. +font numbers and font names. When specifying fonts in PyGMT, you can either give the +font name or just the font number. For example, to use the font "Helvetica", you can use +either `"Helvetica"` or `"0"`. For the special fonts "Symbol" (**12**) and +"ZapfDingbats" (**34**), see the {doc}`/techref/encodings` for the character set. The image below the table shows a visual sample for each font. -| Font Number | Font Name | Font Number | Font Name | -|-------------|----------------------------|-------------|----------------------------| -| 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 | - -![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){.align-left width="80%"} +| Font No. | Font Name | Font No. | Font Name | +|----------|------------------------|----------|------------------------------| +| 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 | +![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){width="80%"} From ca052d696a6bd92c857e4a1ae718293cf94025f6 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 6 Aug 2024 11:18:02 +0800 Subject: [PATCH 11/14] Remove the sentence about octal codes and fonts from the text symbol example --- examples/gallery/symbols/text_symbols.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/gallery/symbols/text_symbols.py b/examples/gallery/symbols/text_symbols.py index 50e7c732eac..1f72a6886c2 100644 --- a/examples/gallery/symbols/text_symbols.py +++ b/examples/gallery/symbols/text_symbols.py @@ -15,8 +15,6 @@ as **+j**\ *justify* to change the justification [Default is CM]. 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. -For all supported octal codes and fonts see :doc:`/techref/encodings` and -:doc:`/techref/fonts`. """ # %% From 9132a3f79a7f6529b25fcad1584a0d5302eda1a7 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 7 Aug 2024 18:29:06 +0800 Subject: [PATCH 12/14] Add supported fonts back --- examples/gallery/symbols/text_symbols.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/gallery/symbols/text_symbols.py b/examples/gallery/symbols/text_symbols.py index 1f72a6886c2..2f65d9f4454 100644 --- a/examples/gallery/symbols/text_symbols.py +++ b/examples/gallery/symbols/text_symbols.py @@ -12,9 +12,10 @@ (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]. 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. +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. """ # %% From cf591a5dd90d080f970d508704a923488b63d48d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 7 Aug 2024 18:31:58 +0800 Subject: [PATCH 13/14] Rewrap to 88 characters --- examples/gallery/symbols/text_symbols.py | 26 +++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/examples/gallery/symbols/text_symbols.py b/examples/gallery/symbols/text_symbols.py index 2f65d9f4454..98d92fa6627 100644 --- a/examples/gallery/symbols/text_symbols.py +++ b/examples/gallery/symbols/text_symbols.py @@ -2,20 +2,18 @@ Text symbols ============ -The :meth:`pygmt.Figure.plot` method allows to plot text symbols. Text is -normally placed with the :meth:`pygmt.Figure.text` method but there are times -we wish to treat a character or even a string as a plottable symbol. -A text symbol can be drawn by passing **l**\ *size*\ **+t**\ *string* to -the ``style`` parameter where *size* defines the size of the text symbol -(note: the size is only approximate; no individual scaling is done for -different characters) and *string* can be a letter or a text string -(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. +The :meth:`pygmt.Figure.plot` method allows to plot text symbols. Text is normally +placed with the :meth:`pygmt.Figure.text` method but there are times we wish to treat a +character or even a string as a plottable symbol. A text symbol can be drawn by passing +**l**\ *size*\ **+t**\ *string* to the ``style`` parameter where *size* defines the size +of the text symbol (note: the size is only approximate; no individual scaling is done +for different characters) and *string* can be a letter or a text string (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. """ # %% From 8ed355226c32844509f883a5fc627eaffaa75d57 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 7 Aug 2024 18:45:34 +0800 Subject: [PATCH 14/14] Set the figure width to 67.5% to have the same widths for image and table --- doc/techref/fonts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/techref/fonts.md b/doc/techref/fonts.md index bfd3d276b19..eaec7768c26 100644 --- a/doc/techref/fonts.md +++ b/doc/techref/fonts.md @@ -28,4 +28,4 @@ The image below the table shows a visual sample for each font. | 16 | AvantGarde-DemiOblique | 33 | ZapfChancery-MediumItalic | | | | 34 | ZapfDingbats | -![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){width="80%"} +![Standard PostScript Fonts](https://docs.generic-mapping-tools.org/dev/_images/GMT_App_G.png){width="67.5%"}