Mailinglist Archive: opensuse-bugs (9592 mails)

< Previous Next >
[Bug 338068] XEmacs displays oversized italic fonts
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 6 Nov 2007 09:16:20 -0700 (MST)
  • Message-id: <20071106161620.61FA6245269@xxxxxxxxxxxxxxxxxxxxxx>

--- Comment #10 from Mike Fabian <mfabian@xxxxxxxxxx> 2007-11-06 09:16:19 MST
When I used XEmacs with X11 core fonts (i.e. without Xft support, I
also had problems with italic and bold fonts because I wanted to use
certain fonts where no bold and italic was available. But I wanted to
stay with these fonts because they supported the languages I needed
well on default installations on all systems.

Therefore I used the workaround below in my ~/.xemacs/init.el
to disable tye use of bold and italic in XEmacs completely.
If you don’t really care for bold and italic and just want to
avoid the problems that weird fonts may be chosen for bold
and italic if you cannot (or don’t want to) set suitable fonts
with the resources


then the following workaround may be useful for you as well:

(setq mike-switch-off-bold-and-italic t)

(when mike-switch-off-bold-and-italic
;; unfortunately there are no `bold' and `italic' fonts matching the
;; simple font pattern which I use above:
;; "-*-fixed-medium-r-normal-*-%d-*-*-*-*-*-*-*"
;; But I want to use this font pattern because it matches reasonably
;; good looking pairs of Japanese and Latin fonts which are in the
;; standard X-distribution, i.e. using these fonts works well for
;; Japanese and Latin everywhere without the need to install special
;; fonts.
;; But because `bold' and `italic' versions are missing, XEmacs
;; selects fonts of completely different families, sizes, and widths
;; for `bold' and `italic' as a default, which looks absolutly
;; terrible.
;; Currently I use the following workaround (basically switching
;; bold, italic, and bold-italic completely off):
;; Make `bold', `italic', and `bold-italic' indistinguishable from the
;; default face to get rid of ugly fonts:
(reset-face 'bold)
(reset-face 'italic)
(reset-face 'bold-italic)

;; make them a little bit different from the default face again:
;; use empty strings if the colour shall not be changed from the default:

(setq mike-bold-background "") ; "white")
(setq mike-italic-background "") ; "gray80")
(setq mike-bold-italic-background "") ; "yellow")
(setq mike-bold-underline-p nil)
(setq mike-italic-underline-p nil)
(setq mike-bold-italic-underline-p nil)

(set-face-background 'bold mike-bold-background)
(set-face-background 'italic mike-italic-background)
(set-face-background 'bold-italic mike-bold-italic-background)
(set-face-underline-p 'bold mike-bold-underline-p)
(set-face-underline-p 'italic mike-italic-underline-p)
(set-face-underline-p 'bold-italic mike-bold-italic-underline-p)

;; Now there is still the problem that many packages create additional
;; `bold', `italic', and `bold-italic' faces later, which will again
;; look terribly wrong (e.g. Gnus does this, man.el, ... and many
;; others). As a workaround for this I redefine the functions
;; `make-face-bold', `make-face-italic', and `make-face-bold-italic'
;; here:

;; Make bold, `italic', and `bold-italic' faces created in future
;; look the same as original ones above:

(defun make-face-bold (face &optional locale)
(if mike-bold-underline-p
(set-face-underline-p face t))
(set-face-background face mike-bold-background))

(defun make-face-italic (face &optional locale)
(if mike-italic-underline-p
(set-face-underline-p face t))
(set-face-background face mike-italic-background))

(defun make-face-bold-italic (face &optional locale)
(if mike-bold-italic-underline-p
(set-face-underline-p face t))
(set-face-background face mike-bold-italic-background)))

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >