Collection of 50+ freely licensed Devanagari typefaces from Google Fonts including Tiro Devanagari Marathi (designed specifically for Marathi typographic conventions), Noto Sans/Serif Devanagari (comprehensive Unicode coverage), Anek Devanagari (variable weight font), and dozens more. Combined with 283+ fonts from DevanagariFonts.net, these provide the font diversity needed for synthetic OCR training data generation. Critical for training OCR models that generalize across the wide range of fonts used in Marathi printing.
# Download Devanagari fonts from Google Fonts
# https://fonts.google.com/?subset=devanagari
# Additional fonts: https://devanagarifonts.net/
from PIL import Image, ImageDraw, ImageFont
# Render Marathi text in multiple fonts
marathi_text = "नमस्कार, मी मराठी बोलतो"
font = ImageFont.truetype("NotoSansDevanagari-Regular.ttf", 48)
img = Image.new('RGB', (800, 100), 'white')
ImageDraw.Draw(img).text((10, 10), marathi_text, fill='black', font=font)
img.save('marathi_sample.png')| Field | Type | Description |
|---|---|---|
| font_family | string | Font family name |
| font_style | string | Style variant (regular, bold, italic, etc.) |
| license | string | Font license (OFL or Apache 2.0) |
| script_coverage | string | Unicode blocks covered (Devanagari, Extended Devanagari, etc.) |