summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/FontWriter.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-16 03:01:06 +0000
committerNorbert Preining <norbert@preining.info>2020-03-16 03:01:06 +0000
commitd50a41b6ab3d05fe5605a3a3b50ff68f61059296 (patch)
tree29468e087e9c19acf30b392dc705a54288d79137 /dviware/dvisvgm/src/FontWriter.cpp
parent87cddce361c3b477029d13b27bdaa57190b2d74b (diff)
CTAN sync 202003160301
Diffstat (limited to 'dviware/dvisvgm/src/FontWriter.cpp')
-rw-r--r--dviware/dvisvgm/src/FontWriter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/dviware/dvisvgm/src/FontWriter.cpp b/dviware/dvisvgm/src/FontWriter.cpp
index d93402baf5..4dd4c5c0d8 100644
--- a/dviware/dvisvgm/src/FontWriter.cpp
+++ b/dviware/dvisvgm/src/FontWriter.cpp
@@ -2,7 +2,7 @@
** FontWriter.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 **
@@ -145,7 +145,7 @@ static void writeSFD (const string &sfdname, const PhysicalFont &font, const set
// ensure that the sum of the SFD's Ascent and Descent values equals the font's units per EM
double yext = font.ascent()+font.descent();
- double scale = double(font.unitsPerEm())/(yext != 0 ? yext : fabs(font.ascent()));
+ double scale = double(font.unitsPerEm())/(yext != 0 ? yext : abs(font.ascent()));
sfd <<
"Ascent: " << font.ascent()*scale << "\n"
"Descent: " << font.descent()*scale << "\n"
@@ -260,7 +260,7 @@ bool FontWriter::writeCSSFontFace (FontFormat format, const set<int> &charcodes,
os << "@font-face{"
<< "font-family:" << _font.name() << ';'
<< "src:url(data:" << info->mimetype << ";base64,";
- util::base64_copy(istreambuf_iterator<char>(ifs), istreambuf_iterator<char>(), ostreambuf_iterator<char>(os));
+ util::base64_copy(ifs, os);
os << ") format('" << info->formatstr_long << "');}\n";
ifs.close();
if (!PhysicalFont::KEEP_TEMP_FILES)