No description
Find a file
2025-04-05 17:53:24 -05:00
font-buffalo no message 2025-04-05 17:40:26 -05:00
fonts Add tyler handwriting font as submodule 2025-04-05 17:53:24 -05:00
Formula Add tyler handwriting font as submodule 2025-04-05 17:53:24 -05:00
.gitignore no message 2025-04-05 17:40:26 -05:00
.gitmodules Add tyler handwriting font as submodule 2025-04-05 17:53:24 -05:00
add-font-submodule.py no message 2025-04-05 17:40:26 -05:00
README.md no message 2025-04-05 17:40:26 -05:00
remove-font.py no message 2025-04-05 17:40:26 -05:00
requirements.txt no message 2025-04-05 17:40:26 -05:00

Homebrew Fonts Tap

This repository contains a collection of custom fonts for use with Homebrew.

Installation

brew tap trtmn-fonts/fonts
brew install font-<font-name>

Available Fonts

This tap provides a variety of custom fonts. To see all available fonts, run:

brew search trtmn-fonts/fonts/font-

Adding New Fonts

To add a new font to this tap, follow these steps:

  1. Create a Gitea API Token:

    • Go to your Gitea profile settings
    • Navigate to "Applications" > "Generate New Token"
    • Name the token (e.g., "Homebrew Fonts")
    • Select the necessary permissions (at minimum: repo)
    • Generate and copy the token
  2. Set Up Environment Variables:

    • Create a .env file in the root of this repository with the following content:
      GITEA_URL=http://clancy.genet-godzilla.ts.net:3002
      GITEA_USERNAME=trtmn-fonts
      GITEA_API_TOKEN=your_api_token_here
      
    • Replace your_api_token_here with your actual Gitea API token
    • Important: Do not commit the .env file to version control if it contains sensitive information
  3. Install Required Python Packages:

    pip install -r requirements.txt
    
  4. Run the Add Font Script:

    python3 add-font-submodule.py
    
    • Follow the prompts to enter the font name and location of the font files
    • The script will:
      • Create a new repository on Gitea for the font
      • Add the font as a submodule to this repository
      • Create a Homebrew formula for the font
      • Update the font index
  5. Push Changes to Gitea:

    git push
    

Removing Fonts

To remove a font from this tap, follow these steps:

  1. Ensure Environment Variables are Set:

    • Make sure your .env file is properly configured (see "Adding New Fonts" section)
  2. Run the Remove Font Script:

    python3 remove-font.py <font-name>
    
    • Replace <font-name> with the name of the font to remove
    • The script will:
      • Ask for confirmation before proceeding
      • Remove the font submodule
      • Delete the font repository from Gitea
      • Update the font index
  3. Push Changes to Gitea:

    git push
    

Repository Structure

  • Formula/: Contains Homebrew formulas for each font
  • fonts/: Contains submodules for each font repository
  • fonts/index.json: Index of all available fonts
  • add-font-submodule.py: Script for adding new fonts
  • remove-font.py: Script for removing fonts
  • .env: Configuration file for Gitea credentials (not tracked by git)
  • requirements.txt: Python dependencies

License

This project is licensed under the MIT License - see the LICENSE file for details.