Overview
Dear ImGui embeds default fonts for convenience, but you can load custom TTF/OTF fonts to match your application’s design and support various languages.Since v1.92 (June 2025): Font system has been significantly improved with dynamic font sizing and automatic glyph loading.
Default Fonts
Dear ImGui embeds two default fonts:- ProggyClean.ttf - 13px pixel-perfect monospace font (doesn’t scale well)
- ProggyForever.ttf - New scalable font mimicking ProggyClean
Define
IMGUI_DISABLE_DEFAULT_FONT in imconfig.h to disable embedded fonts and save ~26 KB.Loading Custom Fonts
Basic Font Loading
Since v1.92 (with updated backend):Setting Base Font Size
Loading Multiple Fonts
Dynamic Font Sizing (v1.92+)
Font Configuration
Advanced Options
Monospace Icons
Make icons monospace for better alignment:Merging Fonts
Combine multiple fonts into one for seamless multi-language or icon support. Since v1.92 (with updated backend):Excluding Overlapping Ranges (v1.92+)
Prevent conflicts when merging fonts:Icon Fonts
Use icon fonts like FontAwesome for scalable icons in your UI.Setup with IconFontCppHeaders
Since v1.92:Using Icons
Multilingual Text Support
Loading Non-Latin Fonts
Since v1.92: Glyph ranges are unnecessary!UTF-8 Encoding
All Dear ImGui strings must be UTF-8 encoded. Verify encoding:- Visual Studio: Add
/utf-8flag or#pragma execution_character_set("utf-8") - Ensure source files are saved as UTF-8
Example Japanese UI
FreeType Rasterizer
For better quality at small sizes, use FreeType instead of stb_truetype:FreeType Options
Colored Glyphs/Emoji
Loading from Memory
Embedding Fonts in Source Code
DPI Handling
Scaling Fonts
In Docking Branch
Debugging Fonts
Metrics Window
UTF-8 Encoding Viewer
Check Glyph Coverage
In Metrics window:- Expand “Fonts” section
- Select your font
- View loaded glyphs and coverage
Common Font Resources
Monospace Fonts
- Proggy Fonts - https://github.com/bluescan/proggyfonts
- JetBrains Mono - https://www.jetbrains.com/lp/mono/
- Fira Code - https://github.com/tonsky/FiraCode
- Source Code Pro - https://github.com/adobe-fonts/source-code-pro
- Inconsolata - http://www.levien.com/type/myfonts/inconsolata.html
Icon Fonts
- Font Awesome - https://fontawesome.com
- IconFontCppHeaders - https://github.com/juliettef/IconFontCppHeaders
- Material Design Icons - https://material.io/icons/
- IcoMoon - https://icomoon.io/app (custom icon builder)
Multilingual Fonts
- Google Noto Fonts - https://www.google.com/get/noto/ (all languages)
- M+ Fonts - http://mplus-fonts.sourceforge.jp/ (Japanese)
- Droid Sans - https://www.fontsquirrel.com/fonts/droid-sans
Best Practices
The
misc/fonts/ folder contains example fonts for reference. See FONTS.md for credits and licenses.See Also
- Troubleshooting - Font-related issues
- Performance - Font atlas optimization
- FONTS.md - Complete font documentation