1

I want to type text in Inkscape, and see lowercase letters displayed instantly as small capitals on the canvas. Preferably using the font's own small capitals, if available.

Is this possible in Inkscape 0.92? Or planned for future releases?

If I make a text object in Inkscape, and set its variant capitals to "Small" or "All Small", then apply those settings, I don't see any changes on Inkscape's canvas.

But when I save the SVG and open it in a browser, such as Firefox or Chromium, I do see the correct changes.

I know the two common ways of doing this for SVG displayed in browsers:

A CSS attribute:

text{
  font-variant-caps: small-caps;
}

An SVG attribute:

<text font-variant="small-caps">
  The quick brown fox jumps over the lazy dog.
</text>

But I'd like to preview the text in small capitals inside Inkscape itself.

Research:

An article by Inkscape developer Tavmjong Bah, written in 2015, June 23: Font Features Land in Inkscape Trunk.

The article shows a working in-browser example, in both PNG and live SVG, of font features supported by SVG, with one feature being Small Capitals. The font used is Linux Biolinum, which I downloaded to test my own Inkscape with.

Another article, written in 2017 September 22, by David Asabina, shows a single letter's glyph being changed live in Inkscape's canvas, through the Feature Settings field: Stylistic Variants in Inkscape

Possible causes:

The Tavmjong Bah article has the following addendums:

One must use a trunk build of Inkscape linked with the latest unstable version of Pango (1.37.1 or greater).

Font feature support in fonts is usually minimal and often buggy. It’s hard to know what OpenType tables are available in which fonts.

[...]

Correct display of alternative glyphs requires that the same font as used in content creation is used for rendering. On the Web the best way to do this is to use WOFF but Inkscape has no support for using User fonts (this is a future goal of Inkscape but will require considerable work).

While the reason for my problem might be staring me right in the face in that quote, I don't know enough about the subject matter to tell.

I am also not a professional font designer, and I apologise if any answer(s) will involve a level of expertise in that field that I might not be able to grasp.


Specifications:

  • Linux Mint 17.2 (Yes, I should have it updated at some point.)
  • Inkscape 0.92

1 Answer 1

0

Answer

This appears to be an issue with your particular file or your particular system. First try testing this on a brand-new file, using the default fonts and default everything else, to ensure there's not something else in your SVG that's confusing Inkscape.

If that doesn't work, try updating to the latest version of Mint. Version 17 was first released in May 2014, which is at least a year before Inkscape supported this feature.

Background

Testing on Win 10 v1909 with Inkscape v0.92

I started with a brand new file in Inkscape, added a text object (F8), typed Testing Small Caps, selected all the text, went to the Variants tab, chose Capitals > Small, and clicked Apply.

Setting both Small and All small work as expected. The preview shows up in Inkscape, and it also works properly in the browser.

CSS Implementation

I saved the SVG file with Inkscape Capitals variant set to Small and opened it in a text editor. Here we can see that Inkscape is setting the CSS attribute font-variant-caps: small-caps; to make this happen (along with a ton of other stuff by default, which I've hidden here with … ellipses ). This is exactly as you were expecting to see.

<text …>
   <tspan … style="… font-variant-caps:small-caps; …">Testing Small Caps</tspan>
</text>

And when using Inkscape to set All small, a text editor reveals that Inkscape is using the CSS font-variant-caps:all-small-caps;.

1
  • Thank you very much! I had already tested it with defaults, so your second advice is probably going to be the solution. A small shame then, that I didn't have a problem others would likely have and need a solution for, but that also makes me appreciate your help even more, for such a unique personal case.
    – carré
    Apr 7, 2020 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.