ModOrganizer2 / mob

Mod Organizer Builder.
15 stars 22 forks source link

Weird font(?) change when building `gtest` #4

Open Holt59 opened 4 years ago

Holt59 commented 4 years ago

When mob "build and install" gtest, I often (always?) get a weird font change (or something similar) in the console:

image

It always happens on the gtest task.


Reference font just to confirm:

image

isanae commented 4 years ago

Looks like it's a combination of codepage 65001, the Consolas font and powershell. I can reproduce it reliably by selecting the Consolas font in the console and doing

> chcp 65001
> powershell

I change the codepage to 65001 (UTF-8) for some tasks and tools to handle non-ascii characters. Without it, some tasks fail if you have non-ascii characters in %TEMP%, for example.

When powershell runs, it will change the active font if it thinks the current one can't display everything from the codepage. In this case, it assumes Consolas cannot display UTF-8 and changes to raster. I don't execute powershell directly, but I'm pretty sure msbuild does.

Note that it doesn't happen with the new terminal at all and I've never had the problem when mob is launched from the debugger. I can reproduce it if I change the debugging settings to launch cmd and type the two commands above, but not when running mob directly. Nevermind, I get it all the time

Not sure what to do about that.

isanae commented 4 years ago

I did a crap workaround in 17b6aa2fb72bb9c8c550f6efb48e9bb8596f4afc. I restore the console font if it changed once mob finishes. It's not a fix, so I'll leave this open.