summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp')
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
index 74e0f97aa5b..1d173dfa8f1 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-src/src/DVIToSVGActions.cpp
@@ -2,7 +2,7 @@
** DVIToSVGActions.cpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2022 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2023 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 **
@@ -33,8 +33,7 @@ using namespace std;
void DVIToSVGActions::reset() {
- _usedChars.clear();
- _usedFonts.clear();
+ FontManager::instance().resetUsedChars();
_bbox = BoundingBox();
_currentFontNum = -1;
_bgcolor = Color::TRANSPARENT;
@@ -93,10 +92,7 @@ void DVIToSVGActions::setChar (double x, double y, unsigned c, bool vertical, co
// record font names and chars. The various font sizes can be ignored here.
// For a given font object, Font::uniqueFont() returns the same unique font object for
// all fonts with the same name.
- _usedChars[SVGTree::USE_FONTS ? font.uniqueFont() : &font].insert(c);
-
- // However, we record all required fonts
- _usedFonts.insert(&font);
+ FontManager::instance().addUsedChar(font, c);
_svg.appendChar(c, x, y);
static string fontname;
@@ -216,10 +212,10 @@ void DVIToSVGActions::special (const string &spc, double dvi2bp, bool preprocess
* @param[in] c array with 10 components representing \\count0 ... \\count9. c[0] contains the
* current (printed) page number (may differ from page count) */
void DVIToSVGActions::beginPage (unsigned pageno, const vector<int32_t>&) {
- SpecialManager::instance().notifyBeginPage(pageno, *this);
_svg.newPage(++_pageCount);
_bbox = BoundingBox(); // clear bounding box
_boxes.clear();
+ SpecialManager::instance().notifyBeginPage(pageno, *this);
}