diff options
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 6865e923e..770616ae7 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -298,6 +298,12 @@ void font_factory::GetUIFamilies(std::vector<PangoFontFamily *>& out) std::cerr << "font_factory::GetUIFamilies: Missing displayName! " << std::endl; continue; } + if (!g_utf8_validate(displayName, -1, 0)) { + // TODO: can can do anything about this or does it always indicate broken fonts that should not be used? + std::cerr << "font_factory::GetUIFamilies: Illegal characters in displayName. "; + std::cerr << "Ignoring font '" << displayName << "'" << std::endl; + continue; + } sorted.push_back(std::make_pair(families[currentFamily], displayName)); } |
