Guest User

Untitled

a guest
Mar 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. "The requested file <font file>.ttf is not a valid font file"
  2.  
  3. Add-Type -Name Session -Namespace "" -Member @"
  4. [DllImport("gdi32.dll")]
  5. public static extern int AddFontResource(string filePath);
  6. "@
  7.  
  8. $null = foreach($font in Get-ChildItem -Recurse -Include *.ttf, *.otf) {
  9. [Session]::AddFontResource($font.FullName)
  10. }
Add Comment
Please, Sign In to add comment