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

Some character sequences get merged

Open Pantalaim0n opened this issue 7 years ago • 7 comments

I've noticed some weird behaviour when typing a certain sequence of characters. They get squeezed to the width of one single character.

It happens when I type lowercase L, U+00B7 (middle dot), lowercase L Using both uppercase L also shows this issue.

I began to notice it when I enabled 'Show non-printable characters' in Netbeans, which uses U+00B7 as a space character. merged_netbeans

I could also reproduce this issue in Notepad: merged_notepad

I haven't found any other sequence that behaves the same.

Pantalaim0n avatar Mar 22 '18 08:03 Pantalaim0n

This is a character sequence common in Catalan (e.g. paral·lel), and the behavior is triggered here: https://github.com/adobe-fonts/source-code-pro/blob/b47764205aa316b2c172dc37921526dc45153e0a/Roman/familyGSUB.fea#L210-L211

It seems to be a bug in Netbeans to merge the layer of printable characters with the layer of non-printable characters by using an OpenType feature across them.

frankrolf avatar Mar 22 '18 08:03 frankrolf

That sub l periodcentered l by lcat; and the one for Lcat are in lookup GLYPH_COMPOSITION_LATIN_NONCONTEXTUAL which is in feature ccmp and in DFLT dflt. The ccmp feature is on by default, and this substitution is on in all languages.

This seems like Netbeans is just applying what is defined in the font.

moyogo avatar May 27 '18 14:05 moyogo

While Netbeans shouldn’t use the U+00B7 for displaying the space character to avoid the issue here, it’s a bit odd to expect that. One may use U+00B7 between two Ls and not expect a Catalan geminated L in some cases.

moyogo avatar May 27 '18 14:05 moyogo

This seems like Netbeans is just applying what is defined in the font.

That is correct, but Netbeans is also effectively breaking any other sequence-based OT feature through inserting U+00B7 into the character sequence.

What would you suggest? I can see the pragmatic approach (ccmp) being more accessible to Catalan users, rather than hiding the feature behind language tagging, which we’ve done for other fonts.

frankrolf avatar May 27 '18 17:05 frankrolf

This issue is happening with VS Code as well image

escobera avatar Oct 28 '20 16:10 escobera

Can you bring that up with VS Code?

frankrolf avatar Oct 28 '20 16:10 frankrolf

Someone already did here: https://github.com/microsoft/vscode/issues/106583

Thanks

escobera avatar Oct 29 '20 03:10 escobera