dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Disable Comic Sans globally on macOS

Open Copilot opened this issue 3 months ago • 2 comments

Issue #27 requests disabling Comic Sans. This PR implements a comprehensive solution to disable Comic Sans globally on macOS, not just in VS Code.

Changes

1. Global Font Disabling Script

  • Created script/disable-comic-sans - Shell script that disables Comic Sans MS using macOS Font Book
  • Searches for Comic Sans files in both user (~/Library/Fonts) and system (/Library/Fonts) font directories
  • Uses AppleScript to disable each Comic Sans variant individually
  • Handles gracefully if fonts are protected by System Integrity Protection

2. Automated Execution

  • Added Ansible task to playbook.yml that runs the disable script during system setup
  • Executes automatically when dotfiles are installed or updated
  • Uses failed_when: false to prevent setup failure if fonts are system-protected

3. VS Code Font Configuration

  • Added explicit editor.fontFamily and terminal.integrated.fontFamily settings to .vscode/settings.json
  • Set font stack: 'Hack Nerd Font', Menlo, Monaco, 'Courier New', monospace
  • Ensures Comic Sans is never used in the development environment
{
  "editor.fontFamily": "'Hack Nerd Font', Menlo, Monaco, 'Courier New', monospace",
  "terminal.integrated.fontFamily": "'Hack Nerd Font', Menlo, Monaco, 'Courier New', monospace"
}

How It Works

The solution provides multiple layers of protection:

  1. The Ansible playbook runs the disable script during initial setup
  2. The script attempts to disable Comic Sans system-wide via Font Book
  3. VS Code configuration provides explicit font settings as an additional safeguard

Limitations

macOS System Integrity Protection (SIP) may prevent complete removal of Comic Sans if it's a protected system font on newer macOS versions (Ventura+). The script will disable it where permissions allow.

Hack Nerd Font is already installed via Brewfile and is used as the primary font across all configurations.

Original prompt

This section details on the original issue you should resolve

<issue_title>Delete/disable comic sans</issue_title> <issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes benbalter/dotfiles#27

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Nov 04 '25 23:11 Copilot