NOAA-PMEL/PyFerret

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

Opened this issue · 2 comments

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.

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.

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.