+DEFUN ("face-attribute-relative-p", Fface_attribute_relative_p,
+ Sface_attribute_relative_p,
+ 2, 2, 0,
+ doc: /* Return non-nil if face ATTRIBUTE VALUE is relative. */)
+ (attribute, value)
+ Lisp_Object attribute, value;
+{
+ if (EQ (value, Qunspecified))
+ return Qt;
+ else if (EQ (attribute, QCheight))
+ return INTEGERP (value) ? Qnil : Qt;
+ else
+ return Qnil;
+}
+
+DEFUN ("merge-face-attribute", Fmerge_face_attribute, Smerge_face_attribute,
+ 3, 3, 0,
+ doc: /* Return face ATTRIBUTE VALUE1 merged with VALUE2.
+If VALUE1 or VALUE2 are absolute (see `face-attribute-relative-p'), then
+the result will be absolute, otherwise it will be relative. */)
+ (attribute, value1, value2)
+ Lisp_Object attribute, value1, value2;
+{
+ if (EQ (value1, Qunspecified))
+ return value2;
+ else if (EQ (attribute, QCheight))
+ return merge_face_heights (value1, value2, value1, Qnil);
+ else
+ return value1;
+}
+