From d50a41b6ab3d05fe5605a3a3b50ff68f61059296 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 16 Mar 2020 03:01:06 +0000 Subject: CTAN sync 202003160301 --- dviware/dvisvgm/src/Font.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dviware/dvisvgm/src/Font.cpp') 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 ** +** Copyright (C) 2005-2020 Martin Gieseking ** ** ** ** 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; } -- cgit v1.2.3