Skip to content

πŸ–‹οΈ persian-fontify: Seamlessly integrate Persian fonts into web projects. Download fonts, update CSS, and modify Tailwind config with ease. πŸš€βœ¨

Notifications You must be signed in to change notification settings

rezasmind/persian-fontify

Repository files navigation

πŸ–‹οΈ persian-fontify

Twitter Follow LinkedIn

A CLI tool to easily integrate Persian fonts into your web projects. πŸš€βœ¨

✨ Features

  • πŸ“₯ Downloads popular Persian fonts
  • 🎨 Updates your CSS with @font-face declarations
  • πŸ› οΈ Modifies Tailwind CSS config to include new fonts
  • πŸ’¬ Simple interactive prompts for easy setup

πŸ“¦ Installation

npm install -g persian-fontify

πŸš€ Usage πŸ“‚ Navigate to your project directory πŸ–₯️ Run the tool:

npx persian-fontify setup

🧭 Follow the prompts:

  • πŸ”€ Select a Persian font
  • πŸ“„ Provide path to your main CSS file
  • βš™οΈ Provide path to your Tailwind config file

πŸ”€ Supported Fonts

  • Vazir
  • Sahel
  • Samim
  • Shabnam
  • Gandom

πŸ’‘ Example

After running persian-fontify: Your CSS file will include:

  @font-face {
     font-family: 'Vazir';
     src: url('path/to/Vazir.ttf') format('truetype');
     font-weight: 400;
     font-style: normal;
   }

Your Tailwind config will be updated:

   module.exports = {
     theme: {
       extend: {
         fontFamily: {
           vazir: ['Vazir', 'sans-serif'],
         },
       },
     },
   }

Use the font in your HTML:

   <p class="font-vazir">This text uses Vazir font</p>

πŸ”§ Troubleshooting

πŸ“ Ensure you're in the correct directory πŸ” Check file paths and permissions πŸ†˜ For more help, open an issue on GitHub

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. πŸŽ‰

πŸ“„ License

This project is licensed under the MIT License. πŸ“œ

Made with ❀️ by rezasmind

About

πŸ–‹οΈ persian-fontify: Seamlessly integrate Persian fonts into web projects. Download fonts, update CSS, and modify Tailwind config with ease. πŸš€βœ¨

Resources

Stars

Watchers

Forks

Packages

No packages published