Sublime Forum

Font and code folding

#1

Hello!

I just stumbled upon something really strange in ST3 (Build 3059) for Mac OSX Mavericks (10.9.3). Just in case, I deleted my Application Support/Sublime Text 3/ directory and reinstalled the editor but the problem still persists.

Code folding works perfectly except when I set a font for the editor. Adding “font_face”: “font_name” to Preference.sublime-settings makes code folding to misbehave, independently of the font chosen (I even tried with just empty “”). I’m attaching an image with the before and after.

My settings file looks like this (I reinstalled everything from scratch):

{ "font_face": "Adobe Source Code Pro", "font_size": 14, "fade_fold_buttons": false, "translate_tabs_to_spaces": true, "highlight_line": true, }

Is there anything else I can send you?

Thanks

PS: The board doesn’t let me attach the screenshot so I uploaded it here
postimg.org/image/ahvckhik1/

0 Likes

#2

The font in your second screenshot is a proportional and therefore definitely not “Source Code Pro”, which is a fixed-width font. You’re probably using “Source Sans Pro”.

Sublime doesn’t play all that well with proportional fonts. Try switching to fixed-with font and see if the problem is resolved.

Edit: I re-wrote the post to clarify what I was talking about.

Alex

0 Likes

#3

Thanks!

That solved it. I copied the preferences from my Linux machine and there the font name is “Adobe Source Code Pro.” On my Mac it’s plainly “Source Code Pro” so it was probably substituting the font with the system default which is not fixed width.

0 Likes