Basic Text Functions
Text()
Display formatted text using printf-style formatting:TextUnformatted()
Display raw text without formatting (faster for long text):TextUnformatted() is more efficient than Text() for long text blocks as it doesn’t process format specifiers. It also supports non-null-terminated strings when text_end is provided.Colored Text
TextColored()
Display text with a custom color:TextDisabled()
Display text with the disabled color from the current style:The disabled color is defined in
ImGuiStyle::Colors[ImGuiCol_TextDisabled]. Use this for consistency across your application.Wrapped Text
TextWrapped()
Display text that automatically wraps at the window edge:Custom Text Wrapping
For more control over text wrapping, usePushTextWrapPos() / PopTextWrapPos():
float
< 0.0f: No wrapping= 0.0f: Wrap to end of window (or column)> 0.0f: Wrap at specified position in window local space
Label and Value Pairs
LabelText()
Display a label and value aligned like other widgets:BulletText()
Display text with a bullet point:Bullet() separately to just draw the bullet:
Separator Text
SeparatorText()
Display a horizontal line with text (added in recent versions):Text Links
TextLink()
Display clickable hyperlink-style text:Font Size Control
You can change the font size for text rendering:Use
NULL for the font parameter to keep the current font. The font_size_base_unscaled parameter is the size before global scale factors are applied.