Skip to main content

Posts

Showing posts from November, 2019

OTF fonts (e.g. Fira Code) look nasty on gVim in Windows

I really like the "Fira Code" font but it always looked nasty in gVim on Windows (my main text editor besides VS), and I really don't want to use a different font for each editor. After spending literally hours fiddling with stuff like the guifont setting, different font/size combos, custom font renderers (e.g. MacType), I finally realised the fonts themselves aren't the problem, nor the rendering settings.  The problem was that the chocolatey installer I had used installed OTF versions of the files, which gVim always used by default even if the TTF versions of them were installed. Uninstalling OTFs and installing TTFs fixed the problem immediately, and now once again I have consistent font rendering across all my text editors. Hooray.

Bonus font opinions:
Best: Fira Code, Cascadia Code, Source Code Pro (in that order)
Nope: Envy Code R, Inconsolata, Hack, Oxygen Mono, Anonymous Pro

Powershell error: "Retrieving COM class factory failed: class not registered (REGDB_E_CLASSNOTREG)"

The problematic command and full error message was:

>get-webbinding
"get-webconfigurationproperty : Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."

I was pretty stuck on the above error while trying to run a script for setting up sites in IIS which involved some calls to get-webbinding (in the WebAdministration module). After much digging around I finally ran into this post. Turns out, genius that I am, I had created a shortcut to the x86 version of Powershell when I first created the VM, so I'd been using the wrong bitness the entire time. I'm surprised I didn't have more issues!  Anyway, running the 64-bit (i.e. regular) version of Powershell fixed the problem immediately. Thanks jasonint32 ;)