mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-03 00:49:01 +08:00
Merge pull request #3438 from amitdo/pango
Raise Minimum required Pango version to 1.38.0
This commit is contained in:
commit
a72408fdef
@ -529,9 +529,9 @@ if !($have_icu_uc && $have_icu_i18n); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check location of pango headers
|
# Check location of pango headers
|
||||||
PKG_CHECK_MODULES([pango], [pango >= 1.22.0], [have_pango=true], [have_pango=false])
|
PKG_CHECK_MODULES([pango], [pango >= 1.38.0], [have_pango=true], [have_pango=false])
|
||||||
if !($have_pango); then
|
if !($have_pango); then
|
||||||
AC_MSG_WARN([pango 1.22.0 or higher is required, but was not found.])
|
AC_MSG_WARN([pango 1.38.0 or higher is required, but was not found.])
|
||||||
AC_MSG_WARN([Training tools WILL NOT be built.])
|
AC_MSG_WARN([Training tools WILL NOT be built.])
|
||||||
AC_MSG_WARN([Try to install libpango1.0-dev package.])
|
AC_MSG_WARN([Try to install libpango1.0-dev package.])
|
||||||
AM_CONDITIONAL([ENABLE_TRAINING], false)
|
AM_CONDITIONAL([ENABLE_TRAINING], false)
|
||||||
|
@ -286,7 +286,7 @@ endif()
|
|||||||
if (PKG_CONFIG_FOUND OR SW_BUILD)
|
if (PKG_CONFIG_FOUND OR SW_BUILD)
|
||||||
|
|
||||||
if (PKG_CONFIG_FOUND)
|
if (PKG_CONFIG_FOUND)
|
||||||
pkg_check_modules(Pango REQUIRED pango>=1.22.0)
|
pkg_check_modules(Pango REQUIRED pango>=1.38.0)
|
||||||
pkg_check_modules(Cairo REQUIRED cairo)
|
pkg_check_modules(Cairo REQUIRED cairo)
|
||||||
pkg_check_modules(PangoFt2 REQUIRED pangoft2)
|
pkg_check_modules(PangoFt2 REQUIRED pangoft2)
|
||||||
pkg_check_modules(PangoCairo REQUIRED pangocairo)
|
pkg_check_modules(PangoCairo REQUIRED pangocairo)
|
||||||
|
@ -198,13 +198,13 @@ void StringRenderer::SetLayoutProperties() {
|
|||||||
spacing_attr->end_index = static_cast<guint>(-1);
|
spacing_attr->end_index = static_cast<guint>(-1);
|
||||||
pango_attr_list_change(attr_list, spacing_attr);
|
pango_attr_list_change(attr_list, spacing_attr);
|
||||||
}
|
}
|
||||||
#if (PANGO_VERSION_MAJOR == 1 && PANGO_VERSION_MINOR >= 38)
|
|
||||||
if (add_ligatures_) {
|
if (add_ligatures_) {
|
||||||
set_features("liga, clig, dlig, hlig");
|
set_features("liga, clig, dlig, hlig");
|
||||||
PangoAttribute *feature_attr = pango_attr_font_features_new(features_.c_str());
|
PangoAttribute *feature_attr = pango_attr_font_features_new(features_.c_str());
|
||||||
pango_attr_list_change(attr_list, feature_attr);
|
pango_attr_list_change(attr_list, feature_attr);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
pango_layout_set_attributes(layout_, attr_list);
|
pango_layout_set_attributes(layout_, attr_list);
|
||||||
pango_attr_list_unref(attr_list);
|
pango_attr_list_unref(attr_list);
|
||||||
// Adjust line spacing
|
// Adjust line spacing
|
||||||
|
Loading…
Reference in New Issue
Block a user