Sublime Forum

REQUEST Monospace font-family typeface variants

#1

Code blocks. Apps have to conform to language code blocks, mainly Unicode for Latin languages, or the apps would be completely impossible to develop and use. Code blocks do not exclude monospace font-families used extensively to write in code languages like Python and PHP. In it’s Preferences.sublime-settings-User file, Sublime Text Version 3.0 Build 3143 provides font-settings:

  • "font_face": "Menlo",
  • "font_options": "gray_antialias",
  • "font_size": 16,
  • "theme_font_options": "gray_antialias",

Now, font options are not handled in similar fashion by core Sublime services: some options have double quotes, some have no quotes, some oddly repeat (almost?) identical functionality. All forgoing is simply to say, my request is not a simple programming fix, but very likely a major upgrade, as language code blocks are the foundation of all that is [digital].

Menlo for my 2017 macOS machine comes with four monospace typefaces that I am fond of.

  1. Menlo Regular
  2. Menlo Italic
  3. Menlo Bold
  4. Menlo Bold Italic

Menlo typeface variants cannot be used in current Sublime Text build. These four fonts each have unique characters and glyphs, profiles and registrations and licensing plus tons more. In most text editors swapping font in code view is possible, but catatonically invokes global typeface change, as only one typeface can be used at a time. More expensive editors (e.g., Dreamweaver) may allow to use all my Menlo variants in one code document. But this in not easily accomplished, if Sublime is to implement it.

Each typeface has its own unique display field. Type a paragraph of Menlo Regular, and all the lines are evenly spaced. Make one word on one line in the middle of the paragraph Bold and the line containing Bold pushes lines above up 1pt, and pushes lines below down 1pt. When Dreamweaver implemented code view typeface customization, years of trouble-shooting ensued. That is not to say Sublime Python is anything like Dreamweaver C++. Just pointing out that using font variants (typefaces) in Sublime’s perpetual code view is not a simple implementation.

However, Menlo “font” does offer developers the opportunity to deploy multiple Menlo “typefaces”. Typeface “variants” such as Menlo Bold allow alteration of default Menlo Regular. Variants can transcend code technologies in a document to indicate a combined purpose transcending technologies. For Menlo with four typefaces, four unique systems of code identification can be provided. Presently, Microsoft and Apple both provide Courier New and another font-family with four typeface variants in each of multiple system monospace families. Sublime’s typographic technology is falling behind market provision. Sublime’s code environment is consequently reduced in value and performance capability.

It would be greatly appreciated if Sublime can add the ability to use multiple monospace typefaces, where those typefaces belong to the one font-family indicated in Preferences.sublime-settings-User “font_face”. At a future date, multiple monospace font-families will extend Sublime technologies.

0 Likes

#2

I think this is the only part that makes any sense.

It’s also something that has been requested a bunch of times already. Love the bs that leads up to it though.

0 Likes

#3

As far as I know it does…

I’m using Source Code Pro - the Light variant… The exact code is:

	"font_face": "source code pro light",
	"font_size": 10.5,

The sizing for fonts in Sublime Text leaves much to be desired - it seems I can only go up in half increments instead of tighter…

Source Code Pro is a monospaced font with MANY different types - bold, italics, strike through too if I recall correctly, and light / medium / dark of all with possibly an additional layer of depth…

I’m using Windows but this may work for your PC running OSX too… When using menlo, type in what you want… menlo regular ( or omit regular - source code pro may have a regular but regular may be omitted as I was unable to use it when using that )…

so try these:
“menlo”
“menlo bold”
“menlo italic”
“menlo bold italic”

etc… Because your PC runs a *nix style OS, and depending how Sublime Text loads fonts ( whether or not it takes the exact case-sensitive name in the settings and uses that to find the right file, or it converts them to lower-case and loads all fonts into a list key-mapped from lowercase to exact file-names is anyones guess at the moment ) you may need to use “Menlo”, “Menlo Bold”, etc…

But try it out… There’s no reason why the font shouldn’t work in Sublime Text as far as I know… You may need to use UTF-8 encoding for your files though…

0 Likes