A CLI tool to easily integrate Persian fonts into your web projects. πβ¨
- π₯ 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
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
- Vazir
- Sahel
- Samim
- Shabnam
- Gandom
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>
π Ensure you're in the correct directory π Check file paths and permissions π For more help, open an issue on GitHub
Contributions are welcome! Please feel free to submit a Pull Request. π
Made with β€οΈ by rezasmind