lao-python-learn / docs /fonts.md
bounthong
fix: read PORT env for Render deployment
667bab7
|
Raw History Blame Contribute Delete
1.88 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade

Google Fonts for Lao Script

Recommended Font: Noto Sans Lao

Why Noto Sans Lao?

Comprehensive Coverage:

  • Supports all Lao script characters (tones, diacritics, special characters)
  • Includes both Lao and Thai characters (useful for mixed content)
  • Well-tested across all browsers and operating systems

Google Fonts Integration:

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@400;500;600;700&display=swap');

Weights Available:

  • 400 - Regular
  • 500 - Medium
  • 600 - Semi-bold
  • 700 - Bold

Alternative Options

1. Phetsarath OT

  • Traditional Lao font
  • Built into many systems
  • Less modern appearance

2. Saysettha OT

  • Another traditional option
  • Good coverage but less common online

3. Lao Sans Pro

  • Commercial font (not free)
  • Excellent quality but requires license

Implementation in Our App

custom_css = """
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@400;500;600;700&display=swap');

body, .gradio-container, textarea, input, button, select {
    font-family: 'Noto Sans Lao', sans-serif !important;
}

code, pre {
    font-family: 'Courier New', monospace !important;
}
"""

Testing

The font is now active in our Lao Python Learning Platform:

Browser Support

Noto Sans Lao works on:

  • βœ… Chrome/Edge (best support)
  • βœ… Firefox
  • βœ… Safari
  • βœ… Mobile browsers (iOS/Android)

Notes

  1. First-load delay: Google Fonts may cause slight delay on first visit (solved with display=swap)
  2. Offline: Font won't load without internet (acceptable for web platform)
  3. Fallback: System falls back to default sans-serif if font fails to load