[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Attribute names when calling face-attribute
From: |
Emanuel Berg |
Subject: |
Re: Attribute names when calling face-attribute |
Date: |
Thu, 13 Jan 2022 02:36:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
fatiparty--- via Users list for the GNU Emacs text editor wrote:
>> You can do
>>
>> (and (integerp height) height)
>>
>> to make sure it crashes on bogus data. This is better than to
>> have it almost always crash on bogus data ...
>
>
> Have changed like this, with (* glyph-size ricci-scale). This seems to work.
> I think that glyph-size should be a defined variable, rather than using
> "height"
> as height seems to be only an attribute for the height of the font.
> (defun ricci-size (glyph-size)
> "Return integer SIZE of superior and inferior glyph.
> GLYPH-SIZE Typeface height. Integer at 1/10 the point size.
> Not smaller than value set by `ricci-minsize'."
>
> (ceiling
> (max
>
> (if (integerp ricci-minsize)
> ricci-minsize
> (condition-case nil ; for bootstrapping
> (* ricci-minsize (face-attribute 'default :height))
> (error 0)) )
>
> (* glyph-size ricci-scale)) )) ; assumes height is integer.
>
> I plan to allow floating point values, but that requires some thought.
Yuk!
What's with all the NO-BREAK SPACEs?
Remove please ...
--
underground experts united
https://dataswamp.org/~incal
Re: Attribute names when calling face-attribute, Eli Zaretskii, 2022/01/13