source-code-pro icon indicating copy to clipboard operation
source-code-pro copied to clipboard

Source Code Pro 2.042 In ExtraLight and ExtraLight Italic variants each character has more width than in other variants

Open SubhamSatyajeet opened this issue 2 years ago • 3 comments
trafficstars

Windows 10 Source Code Pro 2.042 (Regular), 1.062 (Italic), TTF

In ExtraLight and ExtraLight Italic variants, each character is wider than their counterparts in other variants.

Tested on Intellij IDEA and Notepad++.

Regular Variant image Medium Variant image Semibold Variant image Black Variant image Light Variant image ExtraLight Variant image

SubhamSatyajeet avatar Sep 28 '23 09:09 SubhamSatyajeet

I was curious about this, so I did some investigation:

Focusing on this part of the bug report, I can see what you mean: Screenshot 2023-09-28 at 13 23 35

The last t in Document seems to end up just slightly further to the right than in the screenshot above (compare with the 🔎).

However, I can also see that there’s some contrast applied to the letters, see for example the e and s – that’s not how those letters look like in Source Code ExtraLight: Screenshot 2023-09-28 at 13 26 53

In your screenshot, you’ll see quite a bit of contrast in the e, while the design has virtually none.

The letters are all the same width across all the weights of course: Screenshot 2023-09-28 at 13 21 12

So what I think is going on here is Notpad++ compensating for a font it deems “too thin” to display. This is something that’s called “smear bolding”, and is known from decades-old versions of MS Word.

FWIW, I don’t observe the issue as claimed in my SublimeText setup: Screenshot 2023-09-28 at 13 22 44 Screenshot 2023-09-28 at 13 22 56

The conclusion is – this can only be fixed by Notepad++ – either via a bug report, or user settings.

frankrolf avatar Sep 28 '23 11:09 frankrolf

@SubhamSatyajeet There is a work-around. The old "smear-bold" only affects fonts with a usWeightClass of under 250. For example it would affect ExtraLight (200) and Thin (100). (the correct weights) So as a work-around some fonts have ExtraLight set to 275, and Thin set to 250 - to prevent the stupid text engine from distorting the characters. Here is the two ExtraLight fonts with the weight set to 275. Try these: SourceCodePro-ExtraLight-275.zip

kenmcd avatar Sep 28 '23 19:09 kenmcd

@frankrolf I made a mistake in my first comment - The two editors where this was reproducible were IntelliJ IDEA and Notepad++. Sublime Text works as expected. I'll close this issue since it is not related to the fonts themselves.

@kenmcd Thanks for the 275 width fonts, this did work for IntelliJ IDEA! (not for Notepad++)

SubhamSatyajeet avatar Sep 29 '23 05:09 SubhamSatyajeet