groupbar: unify title rendering

moves the text renderer to the unified opengl impl
This commit is contained in:
vaxerski
2025-01-02 17:50:55 +01:00
parent 365caa49ff
commit 81721b8aa8
4 changed files with 11 additions and 73 deletions

View File

@@ -2555,12 +2555,12 @@ SP<CTexture> CHyprOpenGLImpl::loadAsset(const std::string& filename) {
return tex;
}
SP<CTexture> CHyprOpenGLImpl::renderText(const std::string& text, CHyprColor col, int pt, bool italic) {
SP<CTexture> CHyprOpenGLImpl::renderText(const std::string& text, CHyprColor col, int pt, bool italic, const std::string& fontFamily) {
SP<CTexture> tex = makeShared<CTexture>();
static auto FONT = CConfigValue<std::string>("misc:font_family");
const auto FONTFAMILY = *FONT;
const auto FONTFAMILY = fontFamily.empty() ? *FONT : fontFamily;
const auto FONTSIZE = pt;
const auto COLOR = col;