From 88f381a4e6009d4d0b4390871e7c5da028cbed46 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 7 May 2026 18:24:15 +0800 Subject: [PATCH] Allow adjust font --- pygmt/src/pygmtlogo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index e9351b0edad..5965bb47a2a 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -22,6 +22,7 @@ def _create_logo( # noqa: PLR0915, PLR0912 theme: Literal["light", "dark"] = "light", wordmark: Literal["none", "horizontal", "vertical"] = "none", color: bool = True, + font: str | None = None, figname: PathLike | None = None, debug: bool = False, ): @@ -81,7 +82,7 @@ def _create_logo( # noqa: PLR0915, PLR0912 hex_factor = 1.1 # Define wordmark - font = "AvantGarde-Book" + # font = "AvantGarde-Book" match wordmark: case "vertical": args_text_wm = {"x": 0, "y": -4.5, "justify": "CT", "font": f"2.5c,{font}"} @@ -259,6 +260,7 @@ def pygmtlogo( # noqa: PLR0913 shape: Literal["circle", "hexagon"] = "circle", theme: Literal["light", "dark"] = "light", wordmark: Literal["none", "horizontal", "vertical"] = "none", + font: str | None = None, color: bool = True, width: float | str | None = None, height: float | str | None = None, @@ -359,6 +361,7 @@ def pygmtlogo( # noqa: PLR0913 theme=theme, shape=shape, wordmark=wordmark, + font=font, figname=logofile.name, )