[pango/pango2: 171/301] Drop PangoCoverage




commit 8f4111f0693e7572f7a11f12af6c0bdcf2b2a01a
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 7 21:36:13 2022 -0400

    Drop PangoCoverage
    
    pango_font_has_char can serve the same purpose,
    we don't need a separate object for this.

 pango/meson.build              |   2 -
 pango/pango-coverage-private.h |  57 -----------
 pango/pango-coverage.c         | 216 -----------------------------------------
 pango/pango-coverage.h         |  88 -----------------
 pango/pango-font-private.h     |   3 -
 pango/pango-font.c             |  24 +----
 pango/pango-font.h             |   4 -
 pango/pango-fontset-simple.h   |   1 -
 pango/pango-fontset.h          |   1 -
 pango/pango-hbfont.c           |  11 ---
 pango/pango-userfont.c         |  11 ---
 pango/pango.h                  |   1 -
 tests/meson.build              |   1 -
 tests/test-coverage.c          |  83 ----------------
 14 files changed, 1 insertion(+), 502 deletions(-)
---
diff --git a/pango/meson.build b/pango/meson.build
index 62d0cdd6e..9aa1c6f59 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -10,7 +10,6 @@ pango_sources = [
   'pango-bidi.c',
   'pango-color.c',
   'pango-context.c',
-  'pango-coverage.c',
   'pango-emoji.c',
   'pango-font.c',
   'pango-font-description.c',
@@ -62,7 +61,6 @@ pango_headers = [
   'pango-break.h',
   'pango-color.h',
   'pango-context.h',
-  'pango-coverage.h',
   'pango-direction.h',
   'pango-font.h',
   'pango-font-description.h',
diff --git a/pango/pango-font-private.h b/pango/pango-font-private.h
index 660aab1a9..c67398205 100644
--- a/pango/pango-font-private.h
+++ b/pango/pango-font-private.h
@@ -21,7 +21,6 @@
 
 #include <pango/pango-font-family.h>
 #include <pango/pango-font.h>
-#include <pango/pango-coverage.h>
 #include <pango/pango-types.h>
 
 #include <glib-object.h>
@@ -40,8 +39,6 @@ struct _PangoFontClass
   GObjectClass parent_class;
 
   PangoFontDescription * (* describe)           (PangoFont      *font);
-  PangoCoverage *        (* get_coverage)       (PangoFont      *font,
-                                                PangoLanguage  *language);
   void                   (* get_glyph_extents)  (PangoFont      *font,
                                                 PangoGlyph      glyph,
                                                 PangoRectangle *ink_rect,
diff --git a/pango/pango-font.c b/pango/pango-font.c
index e1519b21c..c54283131 100644
--- a/pango/pango-font.c
+++ b/pango/pango-font.c
@@ -69,10 +69,7 @@ static gboolean
 pango_font_default_has_char (PangoFont *font,
                              gunichar   wc)
 {
-  PangoCoverage *coverage = pango_font_get_coverage (font, pango_language_get_default ());
-  PangoCoverageLevel result = pango_coverage_get (coverage, wc);
-  g_object_unref (coverage);
-  return result != PANGO_COVERAGE_NONE;
+  return FALSE;
 }
 
 static PangoFontFace *
@@ -168,25 +165,6 @@ pango_font_describe_with_absolute_size (PangoFont *font)
   return PANGO_FONT_GET_CLASS (font)->describe_absolute (font);
 }
 
-/**
- * pango_font_get_coverage:
- * @font: a `PangoFont`
- * @language: the language tag
- *
- * Computes the coverage map for a given font and language tag.
- *
- * Return value: (transfer full): a newly-allocated `PangoCoverage`
- *   object.
- */
-PangoCoverage *
-pango_font_get_coverage (PangoFont     *font,
-                         PangoLanguage *language)
-{
-  g_return_val_if_fail (font != NULL, NULL);
-
-  return PANGO_FONT_GET_CLASS (font)->get_coverage (font, language);
-}
-
 /**
  * pango_font_get_glyph_extents:
  * @font: (nullable): a `PangoFont`
diff --git a/pango/pango-font.h b/pango/pango-font.h
index dc9195df8..9275b12f1 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -19,7 +19,6 @@
 
 #pragma once
 
-#include <pango/pango-coverage.h>
 #include <pango/pango-types.h>
 #include <pango/pango-font-description.h>
 #include <pango/pango-font-metrics.h>
@@ -41,9 +40,6 @@ PangoFontDescription *pango_font_describe          (PangoFont        *font);
 PANGO_AVAILABLE_IN_ALL
 PangoFontDescription *pango_font_describe_with_absolute_size (PangoFont        *font);
 PANGO_AVAILABLE_IN_ALL
-PangoCoverage *       pango_font_get_coverage      (PangoFont        *font,
-                                                    PangoLanguage    *language);
-PANGO_AVAILABLE_IN_ALL
 PangoFontMetrics *    pango_font_get_metrics       (PangoFont        *font,
                                                     PangoLanguage    *language);
 PANGO_AVAILABLE_IN_ALL
diff --git a/pango/pango-fontset-simple.h b/pango/pango-fontset-simple.h
index a95fc9a4d..9548d5876 100644
--- a/pango/pango-fontset-simple.h
+++ b/pango/pango-fontset-simple.h
@@ -19,7 +19,6 @@
 
 #pragma once
 
-#include <pango/pango-coverage.h>
 #include <pango/pango-types.h>
 #include <pango/pango-fontset.h>
 
diff --git a/pango/pango-fontset.h b/pango/pango-fontset.h
index ec939a20a..cb1145dc5 100644
--- a/pango/pango-fontset.h
+++ b/pango/pango-fontset.h
@@ -19,7 +19,6 @@
 
 #pragma once
 
-#include <pango/pango-coverage.h>
 #include <pango/pango-types.h>
 #include <pango/pango-font-metrics.h>
 
diff --git a/pango/pango-hbfont.c b/pango/pango-hbfont.c
index b6833a986..33b37a9cd 100644
--- a/pango/pango-hbfont.c
+++ b/pango/pango-hbfont.c
@@ -24,7 +24,6 @@
 
 #include "pango-font-private.h"
 #include "pango-font-metrics-private.h"
-#include "pango-coverage-private.h"
 #include "pango-hbface-private.h"
 #include "pango-hbfamily-private.h"
 #include "pango-impl-utils.h"
@@ -609,15 +608,6 @@ pango_hb_font_describe_absolute (PangoFont *font)
   return desc;
 }
 
-static PangoCoverage *
-pango_hb_font_get_coverage (PangoFont     *font,
-                            PangoLanguage *language G_GNUC_UNUSED)
-{
-  PangoHbFont *self = PANGO_HB_FONT (font);
-
-  return pango_coverage_new_for_hb_face (pango_hb_face_get_hb_face (self->face));
-}
-
 static void
 pango_hb_font_get_glyph_extents (PangoFont      *font,
                                  PangoGlyph      glyph,
@@ -926,7 +916,6 @@ pango_hb_font_class_init (PangoHbFontClass *class)
 
   font_class->describe = pango_hb_font_describe;
   font_class->describe_absolute = pango_hb_font_describe_absolute;
-  font_class->get_coverage = pango_hb_font_get_coverage;
   font_class->get_glyph_extents = pango_hb_font_get_glyph_extents;
   font_class->get_metrics = pango_hb_font_get_metrics;
   font_class->get_font_map = pango_hb_font_get_font_map;
diff --git a/pango/pango-userfont.c b/pango/pango-userfont.c
index f20524632..16b51a5f0 100644
--- a/pango/pango-userfont.c
+++ b/pango/pango-userfont.c
@@ -24,7 +24,6 @@
 
 #include "pango-font-private.h"
 #include "pango-font-metrics-private.h"
-#include "pango-coverage-private.h"
 #include "pango-userface-private.h"
 #include "pango-hbfamily-private.h"
 #include "pango-impl-utils.h"
@@ -89,15 +88,6 @@ pango_user_font_describe_absolute (PangoFont *font)
   return desc;
 }
 
-static PangoCoverage *
-pango_user_font_get_coverage (PangoFont     *font,
-                              PangoLanguage *language G_GNUC_UNUSED)
-{
-  PangoUserFont *self = PANGO_USER_FONT (font);
-
-  return pango_coverage_new_for_font_face (PANGO_FONT_FACE (self->face));
-}
-
 static void
 pango_user_font_get_glyph_extents (PangoFont      *font,
                                    PangoGlyph      glyph,
@@ -391,7 +381,6 @@ pango_user_font_class_init (PangoUserFontClass *class)
 
   font_class->describe = pango_user_font_describe;
   font_class->describe_absolute = pango_user_font_describe_absolute;
-  font_class->get_coverage = pango_user_font_get_coverage;
   font_class->get_glyph_extents = pango_user_font_get_glyph_extents;
   font_class->get_metrics = pango_user_font_get_metrics;
   font_class->get_font_map = pango_user_font_get_font_map;
diff --git a/pango/pango.h b/pango/pango.h
index 5d9cd5e89..e30a1c0ff 100644
--- a/pango/pango.h
+++ b/pango/pango.h
@@ -26,7 +26,6 @@
 #include <pango/pango-break.h>
 #include <pango/pango-color.h>
 #include <pango/pango-context.h>
-#include <pango/pango-coverage.h>
 #include <pango/pango-direction.h>
 #include <pango/pango-enum-types.h>
 #include <pango/pango-features.h>
diff --git a/tests/meson.build b/tests/meson.build
index 35a941b38..162d55f2a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -15,7 +15,6 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
 test_env.set('LC_ALL', 'en_US.UTF-8')
 
 tests = [
-  [ 'test-coverage' ],
   [ 'testboundaries' ],
   [ 'testboundaries_ucd' ],
   [ 'testcolor' ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]