Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calendar & proportional fonts

55 views
Skip to first unread message

hairryharry

unread,
Sep 30, 2012, 8:35:24 AM9/30/12
to help-gn...@gnu.org
Hi,

When I use proportional fonts in emacs 23 & 24 I find the calendar dates
do not line up. OK with fixed fonts.

Fairly new to emacs but have tried fiddling with calendar spacing
variables but not able to fix.

Any ideas or pointers would be gratefully received.

Thanks,

Mike

B. T. Raven

unread,
Sep 30, 2012, 3:10:12 PM9/30/12
to
Die Sun Sep 30 2012 07:35:24 GMT-0500 (Central Daylight Time)
hairryharry <hairr...@tesco.net> scripsit:
I set up two frames in .emacs, one with a default proportional font, and
the other with a fixed font. Then I can look at Calendar correctly in
the fixed font frame.

Ed

Peter Dyballa

unread,
Sep 30, 2012, 4:00:13 PM9/30/12
to hairryharry, help-gn...@gnu.org

Am 30.09.2012 um 14:35 schrieb hairryharry:

> Any ideas or pointers would be gratefully received.

Maybe the Emacs Lisp Manual offers some pointers how to position characters by a fraction of character width.

Does it help to assume that GNU Emacs is not a graphical editor but works character oriented?

Leave it fixed width fonts! Then it's easier to understand why GNU Emacs offers functions to operate on columns of text.

In last millennium there was a time when you could find in the category "state-of-the-art" alpha-numerical text terminals which offered on 25 different lines space for exactly 80 characters. No-one more, no-one less. And each character the same size. That's the time when the GNU Emacs his or her story started. And that's the time when you could buy mechanical typewriters. See: http://en.wikipedia.org/wiki/Typewriter

--
Greetings

Pete

Almost anything is easier to get into than out of.
– Allen's Law


hairryharry

unread,
Sep 30, 2012, 4:23:32 PM9/30/12
to help-gn...@gnu.org
Thanks Ed,

Had sort of heard about doing that but not sure how to. Could you give
me a pointer to how you set the frames up in your .emacs.
Thanks,

Mike

B. T. Raven

unread,
Sep 30, 2012, 6:41:39 PM9/30/12
to
My .emacs intializes the w32 build, so you will need to use different
font names, etc. but the lisp functionality should be the same:

Near end of my .emacs is this
Arial

(setq initial-frame-alist '((name . "arial") (top . 370) (left . 1)
(width . 205) (height . 18)))

(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 (:stipple nil :background "ghostwhite" :foreground
"black" :inverse-video nil :box nil :strike-through nil :overline nil
:underline nil :slant normal :weight normal :height 108 :width normal
:family "outline-arial unicode ms"))))
'(scroll-bar ((t (:background "#ffffff" :foreground "#000000")))))


and then for the fixed Courier font:


(make-frame '((name . "courier")
(top . 1) (left . 1) (width . 123) (height . 18)
(visibility . icon) ; nil or icon
))

(select-frame-by-name "courier")
(set-frame-font "-outline-Courier
New-normal-r-normal-normal-*-*-96-96-c-*-iso10646-1")

the frame coords are from long ago when they made approx. equal frames
at top and bottom of some monitor screen. It would be nice if they could
be parameterized somehow so that they would fit automatically on any
screen size. Lines would wrap at different points because a certain
screen width in pixels would accommodate only so many characters.

Ed

hairryharry

unread,
Oct 3, 2012, 10:52:14 AM10/3/12
to help-gn...@gnu.org
Just a follow-up thanks to B.T.Raven.

Now set-up as I wanted - thanks for your .emacs and with reference to
the section on emacswiki got it sorted out.

Mike

0 new messages