Display of text decorations is in trunk and it can display things as shown in this example:
https://launchpadlibrarian.net/140347078/text_decorations.png
(Note install the last patch in https://bugs.launchpad.net/inkscape/+bug/1243401 to see these again, as a recent change to trunk broke them.)
Text decoration control requires three GUI fields:
Line: NONE, or any combination of: underline, overline, linethrough, blink Style: solid, double, dashed, wavy Color: From Text or (Color setting widget)
I'm thinking about what the GUI should look like to access these. My first thought was to add them to the "A" (Create and edit text objects) part of the GUI, since text decoration does not make a lot of sense without text to decorate, and this sort of thing would be in a part of the GUI like that in a Word processor. But that part of the GUI is already packed with options, to the extent that on my computer I can only see all the options when Inkscape fills the entire screen. If text decoration was added there, it would never all fit.
So my second thought was to maybe put these in "A (with a wavy line through it)" as (Create and edit text decorations). That would let it fit on screen better, at the cost of making the line of icons down the left side of the screen one longer.
The third option is to add a second line of options to the existing "A". That would use up more vertical screen space, but it would have the advantage that all of the text and text decoration formatting options could be on screen at once. This is more of a departure for the GUI, since it seems not to happen anywhere else.
Thoughts?
(Note: "blink" line type is emulated with a type of double line style. I don't expect true blink display to be found in many SVG viewers, ever, so all Inkscape has to do is indicate that it is set.)
Is there at present anything in the Inkscape GUI where a check box widget is exposed when one of the left side icons is selected? As far as I could tell all of the widgets exposed by selecting one of those icons are of the "select one" type.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
El mié, 08-01-2014 a las 11:13 -0800, mathog escribió:
Is there at present anything in the Inkscape GUI where a check box widget is exposed when one of the left side icons is selected? As far as I could tell all of the widgets exposed by selecting one of those icons are of the "select one" type.
Hello, not sure if is what you want, but see /live_effects/parameters/path.cpp in line 206 for a example of tools switch.
Sorry i dont undertand well your cuestion. I think actualy there is nothing to action by left side icons selection in widget/toolbox.cpp.
El mié, 08-01-2014 a las 20:49 +0100, Jabiertxo Arraiza Cenoz escribió:
El mié, 08-01-2014 a las 11:13 -0800, mathog escribió:
Is there at present anything in the Inkscape GUI where a check box widget is exposed when one of the left side icons is selected? As far as I could tell all of the widgets exposed by selecting one of
those
icons are of the "select one" type.
Hello, not sure if is what you want, but see /live_effects/parameters/path.cpp in line 206 for a example of tools switch.
On Wed, 2014-01-08 at 11:13 -0800, mathog wrote:
Display of text decorations is in trunk and it can display things as shown in this example:
https://launchpadlibrarian.net/140347078/text_decorations.png
A long-long-long awaited feature! I eagerly await being able to try it out.
I am not sure that we should be including CSS3 text decorations at this point (at least in the GUI). We need to decide on a general framework for handling SVG2/CSS3 features. CSS3 text decoration also doesn't seem to have been implemented by any of the browsers yet and the SVG WG hasn't discussed how CSS3 text decoration will work in the context of SVG2. We don't want a repeat of the "flowed-text" debacle. (I am not suggesting CSS3 text decoration code be removed, just not exposed to the user... we'll surely need the code soon enough.)
Note that SVG has specific rules for how color inherits for text-decoration:
http://www.w3.org/TR/SVG/text.html#TextDecorationProperties
I'm not sure how compatible they are with CSS2. In any case, we should follow SVG's rules.
(Note install the last patch in https://bugs.launchpad.net/inkscape/+bug/1243401 to see these again, as a recent change to trunk broke them.)
Text decoration control requires three GUI fields:
Line: NONE, or any combination of: underline, overline, linethrough, blink Style: solid, double, dashed, wavy Color: From Text or (Color setting widget)
I'm thinking about what the GUI should look like to access these. My first thought was to add them to the "A" (Create and edit text objects) part of the GUI, since text decoration does not make a lot of sense without text to decorate, and this sort of thing would be in a part of the GUI like that in a Word processor. But that part of the GUI is already packed with options, to the extent that on my computer I can only see all the options when Inkscape fills the entire screen. If text decoration was added there, it would never all fit.
So my second thought was to maybe put these in "A (with a wavy line through it)" as (Create and edit text decorations). That would let it fit on screen better, at the cost of making the line of icons down the left side of the screen one longer.
The third option is to add a second line of options to the existing "A". That would use up more vertical screen space, but it would have the advantage that all of the text and text decoration formatting options could be on screen at once. This is more of a departure for the GUI, since it seems not to happen anywhere else.
Thoughts?
Josh had an idea for context sensitive menus that would pop on the screen when needed. What if the text-decoration GUI would became part of the menu that you get when you right-click on the screen when using the Text tool ("A")?
Tav
On 19-Jan-2014 06:28, Tavmjong Bah wrote:
A long-long-long awaited feature! I eagerly await being able to try it out.
To try it, apply this patch:
https://bugs.launchpad.net/inkscape/+bug/1269206
I am not sure that we should be including CSS3 text decorations at this point (at least in the GUI).
Mostly I went there because there was no other way to specify the text decoration line styles wavy, dotted, and dashed. Additionally, specifying color changes for the text decorations separately from the text color is a pain to do using only CSS2 edits. It is possible, but the operations go something like this:
1. enter "ATextA" and format it as blue, underlined 2. select "Text" and change the color to red. 3. Select the terminal "A" characters and delete them.
CSS3 text decoration also doesn't seem to have been implemented by any of the browsers yet and the SVG WG hasn't discussed how CSS3 text decoration will work in the context of SVG2.
Yup. The specs are a little contradictory: what CSS wants and what SVG wants are already somewhat at odds, and it will only get worse with CSS 3. The SVG spec says text-decoration should pick up both fill and stroke whenever it sees a "text-decoration" style tag. Unfortunately, CSS3 only has "text-decoration-color", when what is actually needed for SVG, given the preceding, are the two tags "text-decoration-fill" and "text-decoration-stroke". (Otherwise, what does text-decoration-color refer to?) My present implementation punts on pretty much all of this. It only decorates with a solid color, and it gets it from
1. explicit text-decoration-color (either of the two CSS 3 syntax's for this) 2. from stroke (if stroke is defined) 3. from fill (if fill is defined)
The result looks about right for the cases I encounter, which are slides from lectures for biology classes, but it is not correct according to the SVG spec.
The problem is, to do it right, one needs in style.h not only "fill" and "stroke", but also "text_decoration_fill" and "text_decoration_stroke". (Plus various associated values like width or opacity.) But there are no standard SVG tags that correspond to any of these extra "text_decoration_*". So I swept it all under the carpet and used just "text-decoration-color" which is a tag in CSS3 by itself, and can be combined in for the 3 value CSS3 "text-decoration" tag and saved in an SVG file. Other browsers ignore the extra two values, so it doesn't display right there. Presumably this could be done with some type of "sodipodi:text-decoration-fill" tag, but there is no way that will ever be in SVG, and again, other browsers will just ignore it. So I think if a fully SVG 1.1 compliant fill and stroke were implemented now in Inkscape it would most likely have to be ripped out again later.
I also noticed that in nested tspans the "Text and Font dialog" does not pick up the correct font size (or text decoration) in many cases. The text tool that runs horizontally along the top gets the font size right always, so they must do things differently. Example, enter as text "12345678" and format the entire thing as Arial 32pt red fill. Then select "234567" and make that 28 pt. Then select "3456" and change the color to blue. Place the cursor between the "2" and "3", or select "23" and the text tool that runs along the top shows "28pt", but the "Text and Font" dialog still shows "32pt". The same sort of thing happens when text-decoration changes are made instead of font size changes.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
participants (3)
-
Jabiertxo Arraiza Cenoz
-
mathog
-
Tavmjong Bah