Hello,
I've been using Inkscape for a few years now, basically every figure I make for my technical sketches and drawings comes from Inkscape.
However, I came along with an issue with setting subscript ot superscript font size. The Inkscape default setting when applying subscription is to multiply font size by 0.65 (say, I'm using font size 10, subscript font size becomes 6.5). So, is there any option to change that factor and to generally set different subscrip (or superscrip) font value?
I've also tried selecting all text with specified font size (matching subscript font size) by using Ctrl+F in order to change subscript font size document-wise - unsucsessfuly, as I' not able to fill Ctrl-F field correctly. Is there an way to do that?
Thanks!
Subscript and superscript font size
Re: Subscript and superscript font size
Hhmm, interesting question.
From the manual (http://tavmjong.free.fr/INKSCAPE/MANUAL ... tting.html):
If I understand correctly, the solution is to change the font size after you create the character.
After some simple investigation, I found the baseline-shift attribute (attribute value?) in the XML Editor. I wonder if it might be possible to change the font size for those characters by using the XML Editor? Although that might have to be done 1 at a time, just like on the canvas. I'm not aware of any kind of Find feature for the XML Editor, but that doesn't meant there's not any.
I've tried to find the super/sub characters using Find dialog for the canvas, but either I haven't figured out the right thing to search for, or it can't be done. I would think that it could only locate whole text objects, and not individual characters or words. So if you made separate text objects for the super/sub characters, you could probably select them with Find dialog. However, that would be a very tedious practice. All the aligning.....nightmare.
The only way I've found to change the size of the super/sub character, is to select each one individually (on the canvas) and change the font size (from the tool control bar). However, if you change it by more than 10 to 20%, you'll probably also have to change the placement (raise or lower it) because it doesn't change the size from the center. It changes the size from the top (the bottom of the character remains the same - making it smaller makes it shorter from the top).
Unfortunately, Inkscape doesn't have very sophisticated text capability. Certainly nothing like a word processor or desktop publish program. However, Scribus (open source desktop publishing program) is fairly well compatible with Inkscape, as far as supporting SVG. Maybe you could work out a way to use Scribus, along with Inkscape, for your work?
You could always make a new feature request for the ability to change the super/sub size. Although it's not likely to happen anytime soon, unless some developer likes the idea and wants to work on it (the nature of the open source paradigm, for better or worse).
From the manual (http://tavmjong.free.fr/INKSCAPE/MANUAL ... tting.html):
Superscripts and subscripts can be created by selecting text and clicking on the corresponding icons ( icon , icon ) in the Tool Controls. The selected text will be shifted up or down and reduced in size. Superscripts and subscripts can be removed by selecting and then clicking on the same icons. Inkscape implements superscripts and subscripts by setting the baseline-shift attribute to either “super” or “sub”, and by setting the font-size attribute to 65%. Inkscape will only recognize a superscript or subscript if the baseline-shift attribute is set in this manner. The font size can be changed after the superscript or subscript is created. The baseline-shift attribute is not supported by all browsers (e.g. Firefox 4). As a workaround, one can manually shift the text vertically.
If I understand correctly, the solution is to change the font size after you create the character.
After some simple investigation, I found the baseline-shift attribute (attribute value?) in the XML Editor. I wonder if it might be possible to change the font size for those characters by using the XML Editor? Although that might have to be done 1 at a time, just like on the canvas. I'm not aware of any kind of Find feature for the XML Editor, but that doesn't meant there's not any.
I've tried to find the super/sub characters using Find dialog for the canvas, but either I haven't figured out the right thing to search for, or it can't be done. I would think that it could only locate whole text objects, and not individual characters or words. So if you made separate text objects for the super/sub characters, you could probably select them with Find dialog. However, that would be a very tedious practice. All the aligning.....nightmare.
The only way I've found to change the size of the super/sub character, is to select each one individually (on the canvas) and change the font size (from the tool control bar). However, if you change it by more than 10 to 20%, you'll probably also have to change the placement (raise or lower it) because it doesn't change the size from the center. It changes the size from the top (the bottom of the character remains the same - making it smaller makes it shorter from the top).
Unfortunately, Inkscape doesn't have very sophisticated text capability. Certainly nothing like a word processor or desktop publish program. However, Scribus (open source desktop publishing program) is fairly well compatible with Inkscape, as far as supporting SVG. Maybe you could work out a way to use Scribus, along with Inkscape, for your work?
You could always make a new feature request for the ability to change the super/sub size. Although it's not likely to happen anytime soon, unless some developer likes the idea and wants to work on it (the nature of the open source paradigm, for better or worse).
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Subscript and superscript font size
Thank you for the answer, brynn. Agree, Inkscape has a bit poor text funcionality.
Beside your suggestions, there is also an option to use the textex extension and write text in the Latex environment. This expands text funcionality to almos infinity, but it is a bit too much clicking for each and every text I have. I' think I'll try Scribus
Thanks again
Beside your suggestions, there is also an option to use the textex extension and write text in the Latex environment. This expands text funcionality to almos infinity, but it is a bit too much clicking for each and every text I have. I' think I'll try Scribus

Thanks again
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Subscript and superscript font size
It is fairly simple to find/replace the svg file in a text editor (e.g. Textpad) and change all instances of "64.99999762" to something else.
NB that will not change the position, only the size.
NB that will not change the position, only the size.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/