subhashbs36 commited on
Commit
5fa28b9
·
2 Parent(s): e5b2dec e753086

Merge branch 'main' of https://github.com/subhashbs36/Text2Pen

Browse files
Files changed (1) hide show
  1. README.md +0 -160
README.md CHANGED
@@ -1,160 +0,0 @@
1
- ---
2
- title: Text2Pen
3
- emoji: 🖊️
4
- colorFrom: indigo
5
- colorTo: blue
6
- sdk: gradio
7
- sdk_version: "4.25.0"
8
- app_file: main.py
9
- pinned: false
10
- ---
11
-
12
- # ✍️ Text2Pen
13
-
14
- A modern, customizable tool to convert your typed text into realistic handwriting on A4 paper.
15
- Supports multi-column layouts, handwriting font selection, background customization, color, jitter, and more—all with a clean Gradio web UI.
16
-
17
- ---
18
-
19
- ## 🚀 Features
20
-
21
- - **Modern Gradio Web UI**: Easy-to-use, clean, and responsive.
22
- - **Direct Text Input or File Upload**: Paste text or upload `.txt` files.
23
- - **Handwriting Fonts**: Choose from built-in fonts or upload your own `.ttf`.
24
- - **Backgrounds**: Use blank, ruled, or custom backgrounds.
25
- - **Multi-Column Layout**: Split your page into 1, 2, or 3 columns.
26
- - **Customizable**: Font size, line spacing, margin, color, jitter, and more.
27
- - **Preview & Download**: Preview pages as images, download as PDF (generated on demand).
28
- - **A4 Output**: Perfect for cheat sheets, study notes, or printing.
29
-
30
- ---
31
-
32
- ## 📸 Screenshots
33
-
34
- ### Main UI
35
-
36
- ![Main UI](assets/Ui.png)
37
-
38
- ### Customization Tab
39
-
40
- ![Customization Tab](assets/Customization.png)
41
-
42
- ### Example Output
43
-
44
- ![PDF Output Example](assets/generated_pdf.png)
45
-
46
- ### Multi Column Layout
47
-
48
- ![Multi Column Layout](assets/3_column.png)
49
-
50
- ---
51
-
52
- ## 🛠️ Installation
53
-
54
- 1. **Clone the repository:**
55
- ```sh
56
- git clone https://github.com/yourusername/Text2Pen.git
57
- cd Text2Pen
58
- ```
59
-
60
- 2. **Install dependencies:**
61
- ```sh
62
- pip install -r requirements.txt
63
- ```
64
- *Requirements: `gradio`, `pillow`*
65
-
66
- 3. **(Optional) Add Fonts/Backgrounds:**
67
- - Place `.ttf` fonts in the `fonts/` folder.
68
- - Place background images in the `backgrounds/` folder.
69
-
70
- ---
71
-
72
- ## 🏃 Usage
73
-
74
- ### Start the App
75
-
76
- ```sh
77
- python main.py
78
- ```
79
-
80
- - The Gradio UI will open in your browser.
81
- - Enter or upload your text, customize options, and generate handwriting.
82
-
83
- ### Output
84
-
85
- - **Preview**: See generated pages as images.
86
- - **Download PDF**: Click "Generate & Download PDF" to get a PDF (temporary file, not saved).
87
-
88
- ---
89
-
90
- ## 📂 Project Structure
91
-
92
- ```
93
- Text2Pen/
94
-
95
- ├── main.py
96
- ├── README.md
97
- ├── requirements.txt
98
- ├── fonts/
99
- │ ├── QEJulianDean.ttf
100
- │ └── QEKevinKnowles.ttf
101
- ├── backgrounds/
102
- │ └── ruled_a4.png
103
- ├── generated/
104
- │ ├── images/
105
- │ └── pdfs/
106
- ├── sample_ui_1.png
107
- ├── sample_ui_2.png
108
- └── sample_output_page.png
109
- ```
110
-
111
- ---
112
-
113
- ## ✏️ Customization
114
-
115
- - **Fonts**: Add your own `.ttf` files to the `fonts/` folder or upload via the UI.
116
- - **Backgrounds**: Add PNG/JPG backgrounds to the `backgrounds/` folder or upload via the UI.
117
- - **Advanced Options**: Adjust font size, line spacing, margin, jitter, columns, and color in the Customization tab.
118
-
119
- ---
120
-
121
- ## 📝 Notes
122
-
123
- - PDF files are generated as temporary files and are not stored permanently.
124
- - Images are saved in `generated/images/` for preview purposes.
125
- - For best results, use high-quality handwriting fonts and A4-sized backgrounds.
126
-
127
- ---
128
-
129
- ## 📄 License
130
-
131
- Apache License 2.0
132
-
133
- ---
134
-
135
- ## 🙏 Credits
136
-
137
- - [Gradio](https://gradio.app/)
138
- - [Pillow](https://python-pillow.org/)
139
- - Handwriting fonts from [Google Fonts](https://fonts.google.com/) and [DaFont](https://www.dafont.com/)
140
-
141
- ---
142
-
143
- ## 💡 Example Use Cases
144
-
145
- - Micro cheat sheets for exams
146
- - Study notes that look handwritten
147
- - Generating realistic handwritten letters
148
- - Printing custom notes for planners or journals
149
-
150
- ---
151
-
152
- ## 🤝 Contributing
153
-
154
- Pull requests and suggestions are welcome!
155
-
156
- ---
157
-
158
- ## 📧 Contact
159
-
160
- For questions or feedback, open an issue or contact [subhashbs36@gmail.com](mailto:subhashbs36@gmail.com).