unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: quick change of face-size?
Date: Sat, 12 Nov 2005 09:06:36 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICOELFCOAA.drew.adams@oracle.com> (raw)
In-Reply-To: <1131811131.018861.39370@o13g2000cwo.googlegroups.com>

    >> it it relies on the existence of fonts that correspond to those
    >> size increments.
    >
    > Yes. But, as I said, you can control the increment size.

    Drew, I think it is great how you write and post so many emacs utility
    files. However, this last comment of yours (and several others you
    have made) suggests that I am not being clear about why the solution
    implemented in zoom-frm.el is fragile.

You were clear. Perhaps I was not.

    Consider that someone has a family of fonts in the following sizes:

    9, 10, 12, 14, 15, 22

    Simply selecting the NUMBER associated with the current font size and
    incrementing/decrementing that value by some fixed numerical value is
    not guaranteed to consistently return an existing font, no matter what
    the increment/decrement value.

Yes, you're right. I didn't mean to suggest otherwise. I should have said,
"_If_ the sizes of your fonts differ by the same increment, _then_ you can
use zoom-frm.el as is, by changing the increment size to fit your fonts."

    When I get the time, I will try to hack together a solution based on
    your zoom-frm.el and some of the results returned by
    x-list-fonts (thanks for the pointer, rgb).

That would be great. You might also check out Miles Bader's email to the
emacs-devel list (emacs-devel@gnu.org), subject: "Default-face grow/shrink
commands", date: May 10, 2004. It includes a source-code attachment. Miles
used a different (perhaps simpler and less fragile) approach than I. His
message specifically mentions the problem of missing fonts (I think his code
just skips such fonts, however).

Consider, as a first attempt, just using the zoom-frm.el code, modifying it
to:

1. increment by 1
2. if there is no such font (use a condition-case to trap the error), then
repeat #1; else you're done

HTH,

  Drew

  reply	other threads:[~2005-11-12 17:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06 21:26 quick change of face-size? knubee
2005-11-06 21:29 ` knubee
2005-11-06 22:03 ` Peter Dyballa
2005-11-07  1:13 ` Drew Adams
     [not found] ` <mailman.14214.1131326015.20277.help-gnu-emacs@gnu.org>
2005-11-08  9:46   ` knubee
2005-11-08 14:57     ` Drew Adams
     [not found]     ` <mailman.14390.1131461852.20277.help-gnu-emacs@gnu.org>
2005-11-08 20:56       ` knubee
2005-11-08 22:02         ` Drew Adams
2005-11-10  1:25         ` rgb
     [not found]         ` <mailman.14456.1131487390.20277.help-gnu-emacs@gnu.org>
2005-11-12 15:58           ` knubee
2005-11-12 17:06             ` Drew Adams [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-07  9:10 David Reitter

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=DNEMKBNJBGPAOPIJOOICOELFCOAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).