Generate labels with pangocairo #8

Merged
moritz merged 30 commits from generate-text-part-one into master 2025-10-12 20:07:19 +00:00
Showing only changes of commit 77c6b7bc7b - Show all commits

View File

@@ -103,7 +103,10 @@ bool Label::create(const std::string& labelText) {
case HAlignPosition::JUSTIFY:
pango_layout_set_alignment(mPangoLyt, PANGO_ALIGN_LEFT); // not sure if needed
pango_layout_set_justify(mPangoLyt, true);
// only enabled in pango 1.50 and greater
#if PANGO_VERSION_MAJOR >= 1 && PANGO_VERSION_MINOR >= 50
pango_layout_set_justify_last_line(mPangoLyt, true);
#endif
break;
case HAlignPosition::CENTER:
[[fallthrough]];