From 25d01f35b89d009f2c7067ba062a519b74dc9b54 Mon Sep 17 00:00:00 2001 From: kimseongyu Date: Tue, 21 Nov 2023 20:38:45 +0900 Subject: [PATCH] Apply font attributes from element to child nodes Previously, child nodes within the element were not inheriting font attributes other than font-size. This commit introduces the ability to declare font attributes directly on the element, ensuring that these attributes are applied to its child nodes as well. --- source/svg/svg-run.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/svg/svg-run.c b/source/svg/svg-run.c index 70f6fb348a..f4791d56a6 100644 --- a/source/svg/svg-run.c +++ b/source/svg/svg-run.c @@ -1204,8 +1204,10 @@ svg_run_g(fz_context *ctx, fz_device *dev, svg_document *doc, fz_xml *root, cons { svg_state local_state = *inherit_state; fz_xml *node; + char font_family[100]; svg_parse_common(ctx, doc, root, &local_state); + svg_parse_font_attributes(ctx, doc, root, &local_state, font_family, sizeof font_family); for (node = fz_xml_down(root); node; node = fz_xml_next(node)) svg_run_element(ctx, dev, doc, node, &local_state);