summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/Font.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-08 03:01:46 +0000
committerNorbert Preining <norbert@preining.info>2023-07-08 03:01:46 +0000
commiteeed32591ed8e985fd458c43d976027ad679d682 (patch)
tree1a5db64fc7b9df26f2887acbde587aed73315604 /dviware/dvisvgm/src/Font.cpp
parent2178d699db60492a15e11c107f17da33543af865 (diff)
CTAN sync 202307080301
Diffstat (limited to 'dviware/dvisvgm/src/Font.cpp')
-rw-r--r--dviware/dvisvgm/src/Font.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/dviware/dvisvgm/src/Font.cpp b/dviware/dvisvgm/src/Font.cpp
index c60b162828..4645d33073 100644
--- a/dviware/dvisvgm/src/Font.cpp
+++ b/dviware/dvisvgm/src/Font.cpp
@@ -112,13 +112,14 @@ const FontMetrics* TFMFont::getMetrics () const {
try {
_metrics = FontMetrics::read(_fontname);
if (!_metrics) {
- _metrics = util::make_unique<NullFontMetric>();
+ _metrics = util::make_unique<NullFontMetrics>();
Message::wstream(true) << "can't find "+_fontname+".tfm\n";
}
}
catch (FontMetricException &e) {
- _metrics = util::make_unique<NullFontMetric>();
- Message::wstream(true) << e.what() << " in " << _fontname << ".tfm\n";
+ const char *ext = (_metrics && _metrics->isOFM()) ? ".ofm" : ".tfm";
+ _metrics = util::make_unique<NullFontMetrics>();
+ Message::wstream(true) << e.what() << " in " << _fontname << ext << "\n";
}
}
return _metrics.get();