diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-20 09:30:04 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-06-20 09:30:04 +0000 |
commit | ff2b3637ce66eb629ed6b5df7a6d10e319d94082 (patch) | |
tree | a8a32a1318c1fb5d4b2155a233013e549f36b5ef /Build/source/texk/dvisvgm/dvisvgm-1.7/src/MapLine.h | |
parent | 698e2e5430155bce1cadc1d8252978f770a5d2e7 (diff) |
dvisvgm 1.7
git-svn-id: svn://tug.org/texlive/trunk@34333 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvisvgm/dvisvgm-1.7/src/MapLine.h')
-rw-r--r-- | Build/source/texk/dvisvgm/dvisvgm-1.7/src/MapLine.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Build/source/texk/dvisvgm/dvisvgm-1.7/src/MapLine.h b/Build/source/texk/dvisvgm/dvisvgm-1.7/src/MapLine.h new file mode 100644 index 00000000000..2c1a53518fa --- /dev/null +++ b/Build/source/texk/dvisvgm/dvisvgm-1.7/src/MapLine.h @@ -0,0 +1,72 @@ +/************************************************************************* +** MapLine.h ** +** ** +** This file is part of dvisvgm -- the DVI to SVG converter ** +** Copyright (C) 2005-2014 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 ** +** published by the Free Software Foundation; either version 3 of ** +** the License, or (at your option) any later version. ** +** ** +** This program is distributed in the hope that it will be useful, but ** +** WITHOUT ANY WARRANTY; without even the implied warranty of ** +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** +** GNU General Public License for more details. ** +** ** +** You should have received a copy of the GNU General Public License ** +** along with this program; if not, see <http://www.gnu.org/licenses/>. ** +*************************************************************************/ + +#ifndef DVISVGM_MAPLINE_H +#define DVISVGM_MAPLINE_H + +#include <istream> +#include <string> +#include "MessageException.h" + + +class InputReader; +class SubfontDefinition; + + +struct MapLineException : MessageException +{ + MapLineException (const std::string &msg) : MessageException(msg) {} +}; + + +class MapLine +{ + public: + MapLine (std::istream &is); + const std::string& texname () const {return _texname;} + const std::string& psname () const {return _psname;} + const std::string& fontfname () const {return _fontfname;} + const std::string& encname () const {return _encname;} + int fontindex () const {return _fontindex;} + double bold () const {return _bold;} + double slant () const {return _slant;} + double extend () const {return _extend;} + SubfontDefinition* sfd () const {return _sfd;} + + protected: + void init (); + bool isDVIPSFormat (const char *line) const; + void parse (const char *line); + void parseDVIPSLine (InputReader &ir); + void parseDVIPDFMLine (InputReader &ir); + void parseFilenameOptions (std::string opt); + + private: + std::string _texname; ///< TeX font name + std::string _psname; ///< PS font name + std::string _fontfname; ///< name of fontfile + std::string _encname; ///< name of encoding (without file suffix ".enc") + SubfontDefinition *_sfd; ///< subfont definition to be used + int _fontindex; ///< font index of file with multiple fonts (e.g. ttc files) + double _slant, _bold, _extend; +}; + + +#endif |