Assuming your problem is not being able to install a font without admin rights, below is a solution that does not require admin or additional executables (so will work even with an extremely locked-down computer):
Load a font in Windows using PowerShell
Save the below script as a PowerShell script file somewhere on your machine, next to the TTF and OTF files you want to install:
Add-Type -Name Session -Namespace "" -Member @"
[DllImport("gdi32.dll")]
public static extern int AddFontResource(string filePath);
"@
$null = foreach($font in Get-ChildItem -Recurse -Include *.ttf, *.otf) {
[Session]::AddFontResource($font.FullName)
}
This script will scan for .ttf
and .otf
font files in the directory it's running from, and temporarily install them without needing admin access.
The main disadvantage of this is script is that it will only install the font for the duration of your current session. Once you log off or restart your system, you will need to run it again, but that could be automated (depending on how your computer is configured, such as whether it allows running .ps
scripts on startup).
Possible duplicate of Using custom fonts without administrator rights?
– phuclv – 2019-01-08T15:04:23.593