pyferret freezes on strange label with system font
Opened this issue · 3 comments
pyferret hangs up when you try to plot a strange label with a system font on macOS 13.4.1:
. . .
PyFerret v7.63 (optimized)
Darwin 19.6.0 - 12/10/21
. . .
yes? set data coads_climatology
yes? shade/L=1 SST
yes? label 180,0,0,0,0.2,"<@>" !!-> fine
yes? set text/font="Lucida Grande"/isiz=3
yes? label 180,0,0,0,0.2,"<@>" !!-> pyferret hangs up!!!
Ctrl-C doesn't work. Even if you kill the terminal window, one pyferret process stays as an orphan. You need to kill the pyferret processes from another terminal.
Changes will be made to allow html numeric codes to be given as either "<&#nnn>" or "<#nnn>". Also make the code more robust when there are multiple html specifiers in the text of a label.
Just to clarify, I'm merely reporting this "freeze", which is a serious problem (similar to crash), whatever the cause is.
As to how HTML entities are expressed in PyFerret, I think it's a very minor problem. Currently,
HTML PyFerret
<°> <°>, <°>
<@> <#64>, <#64;>
So, the <#nnn>
form is a bit inconsistent with the HTML standard, but this is a minor issue.
Yes, the logic was sending us into an unending loop. This is now prevented for any unexpected syntax that might be in a label, and in addition, <&#nnn> is equivalent to <#nnn>.
Addressed in ppl/complot/symbel.F and additional tests added, bn_setting_text.jnl