[graphics/krita] /: Update to Raqm 0.10.0
Merge Service
null at kde.org
Fri Feb 17 11:31:38 GMT 2023
Git commit f5595e09a3b90815ac6c9b7ce6b75b09bb9ea690 by Merge Service, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 17/02/2023 at 11:31.
Pushed by merge-service into branch 'master'.
Update to Raqm 0.10.0
Raqm 0.10.0 contains all our upstreamed patches so that makes things easier.
CCMAIL:kimageshop at kde.org
BUG:465773
Part-of: <https://invent.kde.org/graphics/krita/-/merge_requests/1740>
M +2 -4 3rdparty/ext_raqm/CMakeLists.txt
D +0 -35 3rdparty/ext_raqm/fix_utf_16.patch
M +1 -1 CMakeLists.txt
M +0 -2 libs/flake/text/KoSvgTextShape.cpp
https://invent.kde.org/graphics/krita/commit/f5595e09a3b90815ac6c9b7ce6b75b09bb9ea690
diff --git a/3rdparty/ext_raqm/CMakeLists.txt b/3rdparty/ext_raqm/CMakeLists.txt
index fd6169834a..a0fd3187f6 100644
--- a/3rdparty/ext_raqm/CMakeLists.txt
+++ b/3rdparty/ext_raqm/CMakeLists.txt
@@ -3,10 +3,8 @@ SET(EXTPREFIX_raqm "${EXTPREFIX}" )
ExternalProject_Add(
ext_raqm
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
- URL https://github.com/therahedwig/libraqm/archive/793d7a5e89f3a2bdda8d9236d24294e48dc2e354.zip
- URL_HASH SHA256=576e63009a26d613aab8dd3bd216be43a49979d26aa99cb186a0008a9f3af252
-
- PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/fix_utf_16.patch
+ URL https://github.com/HOST-Oman/libraqm/releases/download/v0.10.0/raqm-0.10.0.tar.xz
+ URL_HASH SHA256=5eb7de71b3d1dca34103860f3e8c55ebc184a3dbdfdd573c21a258e46982f1e6
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env
PYTHONPATH=${_krita_pythonpath}
diff --git a/3rdparty/ext_raqm/fix_utf_16.patch b/3rdparty/ext_raqm/fix_utf_16.patch
deleted file mode 100644
index 292bd869db..0000000000
--- a/3rdparty/ext_raqm/fix_utf_16.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/src/raqm.c b/src/raqm.c
-index 2e7ac71..7bf3ef9 100644
---- a/src/raqm.c
-+++ b/src/raqm.c
-@@ -1305,7 +1305,9 @@ raqm_layout (raqm_t *rq)
- static uint32_t
- _raqm_u32_to_u8_index (raqm_t *rq,
- uint32_t index);
--
-+static uint32_t
-+_raqm_u32_to_u16_index (raqm_t *rq,
-+ uint32_t index);
- /**
- * raqm_get_glyphs:
- * @rq: a #raqm_t.
-@@ -1403,6 +1405,10 @@ raqm_get_glyphs (raqm_t *rq,
- RAQM_TEST (" %02d", rq->glyphs[i].cluster);
- RAQM_TEST ("\n");
- #endif
-+ } else if (rq->text_utf16) {
-+ for (size_t i = 0; i < count; i++)
-+ rq->glyphs[i].cluster = _raqm_u32_to_u16_index (rq,
-+ rq->glyphs[i].cluster);
- }
- return rq->glyphs;
- }
-@@ -2301,7 +2307,7 @@ _raqm_u8_to_u32_index (raqm_t *rq,
- static size_t
- _raqm_count_codepoint_utf16_short (uint32_t chr)
- {
-- if (chr > 0x010000)
-+ if (chr > 0x00010000)
- return 2;
- else
- return 1;
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6eab354652..95447f5059 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1134,7 +1134,7 @@ endif()
##
## Check for raqm
##
-find_package(Raqm 0.9.0 REQUIRED)
+find_package(Raqm 0.10.0 REQUIRED)
set_package_properties(Raqm PROPERTIES
DESCRIPTION "Raqm is a small library that encapsulates the logic for complex text layout and provides a convenient API."
URL "https://github.com/HOST-Oman/libraqm"
diff --git a/libs/flake/text/KoSvgTextShape.cpp b/libs/flake/text/KoSvgTextShape.cpp
index 4bfd2d700d..73c7f2f4ce 100644
--- a/libs/flake/text/KoSvgTextShape.cpp
+++ b/libs/flake/text/KoSvgTextShape.cpp
@@ -558,7 +558,6 @@ void KoSvgTextShape::relayout() const
if (!letterSpacing.isAuto) {
raqm_set_letter_spacing_range(layout.data(),
static_cast<int>(letterSpacing.customValue * ftFontUnit * scaleToPixel),
- false,
static_cast<size_t>(start),
static_cast<size_t>(length));
}
@@ -566,7 +565,6 @@ void KoSvgTextShape::relayout() const
if (!wordSpacing.isAuto) {
raqm_set_word_spacing_range(layout.data(),
static_cast<int>(wordSpacing.customValue * ftFontUnit * scaleToPixel),
- false,
static_cast<size_t>(start),
static_cast<size_t>(length));
}
More information about the kimageshop
mailing list