gtk/: Fix build without PangoFT2 and HarfBuzz
On Windows HarfBuzz and PangoFT2 are optional, so we need to ensure that we only build the bits that require HarfBuzz and PangoFT2 when needed. We may need to see later whether we can get the needed functionality in gtkfontchooserwidget.c with the Windows APIs without the need of HarfBuzz nor PangoFT2 (and starting programs on Windows using FontConfig is very slow).
This commit is contained in:
@ -862,7 +862,9 @@ 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);
|
||||
}
|
||||
|
||||
@ -15,6 +15,8 @@
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#if defined (HAVE_HARFBUZZ) && defined (HAVE_PANGOFT)
|
||||
#include <hb-ot.h>
|
||||
|
||||
#include "language-names.h"
|
||||
@ -237,3 +239,4 @@ get_language_name_for_tag (guint32 tag)
|
||||
|
||||
return get_language_name (pango_language_from_string (s));
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#if defined (HAVE_HARFBUZZ) && defined (HAVE_PANGOFT)
|
||||
#include <hb-ot.h>
|
||||
|
||||
#include "script-names.h"
|
||||
@ -182,3 +184,4 @@ get_script_name_for_tag (guint32 tag)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user