Here's a code that works for setting a string foreground:
(defface test-face '((t (:height 1.2 :foreground "green"))) "doc.") (setq asdf (propertize "asdf" 'face 'test-face)) (add-face-text-property 0 (length asdf) '(:foreground "red") nil asdf)
asdf will still have the height 1.2 through
test-face while gaining a red foreground, instead of green.
But this doesn't work:
(add-face-text-property 0 (length asdf) '(:height 1.0) nil asdf)
While the text properties will change, when inserting
asdf into a fundamental-mode buffer, it will still have the height 1.2. How can I set the height to
1.0, while preserving the face?