(t
;; Turn mode on
(artist-mode-init)
- (let ((font (face-attribute 'default :font)))
- (when (and (fontp font) (not (font-get font :spacing)))
+ (let* ((font (face-attribute 'default :font))
+ (spacing-prop (if (fontp font)
+ (font-get font :spacing)
+ t)))
+ (when (or (null spacing-prop) (eq spacing-prop 0))
(message "The default font isn't monospaced, so the drawings in this buffer may look odd"))))))
;; Init and exit
make_fixnum (point),
FONT_WEIGHT_SYMBOLIC (font),
FONT_SLANT_SYMBOLIC (font),
- NILP (spacing) || EQ (spacing, Qp) ? Qnil : Qt,
+ (NILP (spacing)
+ || EQ (spacing, Qp)
+ /* If the font was specified in a way
+ different from XLFD (e.g., on MS-Windows),
+ we will have a number there, not 'p'. */
+ || EQ (spacing,
+ make_fixnum (FONT_SPACING_PROPORTIONAL)))
+ ? Qnil : Qt,
Ffont_xlfd_name (font, Qnil),
AREF (font, FONT_REGISTRY_INDEX));
result = Fcons (v, result);