All font weights are not shown

Bug #1555109 reported by Magnar Myrtveit
94
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Medium
Unassigned

Bug Description

I'm using Windows 8.1 64-bit, and have installed the Roboto font (https://github.com/google/fonts/tree/master/apache/roboto). There are 6 different font weights, so there are 12 different styles including the italic styles. Inkscape only shows 8, and the name in the Face column is sometimes wrong: "Thin" is actually "Light", and "Black Italic" is actually "Italic". The two "Thin" fonts and the two "Black" fonts are missing. They show up in other programs, such as Photoshop, so they are installed correctly.

Tags: fonts
Revision history for this message
Magnar Myrtveit (magnar-x) wrote :
Revision history for this message
Santhosh Thottingal (santhosh-thottingal) wrote :

I am seeing the same bug with another font which has Regular, Bold, Thins styles. Thin is missing in inkscape font selector.

Inkscape 0.91 r13725, on Debian GNU/Linux Unstable

Revision history for this message
Barry Broderick (broderick-barry) wrote :

I am also seeing this bug with the Roboto font (and other fonts). Only two of the 12 different Roboto styles are showing up in Inkscape. Fonts are installed in ~/.local/share/fonts and all styles show up in other programs.

Inkscape 0.91 r13725 on Arch Linux.

jazzynico (jazzynico)
Changed in inkscape:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Giuseppe Pennisi (giupenni78) wrote :

Same bug for me!

Revision history for this message
Mik (mikmikmik) wrote :

Same for me with 0.91 on Linux Mint.

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

Also reproduced on Windows XP (32-bit), lp:inkscape/0.92.x rev. 15325.
The console shows the following messages when selecting the font in the fonts selector:
-----
Warning: Font face with same CSS values already added: Roboto Light (Thin, Light)
Warning: Font face with same CSS values already added: Roboto Medium (Regular, Medium)
Warning: Font face with same CSS values already added: Roboto Light Italic (Thin Italic, Light Italic)
Warning: Font face with same CSS values already added: Roboto Medium Italic (Medium Italic, Italic)
-----

Could it be due to how the Face and the CSS name are linked? Light (CSS) is linked to Thin (Face) and Medium (CSS) to Regular (Face) in the Text and font dialog (Font tab, style part, see screenshot).

Related (and very likely the same root cause): Bug #1655512 "can't use weight 250 font variant".

Revision history for this message
David G. (davidgvs) wrote :

Also happens on 0.92 (Ubuntu) using Montserrat font, available here: https://www.fontsquirrel.com/fonts/montserrat
Thin and ExtraLight weights are not listed, and there is no possibility to force select them by typing manually in the font name either. This font has 9 weights total and shows only 7 of them in Inkscape.

Revision history for this message
Mik (mikmikmik) wrote :

Yes it seems to be a multiple of 50 issue. I edited the Roboto Thin "weight class" (Element > Font info > OS/2) in FontForge to be 100 instead of 250 and it shows well in Inkscape now. Font Manager actually have almost the same issue, it shows the Thin in the list but displays the Light instead in the preview. So you know you can still edit fonts to workaround this kind of issue (the problem is the font is modified so not cross-user anymore).

Changed in inkscape:
status: Triaged → Confirmed
Revision history for this message
yodatak (mryodatak) wrote :

Same with fedora 25 and inkscape 0.92 with Museo Slab any what to bypass this ?

Revision history for this message
Pander (pander) wrote :

With Roboto it lists weight=250 instead of Thin and weight=250 Italic instead of Thin Italic.

Revision history for this message
Cassie Serig (ccssnngg) wrote :

Has this bug been fixed? I have Windows 10 and InkScape 0.92.3.

I downloaded a few Google Fonts through the SkyFonts manager. They show up in my C:\Windows\Fonts folder, and in other programs like Gimp & Paint. However, NONE of the new fonts show up in InkScape.

Not certain if it's the same exact bug, but thought I'd check anyway.

Revision history for this message
Hachmann (marenhachmann) wrote :

No, it's not fixed. There's a lot of work going on with fonts currently, so it's highly probable it will be fixed in the next major version of Inkscape.

Revision history for this message
alexey (avael) wrote :

Not sure why the importance of this bug is set to 'Medium'. Inkscape is the best and the most precise svg->pdf converter out of there, but this bug is super-duper annoying. I'm having same issue with different font weights. Tried to change the weight to something different, using FontForge, but inkscape keeps using just one version, while actually I have two different versions - book and regular (the font is Bebas Neue). I've tried to change Book to something more generic, like Thin, but for some reason inkscape can only use the thin version (book/thin). If I remove this font from the system, it uses Regular weight. After several days of googling and playing with font settings, the only solution that worked for me was to change the font family of Book version to a separated family (Bebas Neue Book). I removed any links to the former family (Bebas Neue), and now finally I can use both fonts in inkscape. Thanks God we don't care about customer fonts, the conversion runs on our server and we can put any fonts there. Otherwise we would be trapped.. Please Please solve this bug. And thanks for such a great tool!

Revision history for this message
Hachmann (marenhachmann) wrote :

I'm not sure, it may already have been solved with some recent work done by Tav.

Would anyone here be willing to test the development version? We can help with setting that up, depending on your operating system.

Revision history for this message
lguedes (luis-guedes) wrote :

I'm still having this problem on Inkscape 0.92.4 on Windows 10 64 bit.

I'm guessing this is a variable font issue?

I'm looking at Bhanschrift, a Microsoft variable font. From the 15 variants that windows presents, only 12 will show in Inkscape and changing between some of them makes no difference on the text.

Revision history for this message
DH (d4h0) wrote :

Unfortunately, this isn't fixed in the 1.0-beta release (1.0beta2 (2b71d25d45, 2019-12-03)), nor in the development version (1.1-dev (b0eafcaf0b, 2020-02-17)).

However, maybe, I have found a workaround (that hopefull points one of the developers in the right direction for a fix for this bug):

It's possible to edit the font-weight in the XML editor and this seems to work correctly (most of the time).

If we delete the '-inkscape-font-specification' attribute, even the 'text style' indicator is selected correctly. Instead of 'weight=255', the actual name of the font style ('Thin') is displayed.

I wrote "most of the time" because, strangely, the following happens with the font 'Montserrat':

Every font weight but the first one (100) seems to work correctly. I'm not sure why, but the rest (200 to 90

Revision history for this message
DH (d4h0) wrote :

Seems like my comment got cut off. Why can't I edit my comment? The user interface of the site seems to be from the early 2000s... :)

Anyway, here is the rest:

Every font weight but the first one (100) seems to work correctly. I'm not sure why, but the rest (200 to 900) seems to work correctly.

Even more strange is that the 'text style' indicator for font-weight 100 is displayed correctly ('Thin'). But for some reason, font-weight 100 and 200 look identical in Inkscape.

I hope this all makes sense.

In the next comment, I will add a small guide that describes how to do what I described above for people who don't have much knowledge about web development and therefore can't do the above on their own.

Revision history for this message
DH (d4h0) wrote :

If you open the XML editor (select the text element and press Ctrl-Shift-X), you can define the font style by hand.

You just select the text node in the XML editor and click on the 'style' attribute (on the right side of the window), after which a pop-up with the CSS styles opens.

Next, you look for the 'font-weight' attribute (which should look like this: ';font-weight:normal;') and change the value to the font weight you desire.

For Montserrat, for example, '100' would be the value for the font weight 'Thin' (so we would change the CSS code to ';font-weight:100;').

For fonts on Google Fonts you can find the possible values for 'font-weight' in the following way:

1) Go to your font (for example https://fonts.google.com/specimen/Montserrat)
2) Scroll down to "Styles", were the different font styles are show-cased
3) Right-click on the font style you are interested in, and click on 'Inspect' (in Chrome. Firefox should have something similar).

Now you can look for the 'font-weight' value in the selected HTML element.

To get italic text you also have to change the 'font-style' attribute, which should look like this: 'font-style:normal;'. You just replace 'normal' 'with italic': 'font-style:italic;'

At this point, the 'font style' indicator of Inkscape will still say "Normal", no matter what font style you have selected in the XML editor. To fix that you can do the following:

When you edit 'font-weight' and 'font-style' you just delete the '-inkscape-font-specification' attribute. With 'Montserrat' it looks like this:

'-inkscape-font-specification:Montserrat;'

If you use a different font, there would something else in the place of 'Montserrat'.

Just delete the whole snippet ('-inkscape-font-specification:Montserrat;'), including the semicolon.

Revision history for this message
DH (d4h0) wrote :

Btw., the fonts that I've checked in FontForge (Oswald and Montserrat) all had weight class values that were multipliers of 100 (so the 'multiple of 50 issue' that mikmikmik mentioned shouldn't be the reason of the problem. At least not the problem I had).

Also: The workaround from the following bug report (linked above) doesn't seem to work (if I understand it correctly):

https://bugs.launchpad.net/inkscape/+bug/1655512

The author mentioned that it's possible to add the name of the font style to the font name - so instead of 'Montserrat' you would put 'Montserrat Thin' into the field of the font name.

If you do this, Inkscape puts a small warning sight besides the font name with the title "Font not found on system".

The result is that Inkscape substitutes the font ('Montserrat Thin') for something different ('sans-serif' in my case).

Revision history for this message
Hachmann (marenhachmann) wrote :

Hi Daniel,

thank you very much for your testing and investigations.

About a year ago, we opened our new bug tracker at https://gitlab.com/inkscape/inbox/issues/ .

We have set up a game for moving bug reports, too: https://alpha.inkscape.org/bug-migration/

Unfortunately, as there is no option to close this tracker without also making it invisible at the same time, and we have no way to tell people (who only come here to comment) about the new bug tracker.

Could you please help us by:

a) checking if this bug is already logged in the new tracker and
b) either opening a new report, summarizing your findings, or adding your information to any existing bug report for this topic?

Revision history for this message
Ian Bruce (ian-bruce) wrote :

relative to the statement above, "we have no way to tell people (who only come here to comment) about the new bug tracker."

the corresponding bug report in the new GitLab bug tracker for Inkscape seems to be this one:

https://gitlab.com/inkscape/inbox/-/issues/283

this bug is still very much an issue, as of Inkscape v1.2.2; hopefully it can be fixed sometime soon. it is very easy to replicate. (see bug report above.)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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