On macOS, executables downloaded from the internet are blocked by Apple’s security mechanisms, including:
The install script includes the following automatic steps:
Remove Quarantine Attribute
xattr -d com.apple.quarantine /path/to/msdfgen
Clear All Extended Attributes
xattr -c /path/to/msdfgen
Apply Temporary Code Signature
codesign --force --deep --sign - /path/to/msdfgen
Set Permissions
chmod +x /path/to/msdfgen
Verification Test: Test if the binary runs correctly
If automatic repair fails, the script handles errors gracefully and provides detailed manual instructions.
If automatic handling fails or you encounter security warnings, try the following methods:
# Add to Gatekeeper allow list
sudo spctl --add /path/to/bin/darwin_arm64/msdfgen.osx
# Or allow all apps from a specific developer
sudo spctl --add --label "msdfgen" /path/to/bin/darwin_arm64/msdfgen.osx
# Disable Gatekeeper
sudo spctl --master-disable
# Remember to re-enable after running
sudo spctl --master-enable
If you have a developer certificate:
codesign --force --sign "Your Developer ID" /path/to/msdfgen
xattr /path/to/bin/darwin_arm64/msdfgen.osx
codesign -dv /path/to/bin/darwin_arm64/msdfgen.osx
spctl -a /path/to/bin/darwin_arm64/msdfgen.osx
xattr -c /path/to/msdfgen
chmod +x /path/to/bin/darwin_arm64/msdfgen.osx
xcode-select --install
, or skip code signing and use other methodsCheck system logs:
log show --predicate 'eventMessage contains "msdfgen"' --last 1h
Check Gatekeeper policy:
spctl --status
Reset LaunchServices database:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
SKIP_MACOS_SECURITY=1 npm install
SKIP_MSDFGEN_INSTALL=1 npm install
IT administrators may need to:
Pre-approve Applications:
sudo spctl --add --label "msdfgen" /Applications/msdfgen
Sign with Enterprise Certificate:
codesign --force --sign "Developer ID Application: Your Company" msdfgen
This solution ensures msdf-bmfont-xml works seamlessly on macOS while maintaining system security.