From 059cab71c68a3fbee36f60e8208d4a47d11c6b60 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 26 Aug 2021 03:02:29 +0000 Subject: CTAN sync 202108260302 --- dviware/dvisvgm/src/DVIToSVG.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'dviware/dvisvgm/src/DVIToSVG.cpp') diff --git a/dviware/dvisvgm/src/DVIToSVG.cpp b/dviware/dvisvgm/src/DVIToSVG.cpp index df3d3e39e6..22c41415bf 100644 --- a/dviware/dvisvgm/src/DVIToSVG.cpp +++ b/dviware/dvisvgm/src/DVIToSVG.cpp @@ -2,7 +2,7 @@ ** DVIToSVG.cpp ** ** ** ** This file is part of dvisvgm -- a fast DVI to SVG converter ** -** Copyright (C) 2005-2020 Martin Gieseking ** +** Copyright (C) 2005-2021 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 ** @@ -74,13 +74,10 @@ bool DVIToSVG::COMPUTE_PROGRESS = false; DVIToSVG::HashSettings DVIToSVG::PAGE_HASH_SETTINGS; -DVIToSVG::DVIToSVG (istream &is, SVGOutputBase &out) : DVIReader(is), _out(out) +DVIToSVG::DVIToSVG (istream &is, SVGOutputBase &out) + : DVIReader(is), _out(out), _prevWritingMode(WritingMode::LR) { - _pageHeight = _pageWidth = 0; - _tx = _ty = 0; // no cursor translation - _pageByte = 0; _prevXPos = _prevYPos = numeric_limits::min(); - _prevWritingMode = WritingMode::LR; _actions = util::make_unique(*this, _svg); } @@ -362,7 +359,7 @@ void DVIToSVG::embedFonts (XMLElement *svgElement) { unordered_set tracedFonts; // collect unique fonts already traced for (const auto &fontchar : usedCharsMap) { const Font *font = fontchar.first; - if (auto ph_font = dynamic_cast(font)) { + if (auto ph_font = font_cast(font)) { // Check if glyphs should be traced. Only trace the glyphs of unique fonts, i.e. // avoid retracing the same glyphs again if they are referenced in various sizes. if (TRACE_MODE != 0 && tracedFonts.find(ph_font->uniqueFont()) == tracedFonts.end()) { @@ -481,7 +478,7 @@ void DVIToSVG::dviEop () { void DVIToSVG::dviSetChar0 (uint32_t c, const Font *font) { - if (_actions && !dynamic_cast(font)) + if (_actions && !font_cast(font)) _actions->setChar(dviState().h+_tx, dviState().v+_ty, c, dviState().d != WritingMode::LR, *font); } @@ -520,7 +517,7 @@ void DVIToSVG::dviPop () { void DVIToSVG::dviFontNum (uint32_t fontnum, SetFontMode, const Font *font) { - if (_actions && font && !dynamic_cast(font)) + if (_actions && font && !font_cast(font)) _actions->setFont(FontManager::instance().fontID(fontnum), *font); // all fonts get a recomputed ID } -- cgit v1.2.3