Sublime Forum

Font display issue with Meslo LG

#1

Hi all, I may be the only person who’s seen this problem - and it’s not really so much a problem as just something I wanted to bring up in case there is a larger font rendering problem in ST2. Take a look at the screenshot below:

http://i.minus.com/ikstWr8X0VMCP.JPG

On the left, size 10 “Meslo LG M DZ”. On the right, size 9. You can really see how the guidelines slowly shift (or rather the text does) the more you indent.

I also threw together a screencast showing the issue here: screencast.com/t/j2lLIt9us

@quodlibet has helped me test this out in another thread, but we were getting off topic and the original problem in that thread was resolved. So I wanted to start a new thread and see if anyone else has any font rendering issues, or if anyone has any insight to this particular issue. That other thread (if you want to see our troubleshooting) is here: viewtopic.php?f=3&t=6937#p29389 (that will start you off at the right spot in the thread).

Here’s a rundown of the testing done:

  • Reverted to default ST2

  • Tested in Linux, Win 7, and Win XP – Linux displays fine
    , Windows does not

  • Downloaded Notepad++ and set the display to tab size 2, spaces, same font and size – it displayed fine there which makes me think it’s not a Windows rendering issue.

I think that’s most of the info… let me know if anyone has any other ideas for troubleshooting.

Thanks!

0 Likes

#2

[quote=“SeanWcom”]Hi all, I may be the only person who’s seen this problem - and it’s not really so much a problem as just something I wanted to bring up in case there is a larger font rendering problem in ST2. Take a look at the screenshot below:

http://i.minus.com/ikstWr8X0VMCP.JPG

On the left, size 10 “Meslo LG M DZ”. On the right, size 9. You can really see how the guidelines slowly shift (or rather the text does) the more you indent.

[/quote]

Looks to me like the text is consistently lined up; the ‘a’ in each indented line is at the same position relative to the ‘d’ in the line above. My take on this is that it’s the guidelines that are misaligned. I know there’s size information embedded in fonts (that’s the extent of my knowledge here), so it may be that the size information in the 9 pt font is incorrect.

0 Likes

#3

You are correct, the text IS properly aligned. But when looking at a huge file full of indented code, you rely on the guidelines for visual representation of nesting, etc.

So whether it’s the font or the guidelines, I don’t know. But I can state fairly certainly that it’s not a font specific issue. As I mentioned above, the same font has been used on three different OS’s. It worked fine in Linux, but not in Windows. However, in Windows, using Notepad++ it DOES work fine. That leads me to believe that it’s not an OS issue or a font issue.

0 Likes

#4

This appears to be purely an indent guide rendering issue, rather than anything to do with font rendering (apart from the indent guides using the font metrics for sizing, of course)

Is your file indented with spaces or tabs? Does changing from one to the other effect the display of the indent guides?

0 Likes

#5

@jps, I’ve got tab size set to two. In the screens above, I’m using spaces instead of tabs. If I switch to tabs (still at Tab Size 2), the guides are lined up perfectly.

0 Likes

#6

Tabs and indent guides are drawn at tab width intervals, which is defined to be tab_size * width of ‘m’. What you’re seeing will happen if spaces and ‘m’ characters have different widths in the font. I should likely fix this.

0 Likes