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

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

Attribute names when calling face-attribute


From: fatiparty
Subject: Attribute names when calling face-attribute
Date: Thu, 13 Jan 2022 03:20:52 +0100 (CET)

Jan 13, 2022, 13:36 by help-gnu-emacs@gnu.org:

> 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 ...
>
Has this to do with the email composition or the code?


> -- 
> underground experts united
> https://dataswamp.org/~incal
>



reply via email to

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