Skip to main content
MapToPoster supports displaying city and country names in any language, including non-Latin scripts like Japanese, Arabic, Korean, Thai, Chinese, and more. Fonts are automatically downloaded from Google Fonts and cached locally.

Overview

The multilingual system provides:
  • Custom display names for city and country in any language
  • Automatic font downloading from Google Fonts catalog
  • Local font caching to avoid repeated downloads
  • Script detection for proper typography (Latin vs. non-Latin)
  • Fallback handling for missing fonts

Basic Usage

Display Names

Use --display-city and --display-country to override the displayed text:
python create_map_poster.py \
  -c "Tokyo" \
  -C "Japan" \
  -dc "東京" \
  -dC "日本"
The -c and -C flags are still required for geocoding (finding the city location). The display flags only change what appears on the poster.

Custom Fonts

Specify any font from Google Fonts using --font-family:
python create_map_poster.py \
  -c "Tokyo" \
  -C "Japan" \
  -dc "東京" \
  -dC "日本" \
  --font-family "Noto Sans JP"
The font is automatically:
  1. Downloaded from Google Fonts API
  2. Cached in fonts/cache/
  3. Loaded for text rendering

Language Examples

python create_map_poster.py \
  -c "Tokyo" -C "Japan" \
  -dc "東京" -dC "日本" \
  --font-family "Noto Sans JP" \
  -t japanese_ink
Recommended Fonts:
  • Noto Sans JP (modern, clean)
  • Noto Serif JP (traditional, elegant)
  • M PLUS Rounded 1c (rounded, friendly)
  • Zen Kaku Gothic New (contemporary)
Other Cities:
# Osaka (大阪)
python create_map_poster.py -c "Osaka" -C "Japan" -dc "大阪" -dC "日本" --font-family "Noto Sans JP"

# Kyoto (京都)
python create_map_poster.py -c "Kyoto" -C "Japan" -dc "京都" -dC "日本" --font-family "Noto Serif JP"

Typography Behavior

Script Detection

The tool automatically detects whether text is Latin or non-Latin: Latin Scripts (English, French, Spanish, etc.):
  • Letter spacing applied for elegant aesthetics
  • Example: “P A R I S” (spaces between letters)
Non-Latin Scripts (Japanese, Arabic, Thai, etc.):
  • Natural spacing preserved
  • Example: “東京” (no artificial gaps)
This ensures proper typography for all languages without manual configuration.

Text Positioning

All text is positioned using normalized coordinates:
y=0.14  City name (spaced for Latin, natural for non-Latin)
y=0.125 Decorative line
y=0.10  Country name
y=0.07  Coordinates

Font Management

Automatic Caching

Fonts are cached in fonts/cache/ after first download:
fonts/
├── Roboto-Light.ttf      # Default fonts
├── Roboto-Regular.ttf
├── Roboto-Bold.ttf
└── cache/
    ├── Noto_Sans_JP-Regular.ttf
    ├── Noto_Sans_KR-Regular.ttf
    ├── Cairo-Regular.ttf
    └── ...

Manual Font Installation

You can also manually place fonts in fonts/cache/:
  1. Download .ttf file from Google Fonts
  2. Place in fonts/cache/ directory
  3. Use the font family name with --font-family

Finding Google Fonts

Browse available fonts at fonts.google.com:
  1. Filter by language/script
  2. Copy the font family name
  3. Use exact name with --font-family
Font names are case-sensitive and must match exactly as shown on Google Fonts.

Complete Examples

Japanese with Custom Theme

python create_map_poster.py \
  -c "Tokyo" -C "Japan" \
  -dc "東京" -dC "日本" \
  --font-family "Noto Sans JP" \
  -t japanese_ink \
  -d 15000

Arabic with Multiple Flags

python create_map_poster.py \
  -c "Dubai" -C "UAE" \
  -dc "دبي" -dC "الإمارات" \
  --font-family "Cairo" \
  -t midnight_blue \
  -d 15000 \
  -W 12 -H 16

Korean with All Themes

python create_map_poster.py \
  -c "Seoul" -C "South Korea" \
  -dc "서울" -dC "대한민국" \
  --font-family "Noto Sans KR" \
  --all-themes

Chinese with Custom Coordinates

python create_map_poster.py \
  -c "Beijing" -C "China" \
  -dc "北京" -dC "中国" \
  --font-family "Noto Sans SC" \
  -lat 39.9042 -long 116.4074 \
  -t noir

Troubleshooting

Ensure the font name matches exactly as shown on fonts.google.com. Font names are case-sensitive.
# Correct
--font-family "Noto Sans JP"

# Incorrect
--font-family "noto sans jp"
--font-family "Noto-Sans-JP"
Make sure the font you selected supports the script you’re using. Check the font’s supported languages on Google Fonts.For example:
  • Use “Noto Sans JP” for Japanese (not “Roboto”)
  • Use “Cairo” for Arabic (not “Open Sans”)
  • Use “Noto Sans KR” for Korean
This is normal for Latin scripts. The tool applies letter spacing for aesthetics (“P A R I S”).For non-Latin scripts, spacing is not applied. If you see unwanted spacing in Japanese/Arabic/etc., the tool may be incorrectly detecting the script. File a bug report.
If font downloads fail:
  1. Check your internet connection
  2. Verify the font exists on Google Fonts
  3. Try downloading manually and placing in fonts/cache/
  4. Check the font file name matches the pattern: Font_Name-Regular.ttf
The tool is designed for Google Fonts integration. To use system fonts:
  1. Copy the .ttf file to fonts/cache/
  2. Use the font family name with --font-family
Note: The tool expects TrueType fonts (.ttf format).

Font Recommendations by Script

ScriptLanguage ExamplesRecommended Fonts
Japanese日本語Noto Sans JP, Noto Serif JP, M PLUS Rounded 1c
Korean한국어Noto Sans KR, Noto Serif KR, Black Han Sans
Chinese (Simp.)简体中文Noto Sans SC, Noto Serif SC, ZCOOL XiaoWei
Chinese (Trad.)繁體中文Noto Sans TC, Noto Serif TC
ArabicالعربيةCairo, Amiri, Tajawal, Almarai
ThaiไทยNoto Sans Thai, Kanit, Prompt
HebrewעבריתNoto Sans Hebrew, Heebo
GreekΕλληνικάNoto Sans, Roboto
CyrillicКириллицаNoto Sans, Roboto, Montserrat
DevanagariदेवनागरीNoto Sans Devanagari, Poppins
BengaliবাংলাNoto Sans Bengali, Hind Siliguri
Tamilதமிழ்Noto Sans Tamil, Pavanam

Next Steps

Theme Gallery

Explore all 17 built-in themes

Advanced Examples

See complex multilingual examples with custom coordinates

Build docs developers (and LLMs) love