Type units should be accessible from the text tool options

Bug #1422926 reported by Guillermo Espertino (Gez)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Triaged
Wishlist
Jabiertxof

Bug Description

In Inkscape 0.91 type units were changed to points.
This change was an improvement, specially since the default document is A4, which is a "print" format and pt is a familiar unit for type in that context.
However, certain works require to switch to different units, as pixels.
Currently the only way to change the type units is via the preferences, and that change affects the whole application from that moment.
In other words, if you need to do a single job that requires switching to pixels or other units, you have to change the default units for the whole program.

That's pretty inconvenient and it might lead to unadverted mistakes, since the units used are not exposed in the Text tool UI.
For instance, a user that changed from pt to px for a single job could start a new work expecting the type to be in points and it would be pixels.

The units for type should be also available in the text tool options. The preference for default units is fine, but a tool for fast switching that doesn't replace the defaults would be very useful.

Tags: fonts ui
su_v (suv-lp)
tags: added: fonts ui
Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Possibly the unit for font size should be converted into a document property (or tied to the display units stored per document, with a unit selector on the tool's controls bar to allow to override the document's display units) …

Changed in inkscape:
milestone: none → 0.92
status: Confirmed → Triaged
Revision history for this message
su_v (suv-lp) wrote :

Tying the GUI units for font size to 'Display Units' won't work well (as discussed with gez on irc), here's a better proposal:

1) A global preference sets the default value for the font size units (already exists)
2) NEW: A unit selector is added to the text tool controls bar for the font size
   (allows to override a global or per-document setting temporarily in the current session)
3) NEW: In Document Properties, a new setting is added below 'Display Units':
'Display Units for Font Size', with values [ Default | px | pt | pc | mm | cm | in | em ]
'Default' would use whatever is set in the global preferences, any other value would be stored in and retrieved from the current document.
4) NEW: Templates distributed with Inkscape:
- print-oriented templates (know page formats, display units like 'mm' or 'in') use 'pt' for font size units.
- webdesign-oriented templates (defined in 'px' dimensions) use 'px' for font size units.
- if display units for font size size is undefined, the value from the global prefs is used.

Jabiertxof (jabiertxof)
Changed in inkscape:
assignee: nobody → Jabiertxof (jabiertxof)
Revision history for this message
Jabiertxof (jabiertxof) wrote :

I hope this fix the bug, tested with preferences dialog, text toolbar and font widget.
Also fix a bug when the user change the size of the font in font widget, not always mache the button apply sensitive.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Ohhhh is another solution :( dont read well the bug :(((( ¿Is Aceptable?

Revision history for this message
Jabiertxof (jabiertxof) wrote :

This new pach handle change selection in comboboxes

Revision history for this message
Jabiertxof (jabiertxof) wrote :

//This new pach handle change selection in comboboxes
This new pach handle change selection in units comboboxes

Revision history for this message
Jabiertxof (jabiertxof) wrote :

A new version of the patch, now getting size from the selection, not calculed and allowing "EM" sizes.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

This patch improve the Font-Selector dialog to allow update when only change font size. Its a improved version from previous fix

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Fix a bug showing unit combo on preferences

Revision history for this message
su_v (suv-lp) wrote :

Testing patch V05 with current trunk on OS X 10.7.5:

1) AFAIU the proposed patch (V05) implements a solution similar to the one in the original bug description. It does not include a solution which would allow to associate a display unit for font size to a drawing task (document) as proposed in comment 2 (after a discussion with the bug reporter on irc).

2) The proposed patch exposes the global setting from the text tool preferences in the text tool controls bar and in the 'Text and Font' dialog as unit selector menu. Changing the display unit for font size on the text tool controls bar or in the 'Text and Font' dialog does change the global preference setting (the last used setting will be saved across sessions and used again the next time Inkscape is launched) - it does not act as a temporary override of the user's text tool preferences in the current session (as originally proposed by the reporter).

3) The exposure of the global setting in the preferences is redundant with the proposed patch (V05) applied - with this solution, it should be removed from the text tool preference pane IMHO, because the unit selector in both the text tool context (controls bar) and in the 'Text and Font' dialog will expose and update the same global setting.

4) The proposed patch V05 has a usability problem (irrespective of the drawing scale of the current document): the recalculated numeric value expressing the current font size in newly chosen units is incorrect, and only updated to the correct value when focus is moved out of the unit selector and the text object is reselected. The 'Apply' button in the 'Text and Font' dialog cannot be used either to force an update to the correct value. This makes the new feature difficult to use (as there is no indication for the user when which value displayed in the GUI is the "correct" one).

5) When changing the display units in the 'Text and Font' dialog, the 'Apply' should not be made sensitive: changing the display unit for font size does (in theory) not change the style of the text object itself (there is nothing to apply to the text object - it is a change which affects in which units the font size is represented in the GUI).

6) Opening the 'Text and Font' dialog produces 30 Gtk-CRITICAL warnings on the console (not present without the patch applied).

Over all, reviewing (and accepting) of the proposed solution is up to Gez - I can't tell whether it would have prevented the costly mistake which recently put again more focus on this report.

Personally, I'd probably still favor either
a) the originally proposed solution (keep global setting as is, allow temporary override in the current session (or for the current document view) per unit selector in the tool context; use global setting for new sessions/other documents opened in the current session), or
b) the more complex solution combining the original proposed solution with a newly introduced document property for the display units of the font size (defaults to the unit set in the preferences unless specified otherwise).

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Thanks su_v for your work in the review. I need to select between A and B, and start on it.

jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.92 → 0.93
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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