[pango/pango2: 15/168] Drop PangoXft
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 15/168] Drop PangoXft
- Date: Wed, 8 Jun 2022 10:22:14 +0000 (UTC)
commit dd09b4c4207c5a0505c76cd470a970bc94549d71
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 12 08:07:07 2022 -0500
Drop PangoXft
meson.build | 10 +-
meson_options.txt | 4 -
pango/meson.build | 69 ----
pango/pangoxft-font.c | 481 -----------------------
pango/pangoxft-fontmap.c | 332 ----------------
pango/pangoxft-private.h | 63 ----
pango/pangoxft-render.c | 965 -----------------------------------------------
pango/pangoxft-render.h | 159 --------
pango/pangoxft.h | 97 -----
pango/pangoxft.rc.in | 30 --
tests/meson.build | 4 -
utils/meson.build | 16 +-
utils/pango-view.c | 4 -
utils/viewer-cairo.c | 10 +-
utils/viewer-x.c | 4 +-
utils/viewer-x.h | 2 +-
16 files changed, 18 insertions(+), 2232 deletions(-)
---
diff --git a/meson.build b/meson.build
index d7a1168b..07cdfd61 100644
--- a/meson.build
+++ b/meson.build
@@ -230,7 +230,6 @@ fribidi_req_version = '>= 1.0.6'
libthai_req_version = '>= 0.1.9'
harfbuzz_req_version = '>= 2.6.0'
fontconfig_req_version = '>= 2.13.0'
-xft_req_version = '>= 2.0.0'
cairo_req_version = '>= 1.12.10'
# libm
@@ -356,14 +355,7 @@ if build_pangoft2
pango_deps += freetype_dep
endif
-build_pangoxft = false
-xft_dep = dependency('xft', version: xft_req_version, required: get_option('xft'))
-if xft_dep.found() and fontconfig_dep.found() and freetype_dep.found()
- pango_conf.set('HAVE_XFT', 1)
- pango_deps += dependency('xrender', required: false)
- pango_deps += xft_dep
- build_pangoxft = true
-endif
+x11_dep = dependency('x11', required: false)
has_core_text = false
if host_system == 'darwin'
diff --git a/meson_options.txt b/meson_options.txt
index 3cd1b0bc..091bab4b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -27,10 +27,6 @@ option('cairo',
type : 'feature',
value : 'enabled',
description : 'Build with cairo support')
-option('xft',
- type : 'feature',
- value : 'auto',
- description : 'Build with xft support')
option('freetype',
type : 'feature',
value : 'auto',
diff --git a/pango/meson.build b/pango/meson.build
index 7cd4b216..3826f949 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -340,75 +340,6 @@ else
pangoft2_gir = [[]]
endif
-# Xft
-if xft_dep.found() and fontconfig_dep.found()
- pangoxft_headers = [
- 'pangoxft.h',
- 'pangoxft-render.h',
- ]
-
- pangoxft_sources = [
- 'pangoxft-font.c',
- 'pangoxft-fontmap.c',
- 'pangoxft-render.c',
- ]
-
- install_headers(pangoxft_headers, subdir: pango_api_path)
-
- libpangoxft = library(
- 'pangoxft-@0@'.format(pango_api_version),
- sources: pangoxft_sources,
- version: pango_libversion,
- soversion: pango_soversion,
- darwin_versions : pango_osxversion,
- install: true,
- dependencies: pango_deps + [ libpango_dep, libpangoft2_dep ],
- include_directories: [ root_inc, pango_inc ],
- c_args: common_cflags + pango_debug_cflags + pango_cflags + [
- '-DPANGO_DISABLE_DEPRECATION_WARNINGS',
- ],
- link_args: common_ldflags,
- )
- pangoxft_dep_sources = []
-
- if build_gir
- pangoxft_gir = gnome.generate_gir(
- libpangoxft,
- sources: pangoxft_headers + pangoxft_sources,
- dependencies: [ libpango_dep, libpangoft2_dep, pango_gir_dep, pangoot_gir_dep, pangoft2_gir_dep ],
- namespace: 'PangoXft',
- nsversion: pango_api_version,
- identifier_prefix: 'PangoXft',
- symbol_prefix: 'pango_xft',
- export_packages: 'pangoxft',
- includes: [ pango_gir[0], pangoot_gir[0], pangoft2_gir[0], 'GObject-2.0', 'xft-2.0', 'xlib-2.0' ],
- header: 'pango/pangoxft.h',
- install: true,
- extra_args: gir_args,
- )
- pangoxft_dep_sources += pangoxft_gir
- endif
-
- libpangoxft_dep = declare_dependency(
- link_with: libpangoxft,
- include_directories: root_inc,
- dependencies: pango_deps + [ libpango_dep, libpangoft2_dep ],
- sources: pangoxft_dep_sources,
- )
- meson.override_dependency('pangoxft', libpangoxft_dep)
-
- pkgconfig.generate(libpangoxft,
- name: 'Pango Xft',
- description: 'Xft font support for Pango',
- filebase: 'pangoxft',
- subdirs: pango_api_name,
- requires: [ 'pangoft2', 'xft' ],
- )
-else
- # For usage as a subproject
- libpangoxft_dep = dependency('', required: false)
-endif
-
# Win32
if host_system == 'windows'
pangowin32_headers = [
diff --git a/tests/meson.build b/tests/meson.build
index c309303d..3d0e0455 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -2,10 +2,6 @@ test_cflags = [
'-DSRCDIR=@0@'.format(meson.current_source_dir()),
]
-if xft_dep.found()
- test_cflags += [ '-DHAVE_X', '-DHAVE_XFT' ]
-endif
-
if host_system == 'windows'
test_cflags += '-DHAVE_WIN32'
elif host_system == 'darwin'
diff --git a/utils/meson.build b/utils/meson.build
index 5072c1cc..4a16df24 100644
--- a/utils/meson.build
+++ b/utils/meson.build
@@ -14,12 +14,17 @@ if build_pangoft2
pango_view_deps += libpangoft2_dep
endif
-if xft_dep.found() and build_pangoft2
+extra_cflags = [
+ '-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
+ '-DPACKAGE_VERSION="@0@"'.format(meson.project_version())
+]
+
+if build_pangoft2 and x11_dep.found()
pango_view_sources += [
- 'viewer-pangoxft.c',
'viewer-x.c',
]
- pango_view_deps += [ libpangoft2_dep, libpangoxft_dep, ]
+ pango_view_deps += [ libpangoft2_dep, x11_dep ]
+ extra_cflags += [ '-DHAVE_X' ]
endif
if cairo_dep.found()
@@ -34,10 +39,7 @@ pango_view = executable('pango-view', pango_view_sources,
dependencies: pango_view_deps,
include_directories: [ root_inc ],
install: true,
- c_args: common_cflags + pango_debug_cflags + [
- '-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
- '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
- ])
+ c_args: extra_cflags)
help2man = find_program('help2man', required: false)
# help2man has to run pango-view to generate the man page, which it can't do if
diff --git a/utils/pango-view.c b/utils/pango-view.c
index fec00be9..dbfb31ca 100644
--- a/utils/pango-view.c
+++ b/utils/pango-view.c
@@ -2,7 +2,6 @@
#include "viewer.h"
extern const PangoViewer pangocairo_viewer;
-extern const PangoViewer pangoxft_viewer;
extern const PangoViewer pangoft2_viewer;
extern const PangoViewer pangox_viewer;
@@ -10,9 +9,6 @@ const PangoViewer *viewers[] = {
#ifdef HAVE_CAIRO
&pangocairo_viewer,
#endif
-#ifdef HAVE_XFT
- &pangoxft_viewer,
-#endif
#ifdef HAVE_FREETYPE
&pangoft2_viewer,
#endif
diff --git a/utils/viewer-cairo.c b/utils/viewer-cairo.c
index f15b3fb9..f25d7766 100644
--- a/utils/viewer-cairo.c
+++ b/utils/viewer-cairo.c
@@ -30,7 +30,7 @@
#ifdef HAVE_CAIRO_XLIB
-#ifdef HAVE_XFT
+#ifdef HAVE_X
#include "viewer-x.h"
#include <cairo-xlib.h>
@@ -67,11 +67,11 @@ cairo_x_view_iface_paint_background (gpointer instance G_GNUC_UNUSED,
}
static CairoViewerIface cairo_x_viewer_iface = {
- &x_viewer,
+ &pangox_viewer,
cairo_x_view_iface_create_surface,
cairo_x_view_iface_paint_background
};
-#endif /* HAVE_XFT */
+#endif /* HAVE_X */
#endif /* HAVE_CAIRO_XLIB */
@@ -348,13 +348,13 @@ cairo_viewer_iface_create (const CairoViewerIface **iface)
return ret;
#ifdef HAVE_CAIRO_XLIB
-#ifdef HAVE_XFT
+#ifdef HAVE_X
if (opt_display)
{
*iface = &cairo_x_viewer_iface;
return (*iface)->backend_class->create ((*iface)->backend_class);
}
-#endif /* HAVE_XFT */
+#endif /* HAVE_X */
#endif /* HAVE_CAIRO_XLIB */
*iface = &cairo_image_viewer_iface;
diff --git a/utils/viewer-x.c b/utils/viewer-x.c
index 02c688ea..0bc9286c 100644
--- a/utils/viewer-x.c
+++ b/utils/viewer-x.c
@@ -219,9 +219,9 @@ x_view_display (gpointer instance,
}
}
-const PangoViewer x_viewer = {
+const PangoViewer pangox_viewer = {
"X",
- NULL,
+ "x",
NULL,
x_view_create,
x_view_destroy,
diff --git a/utils/viewer-x.h b/utils/viewer-x.h
index 28f61f6b..5611f20c 100644
--- a/utils/viewer-x.h
+++ b/utils/viewer-x.h
@@ -36,7 +36,7 @@ typedef struct
} XViewer;
-extern const PangoViewer x_viewer;
+extern const PangoViewer pangox_viewer;
void x_view_init (gpointer instance,
const PangoViewer *klass);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]