Skip to content

Custom Fonts

Use your brand's fonts in generated images.

Available System Fonts

All plans include these preloaded fonts:

FontStyleBest For
InterSans-serifGeneral use, UI
RobotoSans-serifGoogle/Android aesthetic
SF ProSans-serifApple aesthetic
LoraSerifEditorial, elegant
JetBrains MonoMonospaceCode, technical

Using System Fonts

Specify font in your request:

json
{
  "title": "Your Title",
  "font": "inter",
  "theme": "dark"
}

Available font values:

  • inter (default)
  • roboto
  • sf-pro
  • lora
  • mono

Custom Fonts (Pro/Business)

Upload your own fonts for brand consistency.

Supported Formats

  • .ttf (TrueType)
  • .otf (OpenType)
  • .woff (Web Open Font Format)
  • .woff2 (Web Open Font Format 2)

Font Upload API

bash
curl -X POST https://ogimageapi.io/api/fonts \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "font=@/path/to/YourFont.ttf" \
  -F "name=your-brand-font" \
  -F "weight=400"

Using Custom Fonts

Once uploaded, reference by name:

json
{
  "title": "Your Title",
  "font": "your-brand-font",
  "theme": "dark"
}

Font Licensing

Important

Ensure you have proper licensing for any fonts you upload.

License Requirements

  • ✅ Open source fonts (Google Fonts, etc.)
  • ✅ Fonts you've purchased with server/embedding license
  • ✅ Custom fonts created for your brand
  • ❌ Desktop-only licensed fonts
  • ❌ Fonts without embedding rights
FontSourceStyle
Plus Jakarta SansGoogle FontsModern sans
OutfitGoogle FontsGeometric sans
Space GroteskGoogle FontsTech sans
Playfair DisplayGoogle FontsElegant serif
Source Code ProGoogle FontsMono

Typography Best Practices

Title Typography

json
{
  "title_font": "your-brand-font",
  "title_weight": 700,
  "title_size": "auto"
}
  • Use bold weights (600-800)
  • Let auto-sizing handle responsive text
  • Keep titles short for best appearance

Body/Subtitle Typography

json
{
  "subtitle_font": "inter",
  "subtitle_weight": 400
}
  • Use regular weights (400-500)
  • Highly readable fonts work best
  • Consider fallbacks for longer text

Font Weight Reference

WeightNameUse Case
100ThinDecorative only
200Extra LightDecorative
300LightSubtle text
400RegularBody text
500MediumEmphasis
600Semi BoldSubheadings
700BoldHeadings
800Extra BoldStrong headings
900BlackImpact

Multiple Font Weights

Upload the same font with different weights:

bash
# Regular
curl -X POST /api/fonts \
  -F "font=@BrandFont-Regular.ttf" \
  -F "name=brand-regular" \
  -F "weight=400"

# Bold
curl -X POST /api/fonts \
  -F "font=@BrandFont-Bold.ttf" \
  -F "name=brand-bold" \
  -F "weight=700"

Use in requests:

json
{
  "title": "Bold Title",
  "title_font": "brand-bold",
  "subtitle": "Regular subtitle",
  "subtitle_font": "brand-regular"
}

Font Management

List Your Fonts

bash
curl https://ogimageapi.io/api/fonts \
  -H "X-API-Key: YOUR_API_KEY"

Delete a Font

bash
curl -X DELETE https://ogimageapi.io/api/fonts/font-name \
  -H "X-API-Key: YOUR_API_KEY"

Troubleshooting

Font Not Rendering

  1. Check font name is exact match
  2. Verify font was uploaded successfully
  3. Ensure font file isn't corrupted

Poor Quality Text

  1. Use appropriate font weight
  2. Check font supports required characters
  3. Try a different font format (.ttf vs .woff2)

Missing Characters

Some fonts don't include all characters. Check that your font supports:

  • Special characters (é, ñ, etc.)
  • Numbers
  • Punctuation

Font Limits

PlanMax Custom Fonts
Free0 (system fonts only)
Pro5
Business20

Generate stunning Open Graph images programmatically.