- // TODO: as soon as Pango provides a function to check at runtime its
- // version, we can use it to disable the underline hack for
- // Pango >= 1.16 as the "underline of leading/trailing spaces"
- // has been fixed there
- bool needshack = underlined;
+ // in Pango >= 1.16 the "underline of leading/trailing spaces" bug
+ // has been fixed and thus the hack implemented below should never be used
+ static bool pangoOk = !wx_pango_version_check(1, 16, 0);
+
+ bool needshack = underlined && !pangoOk;