homebrew-fonts/README.md
Matt Troutman 49fca2b3b9
no message
2025-04-05 17:40:26 -05:00

97 lines
No EOL
2.7 KiB
Markdown

# Homebrew Fonts Tap
This repository contains a collection of custom fonts for use with Homebrew.
## Installation
```bash
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:
```bash
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**:
```bash
pip install -r requirements.txt
```
4. **Run the Add Font Script**:
```bash
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**:
```bash
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**:
```bash
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**:
```bash
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.