Archive for Coding-fonts tag

Humane theme for TextMate and Xcode

My Humane theme for Visual Studio is getting a fair bit of traffic today courtesy of Scott Hanselman. Given I have been messing with Mac development lately I thought it was worth porting to TextMate and Xcode 3.

Panic Sans coding font

My Envy Code R programming font isn’t great on the Mac yet so I have configured these to use the excellent but overlooked Panic Sans in 12 point which unlike Monaco is available in bold, italic and bold italic variants. (I love my comments to be italics)

To install this font you must:

  1. Download Panic Software’s Coda application
  2. Navigate to the Coda application and choose Show Package Contents
  3. Navigate to the Contents/Resources folder
  4. Double click on the Panic Sans.dfont and press Install Font
  5. Panic Sans is now available to other applications too

TextMate

Screenshot of the Humane Theme and Panic Sans 12 point inside TextMate

Download Humane theme for TextMate (5 KB)

Launching the downloaded .tmTheme file will cause it to copy to ~/Library/Application Support/TextMate/Themes
Select Humane from the Preferences > Fonts & Colors pane in the drop-down list box

Xcode 3

Screenshot of the Humane Theme and Panic Sans 12 point inside Xcode 3

Download Humane theme for Xcode (4 KB)

Copy to ~/Library/Application Support/Xcode/Color Themes
Select Humane from the Preferences > Fonts & Colors pane in the drop-down list box

Porting themes

Until somebody comes up with an IDE-independent theme format or cool converter we’ll have to do it by hand. The easiest way I have found is:

  1. Install Hex Color Picker on the Mac to allow entering hex into the standard color picker
  2. Open the Visual Studio theme .vssettings file in a text editor
  3. Open up the Fonts & Colors preferences pane up in your Mac IDE
  4. Go through each one and choose the nearest match in the .vssettings
  5. Transcribe each color by reading the VS colour pairs backward, e.g. 00631409 becomes #091463

[)amien

Getting the hint (Where is Envy Code R?)

I know, I said there would be a good chance that the next version of Envy Code R would be out this weekend but the annoying sizing, thickness and cropping issues that came up at some sizes above and below the optimum 10 point were really annoying me.

Many articles later, some playing around with Microsoft Visual TrueType and much frustration and experimentation later I think I’m on the right path.

Here is how Envy Code R is looking on Windows right now with standard font smoothing.

Envy Code R hinted on Windows with standard font smoothing at various sizes.

ClearType doesn’t look as good and I’m still learning the black art and the implications of each type of hinting instruction.

Strangely, these hints seem to be ignored on the Mac which is still rendering everything a little too thick especially on curves. Perhaps that is why so many developers create a Mac-specific version?

Once I’m happy with how the regular version works I’ll put it online for download and then whip the bold and italic variants in to shape and any feedback into regular for the proper 0.7 release.

A newer version of Envy Code R is available.

[)amien

Envy Code R coding font v0.7 preview

Envy Code R font preview #7 highlighting some of the characters in a chart.The next version of my Envy Code R font especially designed for programming (monospaced, easily distinguishable characters) is nearing completion and represents a very response-driven update to feedback, specifically:

  • ReadOnly, Greg Jandl: Comma clarified and change applied to full quotation marks, semi-colons and various accented letters
  • Adrian Bool, Greg Jandl: The slash on the zero has been redrawn to be less heavy
  • jxp: The Euro symbol has been redrawn from scratch
  • Aristotle Pagaltzis: Braces are more curvy and a full set of box-drawing characters have been added
  • IRC: Hash sign with longer legs

I have also fleshed out a number of additional symbols and accented letters that has seen the number of code pages supported increase to 12 pages and made a large number of tweaks to the italic version which was a last-minute addition to 0.6 (PR6) and had a number of errors especially round the accented letters.

Of course what you really want to know is how the new version looks in Visual Studio with that lovely Humane theme of mine:

Envy Code R font at 10 point in Visual Studio 2008 with my Humane theme.

There is still some work to do on the sizes above and below 10 point (again) as well as fleshing out a few more symbols, letters and italicising additional letters such as a curly k and rounder e which I hope will be finished towards the end of this week.

The observant followers may have noticed a pixel has been shaved off the vertical height which now brings it in line with the bitmapped Envy Code B coding font. I had intended on making the change for some time and the box characters practically demanded it to ensure the centres were whole pixels and not off-centre but some people may not like it…

A newer version of Envy Code R is available.

[)amien

Droid Sans Mono great coding font

Google’s Android project, an open platform for mobile devices, has been hitting the news a lot in the last couple of days with it’s open APIs, Java-based development platform and optimized virtual machine which includes the lovely set of typefaces from Ascender Fonts known as the Droid family.

Check out previous coverage of the well-known and lesser-known coding fonts.

There are a number of Droid fonts including Droid Sans and Droid Serif but of particular interest for developers is the Droid Sans Mono font that looks great in Visual Studio not only at my favourite 10 point… but from 7 point upwards with either ClearType or standard font smoothing although some might find the fact it smooths at all sizes a little soft (or Mac-like).

Here it is at 9 point with Rob Conery’s Vibrant Ink 2 theme:
Screen shot of Droid Sans Mono at 9 point with Vibrant Ink 2 theme in Visual Studio

Here it is at 11 point with my Humane theme:
Screen shot of Droid Sans Mono at 11 point with Humae theme in Visual Studio

And here it is 12 point in Xcode on the Mac:
Screen shot of Droid Sans Mono at 12 point in Xcode on the Mac

The only issues are:

  • the lack of a bold weight or italic variant which limits the syntax highlighting options
  • the 0 is currently not slashed (there could be some other indistinguishable character pairs)

Being that the Droid family is Apache licensed no doubt somebody will fill that gap (okay, okay, I’ll give it a shot when I get some time;-)

Download Droid Sans Mono (TrueType TTF) (79 KB, 10/2011 source)

Try my free scalable coding font Envy Code R (shown below) with Visual Studio italic support, has a bold variant and distinguishable pairs 0O etc:

Envy Code R font at 10 pt with italics in Visual Studio using Humane theme.

[)amien