Skip to content

Commit

Permalink
Remove obsolete code
Browse files Browse the repository at this point in the history
Pango versions older than 1.22.0 are not supported.
  • Loading branch information
amitdo committed Apr 17, 2018
1 parent 808a10f commit 88a1364
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions training/pango_font_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,16 +478,6 @@ std::vector<std::string> FontUtils::available_fonts_; // cache list
bool FontUtils::IsAvailableFont(const char* input_query_desc,
std::string* best_match) {
std::string query_desc(input_query_desc);
#if (PANGO_VERSION <= 12005)
// Strip commas and any ' Medium' substring in the name.
query_desc.erase(std::remove(query_desc.begin(), query_desc.end(), ','),
query_desc.end());
const std::string kMediumStr = " Medium";
std::size_t found = query_desc.find(kMediumStr);
if (found != std::string::npos) {
query_desc.erase(found, kMediumStr.length());
}
#endif
PangoFontDescription *desc = pango_font_description_from_string(
query_desc.c_str());
PangoFont* selected_font = nullptr;
Expand Down

0 comments on commit 88a1364

Please sign in to comment.