Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with font changes #316

Open
SpoonMcForky opened this issue Sep 16, 2021 · 1 comment
Open

Issue with font changes #316

SpoonMcForky opened this issue Sep 16, 2021 · 1 comment
Labels

Comments

@SpoonMcForky
Copy link

SpoonMcForky commented Sep 16, 2021

I opened an issue a while ago about something similar, but now I'm getting a whole different error. I tried changing the font and it gave me an error:
image
I just assumed it was an updated error message of the old problem, so I changed it back to a system default font, and after a couple of restarts, it started working again. So there's still the issue of not being able to load fonts that aren't system default, but now it just crashes and gives that error message. I've installed the font with an admin command prompt as well, so I don't think it's a problem with a font or if it's installed globally or not

Edit: Now for some reason, after I changed it back to a system default font, it loaded the font that I originally wanted.

@Piotrekol
Copy link
Owner

Piotrekol commented Sep 17, 2021

From a technical standpoint, this error can appear only if font file can't be found or it is corrupted.
This is configuration for each output pattern that is sent to overlay: https://github.com/Piotrekol/StreamCompanion/blob/master/plugins/FileMapDataSender/FileMapDataSender.cs#L45.
Overlay first looks in Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts registry key for user and machine roots for font entry that matches provided name.
If found, it uses font name provided in registry and constructs following path: %windir%\Fonts\<fileName>.

To be honest, I don't remember why this was handled in this exact way(other than primitive configuration parser on overlay side, which didn't allow for sending full paths).

I'll revisit this and most likely replace current parser in overlay with rapidjson, which will then allow passing full font path directly instead of this unnecessarily complicated method.

/edit
As to why it keeps crashing even after changing the font: overlay configuration is updated only after changing song in osu!(SC has to be running while that is happening). This could be avoided by changing font in SC, and then stopping both SC and osu!. By doing that you make sure that memory files holding current configuration are wiped, and when SC starts again it will set it with correct font name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants