diff --git a/plugins/ui/source/ui/text_editor/render.cpp b/plugins/ui/source/ui/text_editor/render.cpp index 549368f72..0b6d5df4f 100644 --- a/plugins/ui/source/ui/text_editor/render.cpp +++ b/plugins/ui/source/ui/text_editor/render.cpp @@ -1,4 +1,5 @@ #include "imgui.h" +#include "fonts/fonts.hpp" #include #include @@ -530,8 +531,12 @@ namespace hex::ui { auto textStart = textDistanceToLineStart(lineStart); auto begin = lineStartScreenPos + ImVec2(textStart, 0); + if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment) + fonts::CodeEditor().pushItalic(); TextUnformattedColoredAt(begin, m_palette[(i32) color], line.substr(i, tokenLength).c_str()); + if (color <= (char) TextEditor::PaletteIndex::Comment && color >= (char) TextEditor::PaletteIndex::DocComment) + fonts::CodeEditor().pop(); ErrorMarkers::iterator errorIt; auto key = lineStart + Coordinates(1, 1); if (errorIt = m_errorMarkers.find(key); errorIt != m_errorMarkers.end()) {