Sublime Forum

Ruler line position is invalid with various fonts

#1

I have a ruler line set for 79.

I’ve noticed that the ruler line is not correctly positioned with various fonts, font sizes.

For example, using font_face “Source Code Pro” with font_size 14, the ruler line’s horizontal position is at 187, not 79.

I’m using Dev build 3064 with OSX 10.9.4, but I have noticed this with various builds, some non-Dev.

Is there a setting that I’m missing?

0 Likes

#2

i set rulers to 46 … orz by trial and error in order for it to be “80”

0 Likes

#3

Sorry if the question sounds daft, but are you sure you’re using “Source Code Pro” rather than “Source Sans Pro”? The latter is variable-width font and they don’t play nicely with Sublime’s indenting and rulers.

0 Likes

#4

I tried Source Sans Pro and Source Code Pro. The ruler line position was the same for both.

This got me to check my OSX font book. Source Code Pro was not there. I downloaded the OSX version and installed it. Then I quit Sublime and restarted it.

The Source Code Pro font now has the ruler line where I would expect it (within 1 or 2 chars).

Sublime doesn’t choke when a font is not in the font book. Either iSublime brings its own copies of all fonts - in which case there is a problem with the Sublime Text “Source Code Pro” collections - or Sublime just punts and substitutes some other font that is, as was pointed out in the previous post, variable width.

Anyway, my original problem is resolved. I am using Source Code Pro now and it looks great!

0 Likes

#5

Great!

Sublime doesn’t have its own font collection; it use whatever you have installed on your system. When you told it to look for a font that wasn’t there, either Sublime or OSX defaulted to a variable width font, causing the issue. No biggie! :smile:

0 Likes