Let's say I want to write a package which uses proportional font. But I don't want to hardcode a specific font, because the user may not have it installed.
How can I refer to the system default proportional font which can be configured by the user?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Does using face
variable-pitch do what you want?
See the Elisp manual, node Basic Faces for info about this and other predefined basic faces.
More precisely, since you want a font, not a face, maybe programmatically pick up the font or font family from the attributes of that face. That font is likely to be different for different platforms, even though the face used is the same (the face may be defined differently on different platforms, but it has the same name).