Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "The requested file <font file>.ttf is not a valid font file"
- 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)
- }
Add Comment
Please, Sign In to add comment