[Top][All Lists]

[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 01:34:53 +0100 (CET)

I am implementing ricci calculus notation.

Regarding the face-attribute function.  Is the attribute pre-defined or can
I select the attribute name?

For instance, could I call "(face-attribute 'default :size)" rather than
"(face-attribute 'default :height)"?
Here is my function

(defun ricci-size (size)
  "Return integer SIZE of superior and inferior glyph.
SIZE  typeface height. Integer scaled in 1/10 of point size.
Not smaller than value set by `ricci-minsize'."

        (if (integerp ricci-minsize)
      (condition-case nil ; For bootstrapping.
          (* ricci-minsize
         (face-attribute 'default :height))
        (error 0)))
    (* height ricci-scale))))  ; assumes height is integer.

reply via email to

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