diff --git a/text-pango.c b/text-pango.c index bce7030..108eadc 100644 --- a/text-pango.c +++ b/text-pango.c @@ -275,6 +275,10 @@ static obs_properties_t *pango_source_get_properties(void *unused) prop = obs_properties_add_bool(props, "font_from_file", obs_module_text("Font.FromFile")); +#if FC_VERSION < 21291 + // Disable this if FC is too old. + obs_property_set_visible(prop, false); +#endif obs_property_set_modified_callback(prop, pango_source_properties_font_from_file_changed); obs_properties_add_path(props, "font_file", diff --git a/text-utilities.h b/text-utilities.h index 05ee53c..4306f97 100755 --- a/text-utilities.h +++ b/text-utilities.h @@ -30,6 +30,7 @@ cairo_t *create_layout_context() static void set_font(struct pango_source *src, PangoLayout *layout) { PangoFontDescription *desc = NULL; +#if FC_VERSION < 21291 if (src->font_from_file && src->font_file && strcmp(src->font_file, "") != 0) { if (FcConfigAppFontAddFile(NULL, src->font_file)) { FcFontSet *font_set = FcFontSetCreate(); @@ -44,6 +45,7 @@ static void set_font(struct pango_source *src, PangoLayout *layout) { blog(LOG_WARNING, "[pango] Failed to load font: %s", src->font_file); } } +#endif if (!desc) { // If we havnt loaded a font file, go ahead and load our font name choice. desc = pango_font_description_new ();