Set font for whole file without losing other formatting (in SVG?)
It seems I cannot change the font family globally in all text objects in the GUI using the font dialog. It also seems that when I change the font family for an individual object through the font dialog subscript and size formatting for parts of the text is lost. Thus I'm looking to change the font by editing the SVG produced by Inkscape in a text editor, but that seems to be more complicated than I expected. Upon inspecting the SVG produced by Inkscape I see that each `<text>` *and* `<tspan>` element has a `style` attribute with comprehensive font style info --- essentially all the font formatting properties. This seems a bit wasteful since I use the same font at the same size throughout the drawing, only adding the occasional bold weight and some subscripts here and there. It may make little difference given the (many) paths in the drawing, but is there any way to set things up so that most font properties are inherited from/set once in as high a node as possible? I'm looking to change the font face used and changing it by search&replace in lots of places --- the font name appears twice in each `<text>` or `<tspan>` `style` attribute! --- seems like a heavy-handed way to do it.
/bpj
Did you try using the text formatting controls in the controls bar? Family and size can be controlled there without clobbering size, super/sub etc.
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Text-Formatting.html
Have a nice day. TD
On Sun, May 5, 2019 at 2:02 PM BPJ <bpj@...2583...> wrote:
It seems I cannot change the font family globally in all text objects in the GUI using the font dialog. It also seems that when I change the font family for an individual object through the font dialog subscript and size formatting for parts of the text is lost. Thus I'm looking to change the font by editing the SVG produced by Inkscape in a text editor, but that seems to be more complicated than I expected. Upon inspecting the SVG produced by Inkscape I see that each `<text>` *and* `<tspan>` element has a `style` attribute with comprehensive font style info --- essentially all the font formatting properties. This seems a bit wasteful since I use the same font at the same size throughout the drawing, only adding the occasional bold weight and some subscripts here and there. It may make little difference given the (many) paths in the drawing, but is there any way to set things up so that most font properties are inherited from/set once in as high a node as possible? I'm looking to change the font face used and changing it by search&replace in lots of places --- the font name appears twice in each `<text>` or `<tspan>` `style` attribute! --- seems like a heavy-handed way to do it.
/bpj
Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
participants (2)
-
BPJ
-
Tyler Durden