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/DVIReader.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'dviware/dvisvgm/src/DVIReader.cpp') diff --git a/dviware/dvisvgm/src/DVIReader.cpp b/dviware/dvisvgm/src/DVIReader.cpp index 893e6a818b..c524ff60db 100644 --- a/dviware/dvisvgm/src/DVIReader.cpp +++ b/dviware/dvisvgm/src/DVIReader.cpp @@ -2,7 +2,7 @@ ** DVIReader.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 ** @@ -26,7 +26,6 @@ #include "Font.hpp" #include "FontManager.hpp" #include "HashFunction.hpp" -#include "JFM.hpp" #include "utility.hpp" #include "VectorStream.hpp" @@ -203,11 +202,11 @@ void DVIReader::cmdPop (int) { * @param[in] font current font (corresponding to _currFontNum) * @param[in] c character to typeset */ void DVIReader::putVFChar (Font *font, uint32_t c) { - if (auto vf = dynamic_cast(font)) { // is current font a virtual font? + if (auto vf = font_cast(font)) { // is current font a virtual font? FontManager &fm = FontManager::instance(); const vector *dvi = vf->getDVI(c); // try to get DVI snippet that represents character c Font *firstFont = fm.vfFirstFont(vf); - if (!dvi && (!firstFont || !dynamic_cast(firstFont->getMetrics()))) + if (!dvi && (!firstFont || !firstFont->getMetrics()->isJFM())) return; fm.enterVF(vf); // enter VF font number context int savedFontNum = _currFontNum; // save current font number @@ -485,7 +484,7 @@ const Font* DVIReader::defineFont (uint32_t fontnum, const string &name, uint32_ else { // TFM-based font specified by name int id = fm.registerFont(fontnum, name, cs, dsize, ssize); font = fm.getFontById(id); - if (auto vf = dynamic_cast(font)) { + if (auto vf = font_cast(font)) { // read vf file, register its font and character definitions fm.enterVF(vf); ifstream ifs(vf->path(), ios::binary); @@ -592,7 +591,7 @@ void DVIReader::cmdXFontDef (int) { FontManager::instance().registerFont(fontnum, fontname, fontIndex, ptsize, style, color); font = FontManager::instance().getFont(fontnum); } - dviXFontDef(fontnum, dynamic_cast(font)); + dviXFontDef(fontnum, font_cast(font)); } -- cgit v1.2.3