all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: help-gnu-emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Font width and frame width
Date: Sun, 15 Mar 2009 15:54:49 +0100	[thread overview]
Message-ID: <e01d8a50903150754v36185b86x2c984e2a79ae7e35@mail.gmail.com> (raw)

How do I get the number of columns on a maximized frame? I expected
the following to give me this in cols, but it does not give the same
value as (frame-width).


;; Run this on a maximized frame
(defun my-display-test ()
  (let* ((display-pixel-width (display-pixel-width))
         (fontname (face-attribute 'default :font))
         (font-info (font-info fontname))
         (font-width  (aref font-info 2))
         (cols (/ display-pixel-width font-width))
         )
    (message "frame-width: %s, cols: %s" (frame-width) cols)
    ))




             reply	other threads:[~2009-03-15 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-15 14:54 Lennart Borgman [this message]
     [not found] <mailman.3227.1237128897.31690.help-gnu-emacs@gnu.org>
2009-03-16  1:31 ` Font width and frame width Chris McMahan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50903150754v36185b86x2c984e2a79ae7e35@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.