Posted on 08-21-2018 02:51 PM
Solved: Use configuration profiles.
I need to make sure all users have access to the font used in our branding for printing documents like invoices from FileMaker. I need to distribute this without user interaction. So far I have written this script. It downloads the font to ~/Library/Fonts/. It works, but the font is not available. I can't ask these users to work with Font Book.
#!/bin/bash
cd ~/Library/Fonts
file="./sampleFont.otf"
if [ ! -f "$file" ]
then
curl -O https://someHostName/$file
fi
Posted on 08-22-2018 06:02 AM
How have you confirmed that it works? You might be better off not changing to the users Fonts directory and just placing the curl'd file in a /tmp directory and moving it to the systems Font library (/Library/Fonts) so that all users on the machine have access to it .
Posted on 08-22-2018 06:05 AM
Also you can use a profile to do this as well. We push down all the fonts via that with really good success and it’s consistent.
Posted on 08-22-2018 06:44 AM
@andrew.nicholas That is a great point about being available to all users.
@daniel_ross Can you provide more details or some reading ghat you think could better direct me on this?
Posted on 08-22-2018 07:14 AM
We also push corporate fonts using a Configuration Profile - it's very easy. Create the profile, click the "Font" payload and upload the fonts you would like to distribute. Using a configuration profile also means you can update the fonts later on, should they chance or you wish to add more to the list.
Posted on 08-22-2018 07:38 AM
@jtrant beat me to the reply @drewsanderson but yeah we have 21 corp fonts loaded into the profile and they all then get pushed out to various machines and if we add more its as simple as just adding the new one to the profile and pushing out the change.
I attached the images below for you to see how we have it set up.
Posted on 08-22-2018 07:50 AM
So simple yet Jamf sport could not answer the question. I really appreciate the help! I was successful just using the configuration profile. No need for scripts, library folder, etc.
Posted on 08-22-2018 10:33 AM
@drewsanderson that's odd to hear as JAMF support is the group that confirmed this would work for what we were trying to accomplish almost a year ago. I still feel that JAMF support could be better with internal knowledge transfer or a KBASE for these sorts of things but thankfully JAMF Nation exists!
Posted on 01-09-2019 10:33 PM
Thank you guys for this discussion. I was able to create a Configuration Profile and push 18 fonts quickly. I appreciate all you guys! Thank you!
Posted on 01-10-2019 11:36 AM
@daniel_ross this is awesome. Thanks so much
Posted on 01-16-2019 12:41 PM
Hello all! I currently use this method (config profile) to push out 1 or 2 (or small hand full) of fonts a user might need, but I'm wondering if there is a better way? I'm faced with the need to push and activate a folder full of 60 fonts to a user that's needed for some current projects he is working on. I could obviously copy them to his computer and manually activate them through FontBook but I would like to somewhat automate the process since I'm sure I will need to do this again at some point. any ideas before I go to adding all of these to a config profile?
Thanka!
Posted on 06-11-2019 08:32 AM
So how is this getting scoped? I have the Profile with corporate fonts socked to a smart group where the criteria is, does not have said font. Works great sees the computers that don't have it, then pushes the font, sweet. Computer falls out of smart group. Here is the problem. When it falls out of the group the profile gets removed, starting the whole thing over. I know it's a problem with my scope or group, just not sure the best way to scope it without saying, All managed computers, even though that wouldn't be the worst idea.
Posted on 06-11-2019 08:37 AM
JAMF support has frowned on using Configuration profiles to push fonts. not that i have an immediate solution but - just ti aid people googling for best practice / keep looking
Posted on 06-11-2019 11:17 AM
@jpittman-fsit - if that is the case, I think that based on the results above we'd need more info to make that decision - as in, why not?
Probably like all admins, Jamf employees have a variety of methods to do something, and I'd like to hear the "why" before nixing what appears to be a functioning solution...
Posted on 08-13-2019 11:16 AM
@scottb - sorry for the late response, the reasoning was to minimize the amount of configuration profiles in efforts to aid in JAMF cloud performance and accuracy. I found that packaging them up in a .pkg and deploying via a profile works amazingly - also able to add to self-service that way.
Posted on 10-09-2019 04:58 AM
@daniel_ross any advice on pushing OTF fonts to users? Config profiles don't appear to support the OTF file extension.
Posted on 10-18-2019 08:28 AM
@daniel_ross package them up in a .pkg and upload them to JAMF - push them with profiles or self-service. I've been implementing this method for some time now.
Posted on 01-31-2020 01:56 PM
nm
Posted on 01-31-2020 02:30 PM
@drewsanderson if you are running that as a policy, the user probably does not have access to read the font. You would have to modify the permissions of the font file afterward:
#!/bin/bash
loggedInUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')
directory="/Users/$loggedInUser/Library/Fonts"
file="sampleFont.otf"
# If a user is logged in, and the file does not exist, download it and make the currently logged in user owner
if [[ -n "$loggedInUser" ]]; then
if [[ ! -f "$directory/$file" ]]; then
curl -s "https://someHostName/$file" -o "$directory/$file"
chown $loggedInUser "$directory/$file"
fi
fi
exit 0
Alternatively, as others stated. You might be better off just putting the font in /Library/Fonts (available to any user) rather than the user's Font folder, and then you can just set the permissions to 644:
#!/bin/bash
directory="/Library/Fonts"
file="sampleFont.otf"
if [[ ! -f "$directory/$file" ]]; then
curl -s "https://someHostName/$file" -o "$directory/$file"
chmod 644 "$directory/$file"
fi
exit 0
Posted on 08-06-2020 01:26 PM
(i realize this is old but have been looking for options to deploy readily available fonts).
considering these options as well. we push fonts to iOS via profile but have more than 50 fonts (global languages, etc) and push them as a package into the /Library/Font folder.
@jpittman-fsit when you say push out the package via a profile, what does that mean? did you mean policy as I am not familiar with "Push a pkg with a profile".
Posted on 09-07-2022 06:30 AM
Out of curiosity, seems the Managed Fonts are placed here, and the hash(?) is only on the file. Font Book shows the proper info.