Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"@" should be treated as regular character when system font is in effect. #138

Open
ryofurue opened this issue Jul 14, 2023 · 2 comments
Open

Comments

@ryofurue
Copy link

As discussed in
#137

"@" symbol should be treated as a regular ASCII character when a system font is in effect: For example

set text/font="Lucida Grande"/isiz=3
set data coads_climatology
shade/L=1 SST
label 180,0,0,0,0.2,"@"

should print "@" in the middle of the plot.

@ACManke
Copy link
Contributor

ACManke commented Jul 14, 2023

Yes, it SHOULD. Thinking aloud:

The choice was made when implementing PyFerret with system fonts to allow for the fact that people have large suites of scripts where they define plot labels that contain Hershey Font text controls for fonts and pen colors. So if they changed to a PyFerret font and run those scripts, their labels would contain "@P2my Label" and so on. At this point, maybe those users should instead face a choice to either stay with Hershey font or update their scripts. It's likely that's what these users are doing anyway, so that their labels are unchanged from the way they were under Ferret.

The scripts that are part of the PyFerret distribution have been updated (as of 2022-2023) to handle this by detecting whether the user has changed from the Hershey font and if so not use the at-sign syntax. So the warning about Hershey font settings goes away. But the program hasn't been changed to allow for @ to be included as a regular character in labels.

@ACManke
Copy link
Contributor

ACManke commented Oct 11, 2023

I have implemented this. When using a system font, the

This requires changes only in the routine ppl/complot/symbel.F. In addition, once per session, if a system font is in effect and the @-sign is encountered, we'll issue the warning note,

*** NOTE: Non-Hershey fonts: ignoring Hershey pen or font codes

So there are changes to
fer/plt/start_pplus.F
ppl/complot/symbel.F
ppl/include/PLTCOM.F

and some new benchmark tests are added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants