Skip to content

Allow FONT_LOGO to change font color #7125

Closed

Description

@seisman

Description of the problem

As shown in the example below, FONT_LOGO can't change the size and color of the timestamp and label.

gmt basemap -R0/10/0/5 -JX5c/3c -Baf -UMylabel --FONT_LOGO=20p,Times-Bold,red -png map

map

Here are two issues:

  1. I understand that the font size can't be changed because the size of the timestamp strings must match the height of the graphic "GMT" logo, but why can't the font color be changed?

  2. The gmt.conf documentation says

    Font to use for text plotted as part of the GMT time logo [theme dependent]. Choose auto for automatic scaling with plot size."

    The description is inaccurate and misleading because the font size can't be scaled automatically.

Activity

  1. added
    bug
    on Nov 30, 2022
  2. PaulWessel commented on Nov 30, 2022

    @PaulWessel
    Contributor

    We could change things so that the time stamp, or just the custom label, could take on the color of LOGO_FONT. But I suspect some of the documentation here is stale anyway: The timestamp is a fixed size item that only makes sense for paper copy figures and the size is fixed at 8 points. However, while the width of the time-stamp box is adjusted to fit the font type we could allow the color to change.

    Would you just want the -U label to change color or also the date?

    So potential changes:

    1. Fix the documentation to state this default only changes the font and the color but not the size which is fixed at 8 points.
    2. Use FONT_LOGO to set the color of the user label
    3. If you agree, also use FONT_LOGO to set the color of the date clock string.

    What say you @joa-quim ?

  3. joa-quim commented on Nov 30, 2022

    @joa-quim
    Member

    I say that I want something more and had even implemented it but can't find it right now. It was something to add a author, probably in the place of time.
    -U is useful for more than just printing.

    Will search better tonight.

  4. joa-quim commented on Nov 30, 2022

    @joa-quim
    Member

    OK, found it

    image

    I made it with this syntax -UJ.L.+tGMTSAR+o0/0. I.e., replaced the date-time with something else.

  5. PaulWessel commented on Nov 30, 2022

    @PaulWessel
    Contributor

    I suppose we can consider that as a modifier addition. Bedtime up north though.

  6. added
    feature request
    and removed
    bug
    on Dec 1, 2022
  7. seisman commented on Dec 1, 2022

    @seisman
    MemberAuthor
    • Fix the documentation to state this default only changes the font and the color but not the size which is fixed at 8 points.
    • Use FONT_LOGO to set the color of the user label
    • If you agree, also use FONT_LOGO to set the color of the date clock string.

    Yes, I think these changes all make sense.

    I made it with this syntax -UJ.L.+tGMTSAR+o0/0. I.e., replaced the date-time with something else.

    The +t modifier also sounds good.

  8. changed the title [-]Fix the description for FONT_LOGO[/-] [+]Allow FONT_LOGO to change font color[/+] on Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions