help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: quick change of face-size?


From: Drew Adams
Subject: RE: quick change of face-size?
Date: Sat, 12 Nov 2005 09:06:36 -0800

    >> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]