Skip to content

Instantly share code, notes, and snippets.

@tsvx
Last active September 20, 2017 12:57
Show Gist options
  • Save tsvx/ed17fec67404a4340a79db8fc20d671a to your computer and use it in GitHub Desktop.
Save tsvx/ed17fec67404a4340a79db8fc20d671a to your computer and use it in GitHub Desktop.
MSDN2012 EN-US patch to nifty display the code
diff --git a/branding.css b/branding.css
index 1e8c4c6..f3030bc 100644
--- a/branding.css
+++ b/branding.css
@@ -43,7 +43,7 @@ a img
}
pre
{
- font-family:Courier, "Courier New", Consolas, Monospace;
+ font-family:Consolas, "DejaVu Sans Mono", "Courier New", Courier, Monospace;
overflow: hidden;
white-space:pre-wrap;
word-wrap:break-word;
@@ -420,7 +420,7 @@ span.sub {vertical-align:sub }
span.sup {vertical-align:super }
span.big {font-size:larger}
span.small {font-size:smaller}
-span.tt {font-family: Courier, "Courier New", Consolas, monospace}
+span.tt {font-family: Consolas, "DejaVu Sans Mono", "Courier New", Courier, Monospace}
div.clsNote
{
background-color:#EEEEEE;
@@ -599,7 +599,7 @@ div.libCScode table td, pre.libCScode
}
div.libCScode pre
{
- font-family:Monospace, Courier New, Courier;
+ font-family:Consolas, "DejaVu Sans Mono", "Courier New", Courier, Monospace;
font-size: 1.05em; /*13pt*/
color: #000066;
white-space:-moz-pre-wrap;
@@ -620,7 +620,7 @@ pre.ideCScode
word-wrap:break-word;
font-size:1.05em; /*13pt*/
border-bottom:#ffffff 5px solid;
- font-family:Monospace, Courier New, Courier;
+ font-family:Consolas, "DejaVu Sans Mono", "Courier New", Courier, Monospace;
white-space:pre;
display:block;
}
@@ -1031,7 +1031,7 @@ IMG.OH_offlineIcon
/*Start of colorization*/
div.seeAlsoStyle { padding-top:5px;}
td.nsrBottom { height: 0.6em; width: 100%;}
-SPAN.code { FONT-SIZE: 105%; COLOR: #000066; FONT-FAMILY: Monospace, Courier New, Courier}
+SPAN.code { FONT-SIZE: 105%; COLOR: #000066; FONT-FAMILY: Consolas, "DejaVu Sans Mono", "Courier New", Courier, Monospace;}
SPAN.ui { FONT-WEIGHT: bold}
SPAN.math { FONT-STYLE: italic}
SPAN.input { FONT-WEIGHT:700;}
@tsvx
Copy link
Author

tsvx commented Sep 20, 2017

Local installations of MSDN since 2012 (?) display C# code very ugly (used ugly font) with certain non-english locales (e.g., cyrillic).
To overcome this, you need to patch the file branding.css in the VISUALSTUDIO_2011_BRANDING_EN-US.NUMBER.mshc located in C:\ProgramData\Microsoft\HelpLibrary2\Catalogs\VisualStudio12\ContentStore\en-US. The NUMBER is not specified as it increases with Contents upgrades.

This patch is for example, the main idea is not to use Monospace font for code, as IE replaces it by something terrible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment