Text tool: new unit selector for line spacing is erratic in not px-based documents
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Tavmjong Bah |
Bug Description
The newly introduced unit selector to specify line height in absolute units (apart from % of font size) seems partially broken in documents with SVG user units not corresponding to CSS Pixels (e.g. in new documents based on the default mm-based template). Some of the experienced behavior is similar to an earlier one with the other text tool GUI controls as tracked e.g. in bug #772057 and bug #1248120 (both fixed).
Some steps to reproduce unexpected behavior:
1) launch current trunk with default (i.e. new) prefs and default new document ('mm'-based)
2) switch to the text tool
3) click once on the canvas, write a two-line text
4) drag a flowed-text frame, write a two-line text
Expected result:
Both types of text are rendered with identical (default) line heights on-canvas.
Actual result:
Line height for regular and flowed text with default (new) prefs differs.
This difference is no longer exposed if setting a new default line height in '%' (by adjusting the line height with no or an empty text object selected on-canvas).
5) select the regular text object
6) change the unit for the line height
Expected result:
Only the numerical value in the controls bar changes to represent the same amount in the newly chosen units, the actual (absolute) line height as rendered on canvas remains the same (unchanged).
Actual result:
The absolute line height as rendered on-canvas decreases each time a different unit is chosen.
7) create another regular text object with two lines
8) select 'mm' as units for line height
9) try to adjust the line height using the GUI controls (type number, or click on the spinbutton arrows)
Expected result:
The line height in-/decreases based on the entered or adjusted numerical value in the chosen unit.
Actual result:
Rather erratic reset of the line height to a lower value.
- Scrolling quickly in the entry field of the spinbutton may succeeds to override the reset, but does not allow actual fine-grained control over the line height in the chosen unit.
- Over-typing the numerical value twice with the new one (e.g. 20.0 mm) sticks in the toolbar, but is not reflected correctly on-canvas. Re-selecting the text object on-canvas with the text tool again resets the numeric value shown in the toolbar.
Common aspect to all observed symptoms:
The resulting line height on-canvas (distance between two baselines of multi-line regular text) based on a selected absolute unit identifier (i.e. apart from '%'; em and ex not tested) for the line height in the text tool controls bar seems not correct when used in documents which have a different document scale (i.e. SVG user unit ≠ CSS Pixel) than 'px'-based documents (i.e. SVG user unit = CSS Pixel) - compared e.g. to a rectangle with the height defined in the same units as used for the line height.
Reproduced with Inkscape 0.91+devel r14701, r14735, r14745 on OS X 10.7.5.
Notes:
* Similar symptoms had been observed with both recent implementations of the newly added unit selector for the line spacing:
Revision 14701: Add a units box to line height and wire in the style units, plus some cleanup
Revision 14735: More complete handling of units for 'line-height' in text toolbar.
* This report is based on the GUI experience to control the line spacing of multi-line text - the resulting values as stored in the SVG source have not been investigated nor compared.
Related branches
Changed in inkscape: | |
assignee: | nobody → Tavmjong Bah (tavmjong-free) |
status: | Triaged → Fix Released |
Confirmed on Windows 7, Inkscape trunk rev. 14747.