I realize that changing the label and system font is not part of the settings. I am willing to get under the hood to change this.
Could you give any guidance on where to start?
I realize that changing the label and system font is not part of the settings. I am willing to get under the hood to change this.
Could you give any guidance on where to start?
We ship with 3 fonts in the OSCpilot/data directory. You could replace those. Those are baked into bitmap files for rendering on the GPU in C:\Users<username>\AppData\Local\OSCpilot\fontCache
So if you clean our that cache as well, it should rebuild the cache with your new font. I can’t guarantee this will work though, as issues with kerning/tracking etc may not work quite right
The 3 fonts installed by OSC Pilot are:
OpenSans-Regular.ttf
OpenSans-ExtraBold.ttf
MaterialDesignIconsDesktop.ttf
The fontCache holds subfolders of arial and ariblk and all the individual .png files.
I copied in some new .ttf files into the OSCPilot data folder, renamed them as the original names (above), cleared the fontCache folders and started the program. The program rebuilds the arial and arialblack folders from another source apparently, the result is the same as original installation. Is there another avenue to explore?
Ah sorry, yes we use the system Arial fonts as well since those are built into all the OSs we support. I think to hack those you’d need to replace the system fonts. sorry.
Yes, have also come to that conclusion.
I think a possible hack-around would be to build the .png glyph files and replace them in the \AppData\Local\OSCpilot\fontCache directory. I just need to find the method of building these from my desired font.
(I tried temporary substitution of the system Arial font and starting OSCPilot to trigger a rebuild, but no luck, seems to have pulled Arial in from somewhere else.)
Can I get a brief guidance on what method/format these PNG files are and if the numerical naming follows any particular pattern?
Thanks.
The naming is the glyph index in the font I think. It’s using this library to to the building, bit it’s possible it’s not a 1:1 match with the default tool.
Thanks, appreciated, working through it.
Downloaded the msdfgen tool, generated the new font glyphs, replaced the .png files in the font cache folder.
They are immediately overwritten by Arial when OSCPilot starts. ![]()
hmm sorry. I think we’re stuck then
We are unstuck! Downloaded the new version, and had immediate success with replacing one of the fonts with a font of my choice. Now I have a UI consistency!
How to use your own ttf font:
in the main folder OSCpilot\data folder, make back up copies of one of the font pairs. I renamed Inconsolata-Bold.ttf > Inconsolata-Bold.ttfbak Inconsolata-Regular.ttf > Inconsolata-Regular.ttfbak
Copy in the tttf font of your choice into the \data folder, ( I have done one font at this point, but it worked like a charm. ) Rename it with the original system name .
In my case, I renamed mainframe-opto-cyrillic.ttf > Inconsolata-Regular.ttf since there is only one font weight in my case, I made another copy and named it Inconsolata-Bold.ttf
As noted previously, OSCpilot builds png glyphs of the ttf fonts, they are stored in the app data folder and are rebuilt at startup if missing.
Find the folder \AppData\Local\OSCpilot\fontCache-72-2-12\Inconsolata-Regular.ttf and \AppData\Local\OSCpilot\fontCache-72-2-12\Inconsolata-Bold.ttf
Delete the contents of both folders. All png files.
Restart OSCpilot, (OSCpilot always rebuilds any missing font glyphs at startup) in the settings, choose Inconsolata as the font. Your font is now in play.
![]()
To restore, reinstall OSCpilot, or delete the png glyphs in the fontCache and restore the two original ttf files in the data directory.
Thanks for the work Malcolm!