remove std::function usage in text_properties