Lisp HUG Maillist Archive

Stock font

Hi,

I’m trying to draw using the OS system font. Using :stock :system-font gives me ”.SF NS Text” on OS X, which is the San Francisco font.

CL-USER 244 > (gp:find-best-font *pane* (gp:make-font-description :stock :system-font))
#S(GRAPHICS-PORTS:FONT :FONT-DESCRIPTION #S(GRAPHICS-PORTS:FONT-DESCRIPTION :ATTRIBUTES (:NAME ".SFNSText-Regular" :FAMILY ".SF NS Text" :SIZE 13.0F0 :WEIGHT :NORMAL :SLANT :ROMAN :PITCH :VARIABLE :STOCK :SYSTEM-FONT)) :DEVICE-FONT NIL)

However, if I specify a size, I get another font family!

CL-USER 245 > (gp:find-best-font *pane* (gp:make-font-description :stock :system-font :size 14))
#S(GRAPHICS-PORTS:FONT :FONT-DESCRIPTION #S(GRAPHICS-PORTS:FONT-DESCRIPTION :ATTRIBUTES (:NAME "Helvetica" :FAMILY "Helvetica" :SIZE 14.0F0 :WEIGHT :NORMAL :SLANT :ROMAN :PITCH :VARIABLE)) :DEVICE-FONT NIL)

Is this intended, or a bug? If it is intended behavior, is there any way to get the system font in another size?

Erik



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Updated at: 2020-12-10 08:30 UTC