0

I would like to use a font I have available as a .ttf file for one of my texts.

The obvious way to do that is to install the font system wide and use it that way.

Is there a different path one could take when administrative privileges are not available (the execution of PowerShell scripts is blocked too)? It feels like that should be possible.

edit: I haven't yet gotten the PowerShell method linked here to work. I would like to keep the question up, as I am hoping for a method within Word, to bundle the .ttf with or at least open it for specific documents. (along the lines of: Format -> Fonts -> add Font file to document) edit2: Sadly the execution of PowerShell scripts is unavailable on the machines in question. UnauthorizedAccess

4

1 Answer 1

0

You can't install a font permanently under a non-admin account, but you can do it temporarily (for the current session). Check Pabru's answer here.

P.S. OK, if PowerShell doesn't work, this is the corresponding MSVC code:

int _tmain(int argc, TCHAR* argv[]) {
    if(argc != 2)   {
        std::cout << "Usage: RegFont <font-file>\n";
        return 1;
    }

    AddFontResource(argv[1]);
    return 0;
}

Try running RegFont32 <font-file> or RegFont64 <font-file>

3
  • I am getting a FullyQualifiedError by the name of UnauthorizedAccess as PowerShell execution is blocked. Commented Jan 8, 2019 at 12:05
  • Yes, I overlooked that. Try compiled version then, it should work. Commented Jan 8, 2019 at 12:33
  • You can't install a font permanently under a non-admin account in fact you can
    – phuclv
    Commented Jan 8, 2019 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .