Please implement full support for font weights

Asked by Kyli Rouge

Please implement full support for font weights! I have some beautiful fonts trapped behind thin weights that I can't use in Inkscape. Even when I change the XML to say "font-weight:100", it still displays the normal thickness. I know the font is there because in the Font pane, it displays correctly, but the actual editor doesn't.

Question information

Language:
English Edit question
Status:
Open
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

Hi Kyli,

font-weight: 100 is more on the thin end of the spectrum... See http://www.w3schools.com/cssref/pr_font_weight.asp

Inkscape 0.91 will only use font-weights that exist for your font, so if the font does not come with the corresponding variant, it will no longer emulate the weight.

You can read more about that in this blog article by one of our developers:
http://tavmjong.free.fr/blog/?p=822

It rather looks to me as if it had been forgotten to apply this change to the preview, too...

It still works for faked italics, if you enter 'italic' into the field for the style in the text tool's toolbar, but it doesn't work for bolding.

Kind regards,
 Maren

Revision history for this message
Hachmann (marenhachmann) said :
#2

I've linked the corresponding bug report to this question (issue 4) . Feel free to add yourself to the supporters by using the 'Affects me, too' button at the top.

Revision history for this message
Kyli Rouge (kyli) said :
#3

I don't think you understand. I expect it to render just as well as Chrome: https://goo.gl/photos/4bun89J6cgGFU9KAA
But it renders like this instead: https://goo.gl/photos/zMM35XvdYGnxAc9T8

Revision history for this message
Hachmann (marenhachmann) said :
#4

Yes, Chrome *does* emulate the font weights that are not there. Inkscape only uses those that actually exist. So there's no surprise.

You need to use a font file that has the font-weight you need available directly. This will give you a much better quality than Chrome's font weight emulation.

Revision history for this message
Hachmann (marenhachmann) said :
#5

(or does it not look different for 'light', 'normal' and 'medium'?)

Revision history for this message
Kyli Rouge (kyli) said :
#6

I do have all the files (thin, light, normal, medium, bold, and black). Chrome weight "emulation" only makes fonts bolder, not thinner.

Revision history for this message
Hachmann (marenhachmann) said :
#7

And did you select those from the list that is displayed in your image? Or how did you assign the font weights?

Revision history for this message
Kyli Rouge (kyli) said :
#8

From the XML directly. I really only use Inkscape as a quick preview for writing SVGs.

Revision history for this message
Hachmann (marenhachmann) said :
#9

So it works if you select the variant via the GUI, but not if you add the font-weight attribute which corresponds to the to the XML?
I just tested this with another font, and replacing the font weight with a number works flawlessly, for that font.

There must be something about the Roboto font that doesn't work well with Inkscape.
The development version of Inkscape seems to throw medium and regular, as well as thin italic and light italic together :/ .

Light doesn't seem to exist in a non-italic format... I got the latest font from here: https://github.com/google/roboto/releases

Maybe that gives you some clues... Your best bet would be to search through the bug reports, and create a new one if there isn't one about this yet, explaining your problem in as much detail as possible right from the start.

Revision history for this message
Kyli Rouge (kyli) said :
#10

It does not work no matter how I select the variant.

I think Roboto encodes its several files as one font family, so it'll show up on font selectors as one or two fonts, which are actually several typefaces.

Not sure what you mean by "Light doesn't seem to exist in a non-italic format", since when I go to that same page you link and download roboto-hinted.zip I see this: https://goo.gl/photos/WdkY9c9bz84QVoTb9

Revision history for this message
Kyli Rouge (kyli) said :
#11

By the way, other image editors like PhotoImpact have no problem using all of Roboto's weights, so it's not a problem with the font or how it's installed.

Revision history for this message
Hachmann (marenhachmann) said :
#12

Kyli, if you like, you can keep an eye on our website at https://inkscape.org for announcements of pre-release versions of Inkscape.

There will soon be some builds for different operating systems available (unless you're on Ubuntu/Ubuntu-derived Linux distro, then you can just get them from the ppa: https://launchpad.net/%7Einkscape.dev/+archive/trunk)

You could then test if the new version still exposes this problem. There has been a lot of work done on font-related things, so the chances aren't bad (however, that version is not recommended for production, it still has got some weird bugs).

Regards,
 Maren

Can you help with this problem?

Provide an answer of your own, or ask Kyli Rouge for more information if necessary.

To post a message you must log in.