[Thread Prev][Thread Next][Index]

Re: [ferret_users] PyFerret: latitude labels corrupted



Hi Karl,

On Sat, May 23, 2020 at 4:21 AM Karl Smith - NOAA Affiliate <karl.smith@xxxxxxxx> wrote:
For XWindow systems, the command-line program xfontsel can be used to show fonts (with way too many options because this existed before scalable fonts - look under the 'fmly' options).

On my Mac the command-line program "atsutil font -list" gives a list of fonts.  (I just did an "apropos font" to discover the atsutil program, so I am not sure if this is the best answer.)  Note that if you specify a font that is not present, the program (or rather the graphics library) will substitute whatever it thinks is an appropriate substitute.

Thanks!  That means that all fonts the OS recognizes can (in principle) be used.  That's useful information.  (And I hope you will write it in the official PyFerret manual.)

In that case, macOS has a utility called "Font Book" in the "Applications" folder.   I found a bewildering number of fonts!

This application shows samples for each font.  Unfortunately, the samples don't include the hyphen character.  (Understandably.  Nobody would look into the font gallery specifically to examine the hyphen character!)
 
When using system fonts, especially under Python 3.x, unicode (UTF8) is used.  So I think (but I have not tested this) you should be able to specify UTF8 characters and not be limited to ASCII.

So, in the future, it would be nice if PyFerret will use the unicode Minus Sign for the minus symbol on the axes and colorbar.

  (And my suspicion about this bug is that a non-ASCII UTF8 character is getting used with the old Hershey font.)

I found that the PDF file PyFerret generates includes the "real" degree symbol (" ° ") from unicode.  This symbol is non-ASCII, although It's in the Extended ASCII set.  But I guess Hershey is fine with it?

Regards,
Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement