all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Attribute names when calling face-attribute
@ 2022-01-13  0:34 fatiparty--- via Users list for the GNU Emacs text editor
  2022-01-13  0:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-01-13  8:20 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: fatiparty--- via Users list for the GNU Emacs text editor @ 2022-01-13  0:34 UTC (permalink / raw)
  To: Help Gnu Emacs


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'."

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-13  8:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-13  0:34 Attribute names when calling face-attribute fatiparty--- via Users list for the GNU Emacs text editor
2022-01-13  0:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-13  1:09   ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-13  1:36     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-13  2:20       ` fatiparty--- via Users list for the GNU Emacs text editor
2022-01-13  4:11         ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-01-13  8:20 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.