subscript font-size too small if document scale ≠ px

Bug #1658029 reported by Mikhail Rudenko
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Patrick Storz

Bug Description

I have updated inkscape to version 0.92 (Arch Linux).
Now when I try to use the subscript/superscript tool, it
results in the font size being set too small (see attached
image).

The steps to reproduce the bug are as following:

1) Start inkscape
2) Select the text tool, set the font size to 14
3) Type "aa"
4) Select the second "a", press "Toggle subscript" button

Now the second "a" is moved down, and its font size is
set to 2.4. This font size is too small. In inkscape 0.91 these
actions result in the subscript font size being correctly
set to 9.1 = 14*0.65.

Tags: text viewbox
Revision history for this message
Mikhail Rudenko (mike.rudenko) wrote :
description: updated
Revision history for this message
su_v (suv-lp) wrote :

AFAICT not a recent regression of the text tool in Inkscape 0.92 (or otherwise related to changes in with regard to text formatting in Inkscape 0.92).

Reproduced with Inkscape 0.91 r13725 and 0.92.0 r15299 (on OS X 10.7.5) in a new document which uses a document scale other than px. In Inkscape 0.91, use for example 'default mm' from 'File > Templates', in Inkscape 0.92 the default template (now mm-based).

tags: added: text viewbox
Changed in inkscape:
status: New → Confirmed
summary: - subscript font too small in inkscape 0.92
+ subscript font too small if document scale ≠ px
summary: - subscript font too small if document scale ≠ px
+ subscript font-size too small if document scale ≠ px
Revision history for this message
Stefan Demmig (sdem81) wrote :

I found a workaround and something between a workaround and a solution.

workaround:
-open the document properties dialog
-change document units to "px"
-set the scaling factor x to 1.0
-change the docoment unit back to the unit you want
-->superscript and subscript work as expected for any further use of the superscript and subscript buttons in this document

partial solution:
-in the document template the viewbox parameters must be set in inkscape units (px) not in "mm" or something else
-goto "installation path"\Inkscape\share\templates
-change within the default or another template e.g. "default.de.svg" the line for viewbox to contain dimensions in px units
-for an A4 template this means viewBox="0 0 793.7007874 1122.519685">
-->superscript and subscript work as expected for new documents based on this template

a real solution would be:
the size of superscript and subscript should be decoupled from the scale-x factor and solely depend on the underlaying font size

Revision history for this message
Patrick Storz (ede123) wrote :

Possible fix submitted as merge request:
https://gitlab.com/inkscape/inkscape/merge_requests/59

If you can please check for regressions. If none are found I'll propose this for backportingto 0.92.x (I hope it can stil land before 0.92.2).

Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Patrick Storz (ede123) wrote :
Revision history for this message
Mikhail Rudenko (mike.rudenko) wrote :

I've just tested eduard-braun2's patch on linux x86_64, can confirm that the bug is fixed, no obvious regressions found. If further testing is needed, please elaborate on desired test cases.

Revision history for this message
Patrick Storz (ede123) wrote :
Changed in inkscape:
milestone: none → 0.92.2
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.