* font question
@ 2008-06-23 18:27 Chip Coldwell
2008-06-23 21:27 ` Chip Coldwell
0 siblings, 1 reply; 3+ messages in thread
From: Chip Coldwell @ 2008-06-23 18:27 UTC (permalink / raw)
To: emacs-devel
I have this in my .emacs
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "DejaVu Sans Mono" :height 100))))
'(variable-pitch ((t (:family "Liberation Sans" :height 100)))))
and it seems to do what I want (although the font I see on screen
looks a lot bigger to my eye than 10pt that is implied by the
:height). However, if I open a new frame with C-5-2, it uses the
default values for both fixed and variable-width fonts.
I can set
(add-to-list 'default-frame-alist '(font . "-unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso8859-1"))
and that sets the fixed-width font correctly, but it does not fix the
variable-width fonts.
It seems to me that custom-set-faces should do more than set the faces
for the initial frame; it should set the faces for all subsequently
created frames also, no?
Chip
--
Charles M. "Chip" Coldwell
Senior Software Engineer
Red Hat, Inc
978-392-2426
GPG ID: 852E052F
GPG FPR: 77E5 2B51 4907 F08A 7E92 DE80 AFA9 9A8F 852E 052F
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: font question
2008-06-23 18:27 font question Chip Coldwell
@ 2008-06-23 21:27 ` Chip Coldwell
2008-06-23 21:52 ` Jason Rumney
0 siblings, 1 reply; 3+ messages in thread
From: Chip Coldwell @ 2008-06-23 21:27 UTC (permalink / raw)
To: emacs-devel
On Mon, 23 Jun 2008, Chip Coldwell wrote:
> I have this in my .emacs
>
> (custom-set-faces
> ;; custom-set-faces was added by Custom.
> ;; If you edit it by hand, you could mess it up, so be careful.
> ;; Your init file should contain only one such instance.
> ;; If there is more than one, they won't work right.
> '(default ((t (:family "DejaVu Sans Mono" :height 100))))
> '(variable-pitch ((t (:family "Liberation Sans" :height 100)))))
>
> and it seems to do what I want (although the font I see on screen
> looks a lot bigger to my eye than 10pt that is implied by the
> :height).
I wonder if there isn't a missing XINT somewhere. Here's my default
face:
Face: default (sample) (customize this face)
Documentation: Basic default face.
Defined in `faces.el'.
Family: DejaVu Sans Mono
Foundry: unknown
Width: normal
Height: 96
Weight: normal
Slant: normal
Foreground: #000000
Background: #ffffff
Underline: nil
Overline: nil
Strike-through: nil
Box: nil
Inverse: nil
Stipple: nil
Font: #<font-object -unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso8859-1>
Fontset: -unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-fontset-auto2
Inherit: unspecified
Note that "Height: 96" but the XLFD, contains "-12-" in the pxlsz
field. Note that
#define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS)
and
#define GCTYPEBITS 3
on my platform, thus
XINT(96) == 96 >> 3 == 96/8 == 12
Is the :height key in a font-spec supposed to be a Lisp integer?
Seems like an ugly thing to put the user through.
I will continue to debug this.
Chip
--
Charles M. "Chip" Coldwell
Senior Software Engineer
Red Hat, Inc
978-392-2426
GPG ID: 852E052F
GPG FPR: 77E5 2B51 4907 F08A 7E92 DE80 AFA9 9A8F 852E 052F
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: font question
2008-06-23 21:27 ` Chip Coldwell
@ 2008-06-23 21:52 ` Jason Rumney
0 siblings, 0 replies; 3+ messages in thread
From: Jason Rumney @ 2008-06-23 21:52 UTC (permalink / raw)
To: Chip Coldwell; +Cc: emacs-devel
Chip Coldwell wrote:
> I wonder if there isn't a missing XINT somewhere. Here's my default
> face:
>
> Face: default (sample) (customize this face)
> Documentation: Basic default face.
> Defined in `faces.el'.
>
> Family: DejaVu Sans Mono
> Foundry: unknown
> Width: normal
> Height: 96
[snip]
> Font: #<font-object -unknown-DejaVu Sans Mono-normal-normal-normal-*-12-*-*-*-m-0-iso8859-1>
>
> Note that "Height: 96" but the XLFD, contains "-12-" in the pxlsz
> field.
customize-face default shows:
[X] Height: [Value Menu] Height in 1/10 pt: 96
perhaps describe-face should also show the units here, to avoid confusion.
Note that
>
> #define XINT(a) (((EMACS_INT) (a)) >> GCTYPEBITS)
>
> and
>
> #define GCTYPEBITS 3
>
> on my platform, thus
>
> XINT(96) == 96 >> 3 == 96/8 == 12
I think this is coincidence. A 12 pixel height at 90dpi comes out to 9.6
points, is your display set to 90dpi (within fontconfig or X config, or
autodetected by X)?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-23 21:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23 18:27 font question Chip Coldwell
2008-06-23 21:27 ` Chip Coldwell
2008-06-23 21:52 ` Jason Rumney
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.