diff options
author | Norbert Preining <norbert@preining.info> | 2020-03-16 03:01:06 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-03-16 03:01:06 +0000 |
commit | d50a41b6ab3d05fe5605a3a3b50ff68f61059296 (patch) | |
tree | 29468e087e9c19acf30b392dc705a54288d79137 /dviware/dvisvgm/src/Font.cpp | |
parent | 87cddce361c3b477029d13b27bdaa57190b2d74b (diff) |
CTAN sync 202003160301
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; } |