SystemFont not finding user's installed fonts
See original GitHub issuePrerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of Fonts
- I have verified if the problem exist in both
DEBUG
andRELEASE
mode - I have searched open and closed issues to ensure it has not already been reported
Description
On Windows when someone install a font without clicking “Install for all users”, the font will be installed in the folder “%userprofile%\AppData\Local\Microsoft\Windows\Fonts” and not in “C:\Windows\Fonts”.
Steps to Reproduce
In this case, doing SystemFonts.Find("myfont");
will throw an error because it’s not searching in “%userprofile%\AppData\Local\Microsoft\Windows\Fonts”
System Configuration
- Fonts version: 1.0.0-beta0013
- Other Six Labors packages and versions: ImageSharp-1.0.3, ImageSharp.Drawing-1.0.0-beta11
- Environment (Operating system, version and so on): Windows 10 20H2
- .NET Framework version: .NET Core 5.0
- Additional information:
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why does a font on my computer show up under one ...
Under Windows 10, in addition to the system font path C:\Windows\Fonts , there is the per-user font path C:\Users\{User Name}\AppData\Local\ ...
Read more >Fonts installed in the user directory are not detected ...
For anyone facing this issue: a quick workaround is to install the font for all users, i.e. right click and then "Install for...
Read more >System Font folder is not showing all fonts currently ...
I have windows 7 installed. I need to to delete a few fonts, so I went into my fonts folder and it only...
Read more >Java can't see all installed fonts in system
Yes, JVM does not contain all the fonts. You need to install all the core fonts manually. If you are using a Linux...
Read more >Emacs not picking up locally installed fonts
When I use Options->Set Default Font it pops up a small GUI that only knows a few fonts. It does not start the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t remember seeing this menu before creating the issue. However when I tried again, it showed up. Also, I’ve updated the issue with (I hope) all the details you need.
Ok… So the feature has only been available since Windows 10 1809.
I think this is a reasonable feature request. Feel free to have a go!
It should be as simple as adding the following locations
to the
SystemFontCollection
.https://github.com/SixLabors/Fonts/blob/8989989b098ea6ed3f64bc9b85f9fd5333ac75a5/src/SixLabors.Fonts/SystemFontCollection.cs#L23-L40