Outils pour utilisateurs

Outils du site


issue166:inkscape

Ceci est une ancienne révision du document !


Yet again, last month’s News section of Full Circle Magazine managed to sneak in some Inkscape announcements that arrived after the deadline for this column, so apologies for parroting information you probably already know. First, Inkscape 1.1 alpha is available for testing. This is the initial alpha release, but there may be others – not to mention betas and release candidates – before version 1.1 sees an official build. If you want to help make that release as stable as possible, then please consider downloading the alpha version, testing it with your typical workflow, and reporting any issues. Rather than provide a link directly to this alpha, which may be outdated by the time this magazine hits the wires, I suggest visiting the News section of the Inkscape website (https://inkscape.org/news/). and following the links in the latest relevant article.

Alongside 1.1 alpha we also saw the release of version 1.0.2. This is another bugfix release, addressing several issues that appeared in 1.0 and 1.0.1. At the time of writing, there doesn’t appear to be a 1.0.2 snap package available, but there is a PPA, as well as AppImage and Flatpak versions available from the Download section of the Inkscape website. If you wish to use Inkscape on a non-Linux system, there are, of course, builds for Windows and MacOS. Since FCM is primarily a Ubuntu-oriented publication, I will mention that I had problems using the AppImage version on Ubuntu Mate 18.04. Although it initially appeared to work, any operation that opens the file picker – such as loading and saving files – caused the application to immediately crash. As usual, I had the best results with the PPA.

There are only a couple of new features in 1.0.2, but they’re ones that a lot of users have been clamouring for. Both are actually new preferences, so to find them you’ll of course have to install 1.0.2, then open the Edit > Preferences dialog. The first new option can be found in the Behaviour > Steps panel, and allows you to turn off the default behaviour of zooming in when the user clicks the middle mouse button on the canvas (and zooming out when doing the same with Shift): I can’t say I’ve ever triggered this behaviour by accident, despite being a frequent user of middle-click-drag to pan the canvas, but if you are plagued by this problem,\ you can now disable the feature entirely. It may well be that this problem occurs more for frequent users of graphics tablets; certainly that’s the case with the issue that has given rise to the second new option.

You may recall that one of the headline features for 1.0 was the ability to rotate the canvas. For mouse users the best way to trigger this is to hold Ctrl-Shift and move the mouse wheel, however that will rotate in steps (15° per ‘click’ of the wheel, by default). For an unconstrained rotation you also have the option of holding Ctrl whilst click-dragging with the wheel or middle mouse button. The middle mouse button is often exposed on the stylus of a graphics tablet, where it’s useful for panning the canvas, but many users of such devices found they were accidentally triggering the canvas rotation by mistake, due to sloppy timing when releasing the Ctrl key from a previous operation. As a result the Inkscape forum has seen a flurry of requests for the ability to turn off the canvas rotation feature.

If you wish to disable this feature, there’s a new option for it in the Interface panel of the Preferences dialog. This doesn’t, however, remove the “R:” field from the bottom right of the Inkscape window, so you can still force rotation by changing the value in there, by typing, rolling the mouse wheel over the field, or right-clicking to bring up the context menu. That’s it for the new features in 1.0.2, with everything else being bug fixes, mainly for issues that the majority of users won’t ever encounter. But there is one class of fixes that definitely warrants a mention: this release fixes the text-to-path regressions that were introduced with version 1.0. For the full rundown on these problems, see part 100 of this series, or the subsequent YouTube video I created (http://www.youtube.com/watch?v=lx5nRCu7AKk), but here’s a brief reminder.

Originally the behaviour of Path > Object to Path, when applied to a text object, was to create a single complex path. This was subsequently changed to create a group of paths, one for each letter – yet internally the ability to convert text to a single path remained. It was even exposed via the UI, whether by accident or design: using Path > Union on a text object would convert it to a single path. A rewrite of the path operations code for 1.0 broke this internal ability. Path > Union now behaved the same way as Object to Path. Furthermore, other features which required an implicit conversion to a single path stopped working in a variety of ways. You could no longer trivially apply an inset, outset, dynamic offset, or linked offset to a text object.

With 1.0.2, normality is restored. Path > Union once again creates a single path, and the various offset functions work once more. In my opinion, this fix alone makes it worth upgrading to 1.0.2 if you’ve already made the leap to the 1.x series, and removes one of the biggest reasons for sticking with 0.92.x for any readers who have been reticent to move on. All this talk of text objects leads nicely into the next topic for this series. We’re returning to the new and updated features that arrived with version 1.0, of which Inkscape’s text support received more than its fair share of changes. We’ll start with the most obvious of the user-facing changes: the revamped Text tool control bar.

There’s no doubt that the Text tool control bar in version 0.92 was a little unwieldy, featuring many, many buttons. The new version simplifies this clutter by collapsing several sets of radio buttons into drop-down menus. For example, the four buttons used for text alignment now take up less than the width of two buttons. The old discrete buttons and their new combined drop-down replacements are shown in the table below. The tool bar has also lost a couple of icons completely. The confusing “Show style of outermost text” button has been relegated to the waste bin. The existence of this toggle was the result of an attempt to better represent the underlying complexities of SVG text. In practice very few people understood the implications of using this button, and most users would either ignore it entirely, or randomly turn it on and off while trying to reset the other controls on the bar. Also gone is the “?” button which was only relevant in the relatively rare case of the user mixing different line spacings within a single block of text (more on this later). Good riddance to them; anyone who really needs the control they offered probably has the technical skills to make their changes via the XML editor, or by editing the raw text of the SVG file.

With two buttons removed, and several others reduced to drop-downs you might expect the toolbar in 1.0 to be more compact than its predecessor. Unfortunately the opposite is true. Despite having fewer controls, the new toolbar occupies even more horizontal space than the old one, barely fitting onto the width of an HD monitor. Anyone trying to run Inkscape on a narrower screen, or just with a reduced window size, will find that the controls inevitably overflow into a horrible pop-up menu, with unnecessary abbreviations and inconsistent colons. The reason that the toolbar takes up so much additional space is due to the general trend towards big, chunky UI widgets that are “touch friendly” for use on tablets and phones. In the case of the Text toolbar, this change is particularly exacerbated due to the number of spinbox widgets it holds. Here’s a comparison of how spinboxes look on Inkscape 0.92 compared with 1.0:

This is a definite case of “you can’t please all the people all the time”. As a mouse user, I never experienced any problems with the smaller buttons of the old widgets, and much preferred being able to get to the justification options with a single click. A tablet user might disagree, considering the extra step of opening a drop-down to be a small price to pay for spinboxes with large, easy to hit buttons. I’d love to see a future release of Inkscape address this by offering a preference to switch between the two styles. Ironically, this change of style for the Text toolbar is presented in the version 1.0 release notes under the heading of “More Compact Tool Controls Bar”. Clearly the Inkscape developers use a different definition of “compact” than the one I’m familiar with!

As mentioned earlier, the removal of the “?” button was one of the changes implemented to make the toolbar more “compact”. In earlier releases, this button would be enabled if you created a multi-line text object, but then changed the line spacing for a subset of the lines in the block (e.g. by dragging to select a single line before changing the value in the spinbox). Toggling the button back to its off state would remove the line-specific override, returning the whole block to the same default line spacing. Without this button, it’s still possible to reset all the lines back to a single value. It’s as simple as clicking in the text to place the caret (without selecting anything), and then changing the value in the spinbox. If you just want to reset it to the existing value, press the plus button immediately followed by the minus button to nudge the line height up and then down by the same amount.

If, rather than just clicking within the text, you select part of a line so that at least one character is highlighted, changing the line height value will affect that whole line. This also works with a selection that spans multiple lines. This ability to mix your line heights within a block is exactly the same as in 0.92, all that’s been removed is a one-click method to revert all the lines back to a single value, which is no great loss.

Flowed Text Flowed text has long been a source of consternation for veteran Inkscape users. Support was added many years ago, based on a proposed implementation for SVG 1.2 which looked like it would become part of the official spec. That proposal was not accepted as part of the SVG specification, however, leaving Inkscape with a flowed text implementation that was not supported by the vast majority of other programs, including web browsers. With the advent of SVG 2.0, however, flowed text has seen something of a renewal. In part this is due to the SVG Working Group’s decision to defer to the CSS standard for many parts of the language, rather than trying to re-implement their own variations. Inkscape 1.0 revamps the existing flowed text support completely, in order to produce something that is compatible with SVG 2.0.

The downside is that it’s no longer compatible with the implementation in earlier versions of Inkscape. For most users, this isn’t something to worry about, but if you do need to create files that will be edited in 0.92, you can switch back to the older approach by turning off an option in the Inkscape preferences. The quick way to find it is to double-click on the Text tool, which will open the Preferences dialog with the correct panel already selected. Un-check the “Use SVG2 auto-flowed text” option and the flowed text you create will once again be compatible with Inkscape 0.92… and almost no other programs. There’s yet more to describe about Inkscape’s new flowed text implementation, as well as other text features that are new to version 1.0, so next month’s article will continue to explore this subject.

issue166/inkscape.1614497535.txt.gz · Dernière modification : 2021/02/28 08:32 de d52fr