Home Dashboard Directory Help
Search

Visual Studio editor considers ligatures to be a single character by Dean Harding


Status: 

Closed
 as By Design Help for as By Design


3
0
Sign in
to vote
Type: Bug
ID: 179193
Opened: 8/10/2006 6:50:42 PM
Access Restriction: Public
Duplicates: 179190 179191 179192
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

If I switch my Visual Studio font to something that contains ligatures (for example, "Calibri" has a ligature for "fi") then Visual Studio will consider that ligature a single character. It should either not use ligatures at all for such combinations, or at least handle the "backspace" and cursor-ing properly.

Note the steps and "expected"/"actual" behaviour I describe below is only one symptom. There are other, for example, if you put your cursor to the left of the "fi" ligature, and press the right-arrow, it'll move the cursor to the right of the "i", not in between the "f" and the "i" as you would expect. Also, you cannot select just the "f" or just the "i", you can only select both.

Of course, this doesn't just affect the "fi" ligature, but any ligatures in the font. It's just that I hit the "fi" one quite a bit (I seem to have lots of variables with the word "file" in them...

I've attached a screenshot of the bug. The "fi" immediately to the left of the cursor is a ligature, and if I were to hit "backspace" at this point, it would delete the whole "fi" ligature, rather than just the "i".
Details
Sign in to post a comment.
Posted by ahangama on 6/11/2008 at 9:40 AM
I totally agree with the previous comment.

I believe that this problem is a result of trying to support Indic Complex scripts. OpenType says that once a 'ligature' (they call complex characters something else there) is formed it cannot be decomposed. It is unfortunate that in the process of trying to accommodate much complex things, established technology has to suffer.
Posted by Edward Brey on 6/5/2008 at 8:35 AM
The problem is greater than editing convenience; it also affects consistency: The problem causes the IDE uses to use a different character counting scheme than the runtime. This means that for applications where the count of characters in string literals is important (yes, some still exist, e.g. writing to an LCD display), counting characters by pressing the arrow keys or using the Col indicator in the status bar gives incorrect results. Such a subtle source for bug introduction at least warrants a warning in the font selection dialog box when a vulnerable font is selected.
Posted by Microsoft on 9/14/2006 at 5:05 PM
Thank you for your bug report!

We have reviewed your bug and have decided that we will not be able to fix it for this version of Visual Studio. We are now closing the bug for archival purposes. Thank you for using Visual Studio!

Sincerely,
-VS DTP Code Essentials QA
Posted by Dean Harding on 8/15/2006 at 4:18 PM
Well, let's be fair here. It's not something that you are UNABLE to address, it's something that you don't feel you NEED to address. Which I guess is fair enough.
Posted by Microsoft on 8/15/2006 at 2:26 PM
Hi, thank you for reporting this issue. We do realise that some fonts are not optimal for code editing, so while this is a problem, this is not something we are able to address.

Thank you,
Prasadi de Silva
VS Program Manager
Sign in to post a workaround.
Posted by Edward Brey on 6/5/2008 at 8:42 AM
Use a font without without ligatures. Tradeoff: Modern fonts like Calibri have been optimized for easy reading on an LCD display. Fonts without ligatures tend to either be non-proportional (use more screen space) or not render as clearly on LCD displays.