Saturday, September 19, 2009

Consolas Font in Code Snippet Windows

I have the Consolas font issue fixed for my code snippet windows. If you have the Consolas font installed, the snippet windows should now show in that font. I haven't figured out the line ending problem yet, though.

    1 using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Windows.Forms;
    5 
    6 namespace Test1
    7 {
    8     static class Program
    9     {
   10         /// <summary>
   11         /// The main entry point for the application.
   12         /// </summary>
   13         [STAThread]
   14         static void Main()
   15         {
   16             Application.EnableVisualStyles();
   17             Application.SetCompatibleTextRenderingDefault(false);
   18             Application.Run(new Form1());
   19         }
   20     }
   21 }

The issue with the font was that the  <pre>  tags for the coloring on the fragments weren't inheriting the  font-family:consolas  that was specified in the style for the  <div>. Modifying the Copy Source As HTML utility settings remedied that.

So now my settings for CopyAsHTML are:




No comments:

Post a Comment