From 840a38b13e01c5782d88cef336fe10352cf0c212 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 6 Jun 2017 10:13:53 +0200 Subject: Fix build with versions of Harfbuzz prior to 1.2.3. (Visualization of alternative glyphs requires 1.2.3.) (bzr r15733) --- src/libnrtype/FontFactory.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libnrtype') 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 { -- cgit v1.2.3