diff options
Diffstat (limited to 'dviware/dvisvgm/src/Font.cpp')
-rw-r--r-- | dviware/dvisvgm/src/Font.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dviware/dvisvgm/src/Font.cpp b/dviware/dvisvgm/src/Font.cpp index 97520c5953..e40ad8a392 100644 --- a/dviware/dvisvgm/src/Font.cpp +++ b/dviware/dvisvgm/src/Font.cpp @@ -2,7 +2,7 @@ ** Font.cpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2019 Martin Gieseking <martin.gieseking@uos.de> ** +** Copyright (C) 2005-2020 Martin Gieseking <martin.gieseking@uos.de> ** ** ** ** This program is free software; you can redistribute it and/or ** ** modify it under the terms of the GNU General Public License as ** @@ -425,10 +425,10 @@ int PhysicalFont::traceAllGlyphs (bool includeCached, GFGlyphTracer::Callback *c * @param[out] bbox the computed bounding box * @param[in] cb optional calback object forwarded to the tracer * @return true if the box could be computed successfully */ -bool PhysicalFont::getExactGlyphBox(int c, BoundingBox& bbox, GFGlyphTracer::Callback* cb) const { +bool PhysicalFont::getExactGlyphBox (int c, BoundingBox& bbox, GFGlyphTracer::Callback* cb) const { Glyph glyph; if (getGlyph(c, glyph, cb)) { - glyph.computeBBox(bbox); + bbox = glyph.computeBBox(); double s = scaledSize()/unitsPerEm(); bbox.scale(s, s); return true; @@ -608,7 +608,7 @@ double NativeFont::charWidth (int c) const { FontEngine::instance().setFont(*this); int upem = FontEngine::instance().getUnitsPerEM(); double w = upem ? (scaledSize()*FontEngine::instance().getAdvance(c)/upem*_style.extend) : 0; - w += fabs(_style.slant*charHeight(c)); + w += abs(_style.slant*charHeight(c)); return w; } |