summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-06-06 08:13:53 +0000
committertavmjong-free <tavmjong@free.fr>2017-06-06 08:13:53 +0000
commit281f5ae5654f8b762f566a177df6e56211f3efe5 (patch)
treedf2d8f7737fbb264daaf999dac91125881bd8bbe /src/libnrtype
parentAdd contextual buttons to Hide/lock and Unhide/unlock items (diff)
downloadinkscape-281f5ae5654f8b762f566a177df6e56211f3efe5.tar.gz
inkscape-281f5ae5654f8b762f566a177df6e56211f3efe5.zip
Fix build with versions of Harfbuzz prior to 1.2.3. (Visualization of alternative glyphs requires 1.2.3.)
(bzr r15703.1.30)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index 8d66904e0..6c0999f2d 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -747,6 +747,7 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail)
}
}
+#if HB_VERSION_ATLEAST(1,2,3)
// Find glyphs in OpenType substitution tables ('gsub').
// Note that pango's functions are just dummies. Must use harfbuzz.
@@ -825,6 +826,11 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail)
// for (auto table: res->openTypeSubstitutions) {
// std::cout << table.first << ": " << table.second << std::endl;
// }
+#else
+ std::cerr << "Requires Harfbuzz 1.2.3 for visualizing alternative glyph OpenType tables. "
+ << "Compiled with: " << HB_VERSION_STRING << "." << std::endl;
+#endif
+
hb_face_destroy (face);
g_free(scripts_hb);
} else {