diff --git a/demos/gtk-demo/meson.build b/demos/gtk-demo/meson.build index 432aecb51b..b6492c7b5b 100644 --- a/demos/gtk-demo/meson.build +++ b/demos/gtk-demo/meson.build @@ -76,8 +76,11 @@ demos = files([ gtkdemo_deps = [ libgtk_dep, ] +extra_demo_sources = files(['main.c', 'gtkfishbowl.c', 'fontplane.c', 'gtkgears.c']) + if harfbuzz_dep.found() and pangoft_dep.found() demos += files('font_features.c') + extra_demo_sources += files(['script-names.c', 'language-names.c']) gtkdemo_deps += [ harfbuzz_dep, ] endif @@ -97,9 +100,7 @@ gtkdemo_resources = gnome.compile_resources('gtkdemo_resources', source_dir: '.') executable('gtk4-demo', - 'main.c', 'gtkfishbowl.c', 'fontplane.c', 'script-names.c', 'language-names.c', - 'gtkgears.c', - demos, demos_h, gtkdemo_resources, + demos, demos_h, extra_demo_sources, gtkdemo_resources, c_args: gtkdemo_args, dependencies: gtkdemo_deps, include_directories: confinc, @@ -135,4 +136,4 @@ install_data('org.gtk.Demo.gschema.xml', install_dir: gtk_schemasdir) gnome.compile_schemas() # appdata -install_data('org.gtk.Demo.appdata.xml', install_dir: gtk_appdatadir) \ No newline at end of file +install_data('org.gtk.Demo.appdata.xml', install_dir: gtk_appdatadir) diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 907d1a3f05..e68c9ff783 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -766,7 +766,10 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass) gtk_widget_class_bind_template_callback (widget_class, size_change_cb); gtk_widget_class_bind_template_callback (widget_class, output_cb); gtk_widget_class_bind_template_callback (widget_class, selection_changed); + +#if defined(HAVE_HARFBUZZ) && defined(HAVE_PANGOFT) gtk_widget_class_bind_template_callback (widget_class, update_language); +#endif gtk_widget_class_set_css_name (widget_class, I_("fontchooser")); } @@ -896,7 +899,11 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *fontchooser) /* Load data and set initial style-dependent parameters */ gtk_font_chooser_widget_load_fonts (fontchooser, TRUE); + +#if defined(HAVE_HARFBUZZ) && defined(HAVE_PANGOFT) gtk_font_chooser_widget_populate_features (fontchooser); +#endif + gtk_font_chooser_widget_set_cell_size (fontchooser); gtk_font_chooser_widget_take_font_desc (fontchooser, NULL); } diff --git a/gtk/meson.build b/gtk/meson.build index ff57cb4b65..5dea256920 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -7,8 +7,6 @@ subdir('inspector') gtk_private_sources = files([ 'fallback-c89.c', 'fnmatch.c', - 'language-names.c', - 'script-names.c', 'gdkpixbufutils.c', 'gtkactionhelper.c', 'gtkactionmuxer.c', @@ -874,6 +872,10 @@ gtk_deps = [ if harfbuzz_dep.found() and pangoft_dep.found() gtk_deps += [ harfbuzz_dep, pangoft_dep ] + gtk_sources += files([ + 'language-names.c', + 'script-names.c', + ]) endif if x11_enabled