कlam is a powerful handwriting generation tool that allows you to convert digital text into realistic-looking handwritten documents. Perfect for adding a personal touch to digital content or quickly generating handwritten assignments.
- 🖌️ Multiple Font Styles: Choose from a variety of handwriting fonts
- 📄 Custom Paper Settings: Adjust paper dimensions to match your needs
- 🎨 Appearance Customization: Control font size, line spacing, and margins
- 🔀 Natural Randomization: Apply subtle variations to create realistic handwriting
- 🎭 Color Options: Customize text and background colors
- 📱 Responsive UI: Works on both desktop and mobile devices
- 🚀 Fast Processing: Quick generation of handwritten text
The project consists of two main components:
- Frontend: A Next.js web application providing a user-friendly interface
- Backend: A FastAPI service that handles the handwriting generation
कlam/
├── frontend/ # Next.js web application
└── backend/ # FastAPI backend service
├── core.py # Handwriting generation core logic
├── main.py # API endpoints
├── tools.py # Utility functions
└── ttf_library/ # Handwriting font files
- Python 3.12 or newer
- Node.js 18 or newer
- npm, yarn, or pnpm
-
Navigate to the backend directory:
cd backend -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -e . -
Start the backend server:
uvicorn main:app --reloadThe API will be available at
http://localhost:8000
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install # or yarn # or pnpm install -
Start the development server:
npm run dev # or yarn dev # or pnpm dev -
Open http://localhost:3000 to access the application.
The backend API provides the following endpoints:
GET /api/v1/fonts- List all available fontsPOST /api/v1/generate- Generate handwritten text with specified parameters
For detailed API documentation, see the API Specification.
कlam uses the Handright library to render text with natural-looking handwriting effects. The generation process includes:
- Text input processing
- Font and style selection
- Parameter application (size, spacing, perturbations)
- Image rendering with randomized variations
- Output formatting and delivery
The result is a realistic simulation of handwritten text that maintains legibility while introducing the natural variations found in real handwriting.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch:
git checkout -b feat/amazing-feature - Commit your changes:
git commit -m 'feat: add some amazing feature' - Push to the branch:
git push origin feat/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
