National Oceanic and
Atmospheric Administration
United States Department of Commerce

ASCII characters in labels

ASCII characters in labels


How can I make a percent sign in a label?


special characters


In PyFerret, special characters are specified as below if using the HERSHEY font, which uses all of the same syntax as classic-Ferret font controls. If using a Python font, then special characters are embedded in labels using an html-code style. The @ sign is code # 64, so:

yes? set text/font=arial
yes? cancel mode logo
yes? go ptest
yes? label -300,200,-1,0,.3 At Sign <#64>


The ASCII Simplex and ASCII Complex fonts allow you to use all of the ASCII characters. The above graphic was made in Ferret or in PyFerret using the Hershey font, with this command:

 yes? GO ptest
 yes? label -300,200,-1,0,.3 @AS @#$%^&*()_-+={[}]|\<,>.?/

Note that the following characters are not available because they are interpreted by Ferret: ` ! " '

(That's backtic, bang, double quote and single quote.)

For more information on fonts and labels please see Chapter 6 of the Ferret Users Guide.