Install Font For All Users

23 views
Skip to first unread message

Demetrius Dade

unread,
Aug 4, 2024, 6:17:15 PM8/4/24
to omjochamhy
Im running a Windows 2019 Terminal Server in a domain environment (and hence have no local admin account, just the domain admin account). When I log on as administrator and install fonts, they are installed just for this user (i.e. the admin).

The ttf files end up in C:\Users\Administrator\AppData\Local\Microsoft\Windows\Fonts and not in C:\Windows\Fonts. Also, the font is registered in HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Fonts and not in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts.


I have even run a vbs script that installs fonts and ran this through a scheduled task using the SYSTEM account, but that put the fonts into C:\Windows\System32\config\systemprofile\AppData\Local\Microsoft\Windows\Fonts, i.e. local to the SYSTEM account.


For these, the solution is to create a GPO, namely "Install custom fonts", which would install the fonts from an accessible network share, "\fileserver\Fonts" for instance. For safety reasons, one should make the share read-only.


The GPO need to do 2 steps:* copy the font file using the Computer\Preferences\Files path, using "update" mode and selecting source path as "\fileserver\Fonts\thefont.ttf" with a destination path being "c:\windows\fonts\thefont.ttf".* record the font in the registry by creating a new entry for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Current Version\Fonts, with name "The Font (TrueType)" the last part with the parenthesis is mandatory, and with value "thefont.ttf".


There is another way. Using an admin command prompt, copy the font file(s) to the "c:\windows\fonts" folder. Then edit the registry to add the font file name to the list in (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts) Reboot the machine. I have used this to install a bar code font on our terminal server for our warehouse users.


But I'd like to know where user-specific fonts are stored. For example, when I right click on a font, I have the option to Install or Install for all users, so I presume the generic Install will install it to an %appdata% folder or similar? I just can't find where that folder is.


Although I agree with @Kkyishkkii on this, I am going to give you a possible solution. We had a computer that was used specifically to test out new fonts and in order to allow this, we just gave the users full access to the registry key:


First, you need to copy the font to the Windows\Fonts directory (you'll want to make sure to use the Environment.GetFolderPath method provided by the .NET Framework instead of hard-coding the typical path to the Windows directory, just in case something is different in one of your users' environments).


Then, you need to call the AddFontResource function to add the font to the system font table. Since AddFontResource is provided by the Windows API, you'll need to P/Invoke to call it from VB.NET code. The declaration looks something like this (the lpszFilename parameter is the path to the font file that you want to add):


Finally, if Word (or whatever application you intend to use the font in) is running at the time you call the AddFontResource function from your code, you need to inform it that the available fonts have changed. You do this by sending a WM_FONTCHANGE message to all top-level windows using the SendMessage function and setting the hWnd parameter toHWND_BROADCAST. Again, you'll need to P/Invoke; the declarations look like this:


NOTE: The above steps only install the font for the current Windows session. If you need the font to be available on subsequent restarts, you need to add it to the registry. The key to modify is this one:


Copy the font into the Windows font folder and then you need to get the font added to the registry. I've not tried this myself, but I think it's possible to do this by opening the font using the ShellExecuteA api in a similar way to as seen here.


Here's a vbscript way of doing it that might be useful as a starting point since you might be able to use similar syntax and functions in VB.Net: Hey, Scripting Guy! How Can I Install Fonts Using a Script?


Hello all - I have an open type font thisfont.otf that our company bought and I want to install it for all Windows users on each of our PCs. We want this to happen in the background without any user intervention or inconvenience. Ideally avoid reboots or logging out the user for the change to go into effect. In looking online, many of the results are outdated (before Windows 10 1809) or require a reboot/log out. (For example the top hit when googling this was a Prajwal Desai article written for SCCM 2012 and the comments seem like it's no longer working.)


It was pure powershell. My OTF font file is copied into C:\Windows\Fonts and then added to the HKLM registry key to make it available to all users. No log out or reboot was needed. I will test more tomorrow. Make sure the font shows up properly in different programs. But today I had Wordpad open before the install and after it was installed, I could find the font in the WordPad font drop down menu without having to close it and reopen. Real time.


One gotcha (as others noted) was copying/pasting the command line for the script into your SCCM/MECM console. Doing this from the web page distorted the characters in the command line and the powershell will fail on the PC. I manually typed it in and then it worked great.


Alternatively, depending on your XenApp setup, would it be feasable to just install the font on one or two servers and point the specific users only to those boxes? Obviously all users would occasionally get it, but that may be acceptable.


Font Book automatically checks for duplicates when you install a font, and shows a message if the font is already installed. You can choose whether to keep both versions, skip font installation, or replace the existing font with the new font.


So far, so good (and inline with question How do I install fonts?) However, when I then open any font dialog (e.g. in OpenOffice or the font dialog of the terminal) I don't see all of the new fonts. For Arial, the standard form is missing, but bold and italic are there. Times New Roman is missing altogether.


I can use nautilus to browse to the font directory, double click the Arial.ttf file and see the font in all its beauty. I can even click the install button then and the font is copied over to my personal ./fonts directory and from there on visible to my apps. But it is not picked up from the system directory.


I found out, after having similar problems, that in my folder (/usr/share/fonts/truetype/msttcorefonts) there was a file, saying that my licens failed - it gave me a command to use in the terminal to get prompted another licens agreement, which this time made it work.


Copy the fonts to /usr/local/share/fonts or a subfolder (such as /usr/local/share/fonts/TTF) and then run sudo fc-cache -fv. There are some graphical programs you can install to make this easier, but I've never felt the need to try any of them. The Ubuntu wiki page on Fonts here may be of help too.


Fontmatrix is a real Linux font manager, available on any platform and as well for KDE (which already had Kfontinstaller) as for Gnome. It's purpose is to recursively query the fonts (ttf, ps & otf) in the directories you give it to search, sort them quickly, (avoiding bugged or broken ones) and show them. Then, you can tag them, sub-tag, re-sort according various tags, preview... Even create a pdf Font Book...


Fontmatrix has been available to install from the Ubuntu universe repository since jaunty, and version 0.6.0+svn20100107-2ubuntu2 is currently in maverick and natty. A brief explanation about using fontmatrix is available on their website.


Also, there are lots of fonts available as software packages. Font packages are named in the form ttf-* or otf-*. It is better to install fonts as packages instead of manually if possible. You can use tools such as Synaptic, apt-get or the Ubuntu Software Centre. The Software Centre has a dedicated fonts section.


A better answer than the one provided there (i.e. to go to Google Fonts and look up the font and go through their weird downloading system) is to get it directly from Github, e.g.:Roboto Mono font files


PS: There's another duplicate question at "Downloading Google Fonts". It details some other methods, like using an installer script from googlecode.com and (for more than the Google Fonts) using tasksel.


I think the best way is to use gfinstall script, install it and you just say gfinstall whicheverFont and it will install it, you can also specify it to install locally (for the current user) or globally for all users


Our corporation purchased multiple Creative Cloud licenses. Is it possible to grant access to specific users to have access to the active fonts within a user group? This would be useful so that all the users within a group can have access to the same set of active fonts for the multiple projects that the team may be working on.


I am going to give my two cents worth on this. He have a half dozen editors working with each having an individial CC license and they do not know which fonts are used or not. CC NEEDS TO SHARE A RECOMMENDED FONT LIST WITH OTHER CC USERS.


Last year we introduced the custom fonts feature. This allows an Enterprise admin to upload fonts to Creative Cloud and then assign those fonts to product profiles that they define. The user would simply need to log into the Creative Cloud desktop app to be given access to the font.


So for clarification, our Marketing department has a font manager than can sync fonts between users that aren't Adobe Creative Cloud fonts. We have to individually activate CC fonts through Adobe.com for each user instead of having a simplified method of activating fonts for an entire team because Adobe.com fonts are encrypted so our font manager can't sync Adobe CC fonts in specific. There's no sync option for Adobe CC fonts between team members and it's hampering the speed of our Marketing department when they have to work on the same file as one another.

3a8082e126
Reply all
Reply to author
Forward
0 new messages