Sublime Forum

Zero '0' char hard to distinguish from eight '8' char, help

#1

Hello,

Sublime is Awesome!!! I want to customize it to fit my needs.

With the default font_face, when the font size is small, the zero, ‘0’ character (which has a diagonal) is very difficult to distinguish from the eight, ‘8’, character. Is there a way I can edit the font (of just the ‘0’ character) so that the diagonal is omitted when the font is below a certain size, say 10 pt.

(I know I can change the font_face to Courier or others, but I like the default)

Thanks in advance!!!

0 Likes

#2

Obviously, if you don’t like the font, then change to another font. There are more choices than Courier you know. Since you don’t like slashed zeros, try a font with filled zeros instead, such as Andale Mono, Deja Vu Sans Mono, or Source Code Pro.

0 Likes

#3

quick and dirty: wrapping this neatly with a settings file is left as an exercise for the reader

[code]import sublime

def on_font_size_change():
sublime_prefs = sublime.load_settings(“Preferences.sublime-settings”)
font_size = sublime_prefs.get(‘font_size’)
if font_size < 10 :
sublime_prefs.set(‘font-face’, ‘Source Code Pro’)
else
sublime_prefs.set(‘font-face’, ‘’) #use the default

def plugin_loaded():
sublime.load_settings(“Preferences.sublime-settings”).add_on_change(‘font_size’,on_font_size_change)[/code]

0 Likes