diff options
author | Eli Zaretskii <eliz@gnu.org> | 2021-03-13 12:26:48 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-03-13 12:26:48 +0200 |
commit | aa644996dfd67872a0271d5bf92dcaa44aba6469 (patch) | |
tree | 9675d77ed8d9925135f13af6278d493bad851d40 /lisp | |
parent | 82e3acc9cda5373d090d56b50a7b322d3ce9d8b1 (diff) | |
download | emacs-aa644996dfd67872a0271d5bf92dcaa44aba6469.tar.gz emacs-aa644996dfd67872a0271d5bf92dcaa44aba6469.tar.bz2 emacs-aa644996dfd67872a0271d5bf92dcaa44aba6469.zip |
Extend support for faces in Enriched mode
* lisp/textmodes/enriched.el (enriched-face-ans): Support faces
with bold and italic attributes. (Bug#46507)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/textmodes/enriched.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el index c44b69cdb73..e43370cdb56 100644 --- a/lisp/textmodes/enriched.el +++ b/lisp/textmodes/enriched.el @@ -389,6 +389,8 @@ which can be the value of the `face' text property." (apply 'append (mapcar 'enriched-face-ans face))) ((let* ((fg (face-attribute face :foreground)) (bg (face-attribute face :background)) + (weight (face-attribute face :weight)) + (slant (face-attribute face :slant)) (props (face-font face t)) (ans (cdr (format-annotate-single-property-change 'face nil props enriched-translations)))) @@ -396,6 +398,10 @@ which can be the value of the `face' text property." (setq ans (cons (list "x-color" fg) ans))) (unless (eq bg 'unspecified) (setq ans (cons (list "x-bg-color" bg) ans))) + (if (eq weight 'bold) + (setq ans (cons (list "bold") ans))) + (if (eq slant 'italic) + (setq ans (cons (list "italic") ans))) ans)))) ;;; |