summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-02-15 14:46:52 +0000
committerMatthias Clasen <mclasen@redhat.com>2022-02-15 14:46:52 +0000
commit8c48207a1fc645acb38ef3a69fc8a9fb1bf048d3 (patch)
tree1fa7ea139e930a8e9e5447e0b00323c0ab22a0f9
parentbcf61fc3a0c30da173c8629d1458fe3440288878 (diff)
parentfb19eb1d3f7454605f70f61b8c8f2eca3859a394 (diff)
downloadpango-8c48207a1fc645acb38ef3a69fc8a9fb1bf048d3.tar.gz
Merge branch 'minor-cleanups' into 'main'
cosmetics See merge request GNOME/pango!587
-rw-r--r--meson.build2
-rw-r--r--tests/layouts/valid-20.layout4
-rw-r--r--tests/layouts/vertical.layout28
-rw-r--r--utils/meson.build6
-rw-r--r--utils/pango-segmentation.c6
-rw-r--r--utils/viewer-render.c3
-rw-r--r--utils/viewer-x.c2
7 files changed, 28 insertions, 23 deletions
diff --git a/meson.build b/meson.build
index bcb92db5..59a39434 100644
--- a/meson.build
+++ b/meson.build
@@ -391,7 +391,7 @@ if not freetype_dep.found()
endif
# To build pangoft2, we need HarfBuzz, FontConfig and FreeType
-build_pangoft2 = harfbuzz_dep.found() and fontconfig_dep.found() and freetype_dep.found()
+build_pangoft2 = fontconfig_dep.found() and freetype_dep.found()
if build_pangoft2
pango_conf.set('HAVE_FREETYPE', 1)
pango_deps += freetype_dep
diff --git a/tests/layouts/valid-20.layout b/tests/layouts/valid-20.layout
index db692b73..93b8a1b1 100644
--- a/tests/layouts/valid-20.layout
+++ b/tests/layouts/valid-20.layout
@@ -140,7 +140,7 @@
"glyph" : 244,
"width" : 15360,
"x-offset" : 14764,
- "y-offset" : 3845,
+ "y-offset" : 3844,
"is-cluster-start" : true,
"log-cluster" : 0
},
@@ -156,7 +156,7 @@
"glyph" : 273,
"width" : 15360,
"x-offset" : 14764,
- "y-offset" : 3507,
+ "y-offset" : 3506,
"is-cluster-start" : true,
"log-cluster" : 2
}
diff --git a/tests/layouts/vertical.layout b/tests/layouts/vertical.layout
index a7f65068..e8619bfb 100644
--- a/tests/layouts/vertical.layout
+++ b/tests/layouts/vertical.layout
@@ -128,7 +128,7 @@
{
"glyph" : 1,
"width" : 32768,
- "x-offset" : 28836,
+ "x-offset" : 28835,
"y-offset" : 9945,
"is-cluster-start" : true,
"log-cluster" : 0
@@ -136,7 +136,7 @@
{
"glyph" : 2,
"width" : 32768,
- "x-offset" : 28836,
+ "x-offset" : 28835,
"y-offset" : 10764,
"is-cluster-start" : true,
"log-cluster" : 1
@@ -144,8 +144,8 @@
{
"glyph" : 3,
"width" : 32768,
- "x-offset" : 28836,
- "y-offset" : 10453,
+ "x-offset" : 28835,
+ "y-offset" : 10452,
"is-cluster-start" : true,
"log-cluster" : 2
}
@@ -179,24 +179,24 @@
{
"glyph" : 4,
"width" : 32768,
- "x-offset" : 28836,
- "y-offset" : 16384,
+ "x-offset" : 28835,
+ "y-offset" : 16383,
"is-cluster-start" : true,
"log-cluster" : 0
},
{
"glyph" : 5,
"width" : 32768,
- "x-offset" : 28836,
- "y-offset" : 16384,
+ "x-offset" : 28835,
+ "y-offset" : 16383,
"is-cluster-start" : true,
"log-cluster" : 3
},
{
"glyph" : 7,
"width" : 32768,
- "x-offset" : 28836,
- "y-offset" : 16384,
+ "x-offset" : 28835,
+ "y-offset" : 16383,
"is-cluster-start" : true,
"log-cluster" : 6
}
@@ -230,7 +230,7 @@
{
"glyph" : 1,
"width" : 32768,
- "x-offset" : 28836,
+ "x-offset" : 28835,
"y-offset" : 9945,
"is-cluster-start" : true,
"log-cluster" : 0
@@ -238,7 +238,7 @@
{
"glyph" : 2,
"width" : 32768,
- "x-offset" : 28836,
+ "x-offset" : 28835,
"y-offset" : 10764,
"is-cluster-start" : true,
"log-cluster" : 1
@@ -246,8 +246,8 @@
{
"glyph" : 3,
"width" : 32768,
- "x-offset" : 28836,
- "y-offset" : 10453,
+ "x-offset" : 28835,
+ "y-offset" : 10452,
"is-cluster-start" : true,
"log-cluster" : 2
}
diff --git a/utils/meson.build b/utils/meson.build
index 6d06dbec..5072c1cc 100644
--- a/utils/meson.build
+++ b/utils/meson.build
@@ -34,7 +34,7 @@ pango_view = executable('pango-view', pango_view_sources,
dependencies: pango_view_deps,
include_directories: [ root_inc ],
install: true,
- c_args: [
+ c_args: common_cflags + pango_debug_cflags + [
'-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
])
@@ -74,7 +74,7 @@ if cairo_dep.found()
dependencies: pango_list_deps,
include_directories: [ root_inc ],
install: true,
- c_args: [
+ c_args: common_cflags + pango_debug_cflags + [
'-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
])
@@ -94,7 +94,7 @@ if cairo_dep.found()
dependencies: pango_segmentation_deps,
include_directories: [ root_inc ],
install: true,
- c_args: [
+ c_args: common_cflags + pango_debug_cflags + [
'-DPACKAGE_NAME="@0@"'.format(meson.project_name()),
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
])
diff --git a/utils/pango-segmentation.c b/utils/pango-segmentation.c
index 31cefdbd..65734dc4 100644
--- a/utils/pango-segmentation.c
+++ b/utils/pango-segmentation.c
@@ -141,8 +141,8 @@ show_segmentation (const char *input,
int
main (int argc, char *argv[])
{
- char *opt_kind = "grapheme";
- char *opt_text = NULL;
+ const char *opt_kind = "grapheme";
+ const char *opt_text = NULL;
gboolean opt_version = FALSE;
GOptionEntry entries[] = {
{ "kind", 0, 0, G_OPTION_ARG_STRING, &opt_kind, "Kind of boundary (grapheme/word/line/sentence)", "KIND" },
@@ -176,7 +176,7 @@ main (int argc, char *argv[])
if (opt_text)
{
- text = opt_text;
+ text = (char *)opt_text;
}
else if (argc > 1)
{
diff --git a/utils/viewer-render.c b/utils/viewer-render.c
index 8816f06f..d5ca5e3e 100644
--- a/utils/viewer-render.c
+++ b/utils/viewer-render.c
@@ -709,6 +709,7 @@ parse_margin (const char *name G_GNUC_UNUSED,
{
switch (sscanf (arg, "%d%*[ ,]%d%*[ ,]%d%*[ ,]%d", &opt_margin_t, &opt_margin_r, &opt_margin_b, &opt_margin_l))
{
+ default:
case 0:
{
g_set_error(error,
@@ -718,7 +719,9 @@ parse_margin (const char *name G_GNUC_UNUSED,
return FALSE;
}
case 1: opt_margin_r = opt_margin_t;
+ G_GNUC_FALLTHROUGH;
case 2: opt_margin_b = opt_margin_t;
+ G_GNUC_FALLTHROUGH;
case 3: opt_margin_l = opt_margin_r;
}
return TRUE;
diff --git a/utils/viewer-x.c b/utils/viewer-x.c
index ad1c9a8d..02c688ea 100644
--- a/utils/viewer-x.c
+++ b/utils/viewer-x.c
@@ -213,6 +213,8 @@ x_view_display (gpointer instance,
case Expose:
expose (&xev.xexpose, &update_region);
break;
+ default:
+ break;
}
}
}