Comments (4)
@h404bi I don't known whether or not fonts installed by the new method can be used by any application. In my test some application can not use these fonts. I believe that compatibility of the new installation method needs more inspection. Maybe both installation methods should be kept.
from scoop-nerd-fonts.
Updated again...
I retest the installer and uninstaller following on 1903 and find it is not working now. Last time I use these script is several months ago because my switching to other system(now I am back on win). Some Windows mechanism may be changed and it is no longer working. I am sorry for this wrong script.
The work can be done by replacing installer and uninstaller like this:
"installer": {
"script": [
"New-Item -Path 'HKCU:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\Scoop.%name' -Force | Out-Null",
"Get-ChildItem `$dir -filter '*Windows Compatible.*' | ForEach-Object {",
" New-ItemProperty -Path 'HKCU:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\Scoop.%name' -Name `$_.Name -Value `$_.FullName -Force | Out-Null",
"}"
]
},
"uninstaller": {
"script": [
"Remove-Item -Path 'HKCU:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\Scoop.%name'",
"Write-Host \"The '`$(`$app.Replace('-NF', ''))' Font family has been uninstalled and will not be present after restarting your computer.\" -Foreground Magenta"
]
}
Changes made to registry will looks like this:
Also, changes to fonts can be immediately viewed in Settings - Personalization - Fonts.
A problem is, the Windows Font Cache Service(FontCache) does not automatically detect changes of this registry key and the service does not update font cache at boot time by default to reduce boot time of Windows. A restart of FontCache service can fix missing of installed fonts, but this requires admin rights and a restart may not be a reliable way to accomplish this task. I don't find approaches to build font cache for newly added fonts without admin rights. This might cause problem.
My fork of the repository for my personal use installs fonts without admin rights: linyinfeng/scoop-nerd-fonts. I am not actively maintaining the fork and it may be buggy. But it can serves as a simple working example for the issue.
from scoop-nerd-fonts.
@linyinfeng Thanks for your information, this is really helpful!
@matthewjberger Would you like to adopt this to support non-admin installation? Maybe we should add conditions to check if the user's machine is under Windows 10 17704 or later, for backward compatibility.
from scoop-nerd-fonts.
Tried to copy fonts to AppData\Local\Microsoft\Windows\Fonts and modified registry keys. Installed fonts in this directory seem work well.
Font files not in the directory seems take effect when fonts cache was rebuilt and disappear after system reboot. So maybe we can't just leave font files in the app directory of scoop and only create registry keys for them like the script described above in my comment, which I thought is a nice and clean way.
Update:
I ignored permission problem. Fonts can not be accessed by service like FontCache because some services have no read permission to scoop apps directory. By properly set read rights for them in ACL, we can install fonts just in the default location of scoop.
A problem is to find out what ACL rules should be added to which files or directories to make font cache services and all applications including Font settings work.
from scoop-nerd-fonts.
Related Issues (20)
- [Request] MesloLGS NF HOT 2
- Operator-Mono-Fonts is not available now HOT 2
- Anuphan is not available now
- [Request]Add the "Glow Sans" font πΆβπ«οΈ
- [email protected]: hash check failed HOT 1
- [email protected]: hash check failed HOT 1
- [email protected]: hash check failed HOT 1
- [email protected]: Decompress Error
- Add NerdFontsSymbolsOnly HOT 4
- [email protected]: hash check failed HOT 1
- [Request] Add monaspace HOT 1
- Add Monaspace Nerd Font HOT 8
- Updating font fails on Windows 10 (21H2) HOT 4
- add LxgwNeoZhiSong
- install font-patcher HOT 1
- the file naming convention of Sarasa Gothic has changed
- [Request]Add the "Dream Han Sans & Serif" font π₯°
- [email protected]: hash check failed HOT 2
- [email protected]: Hash check failed HOT 1
- [email protected]: hash check failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scoop-nerd-fonts.