summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorAlan Third <alan@idiocy.org>2021-03-28 17:52:57 +0100
committerAlan Third <alan@idiocy.org>2021-04-03 23:07:01 +0100
commit1fdbeffe3a65cb23abb43a4ea59df9553c9246f9 (patch)
treee0bf007c9aa559aa184c05ee795e8abe6d787db7 /src/dispextern.h
parent40842f67afb2931de6789237a49570f99b70404f (diff)
downloademacs-1fdbeffe3a65cb23abb43a4ea59df9553c9246f9.tar.gz
Set CSS for SVG files
* src/dispextern.h (struct image): Add font details required for the CSS. * src/image.c (free_image): Free the font family string. (search_image_cache): (uncache_image): Make image caching understand the font details. (lookup_image): Handle the font details when generating the image and looking up the cache. (svg_css_length_to_pixels): Handle 'em' when we know the font size. (svg_load_image): Generate the CSS and apply it to the SVG. (enum svg_keyword_index): (svg_format): (syms_of_image): Add ':css' attribute. * doc/lispref/display.texi (SVG Images): Add details of new svg image attributes.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index f4e872644db..a2ebd04f235 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3066,6 +3066,11 @@ struct image
is created. */
unsigned long face_foreground, face_background;
+ /* Details of the font, only really relevant for types like SVG that
+ allow us to draw text. */
+ int face_font_size;
+ char *face_font_family;
+
/* True if this image has a `transparent' background -- that is, is
uses an image mask. The accessor macro for this is
`IMAGE_BACKGROUND_TRANSPARENT'. */