Skip to content

Commit

Permalink
removed redundant parameter from embedFonts()
Browse files Browse the repository at this point in the history
  • Loading branch information
mgieseki committed Jan 7, 2025
1 parent 0af833a commit ebf320a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/DVIToSVG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void DVIToSVG::convert (unsigned first, unsigned last, HashFunction *hashFunc) {
else {
executePage(i);
SVGOptimizer(_svg).execute();
embedFonts(_svg.rootNode());
embedFonts();
bool success = _svg.write(_out.getPageStream(currentPageNumber(), numberOfPages(), hashTriple));
_out.finish();
string fname = path.shorterAbsoluteOrRelative();
Expand Down Expand Up @@ -346,10 +346,9 @@ static void collect_chars (unordered_map<const Font*, set<int>> &fontmap) {
}


/** Adds the font information to the SVG tree.
* @param[in] svgElement the font nodes are added to this node */
void DVIToSVG::embedFonts (XMLElement *svgElement) {
if (!svgElement || !_actions) // no dvi actions => no chars written => no fonts to embed
/** Adds the font information to the SVG tree. */
void DVIToSVG::embedFonts () {
if (!_actions) // no dvi actions => no chars written => no fonts to embed
return;

auto &usedCharsMap = FontManager::instance().getUsedChars();
Expand Down
2 changes: 1 addition & 1 deletion src/DVIToSVG.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class DVIToSVG : public DVIReader {
int executeCommand () override;
void enterBeginPage (unsigned pageno, const std::vector<int32_t> &c);
void leaveEndPage (unsigned pageno);
void embedFonts (XMLElement *svgElement);
void embedFonts ();
void moveRight (double dx, MoveMode mode) override;
void moveDown (double dy, MoveMode mode) override;

Expand Down

0 comments on commit ebf320a

Please sign in to comment.