summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/TFM.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'dviware/dvisvgm/src/TFM.hpp')
-rw-r--r--dviware/dvisvgm/src/TFM.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/dviware/dvisvgm/src/TFM.hpp b/dviware/dvisvgm/src/TFM.hpp
index 5e968ff201..dd3fa32401 100644
--- a/dviware/dvisvgm/src/TFM.hpp
+++ b/dviware/dvisvgm/src/TFM.hpp
@@ -32,7 +32,8 @@ class StreamReader;
class TFM : public FontMetrics {
public:
- explicit TFM (std::istream &is);
+ TFM () =default;
+ void read (std::istream &is) override;
double getCharWidth (int c) const override;
double getCharHeight (int c) const override;
double getCharDepth (int c) const override;
@@ -46,15 +47,14 @@ class TFM : public FontMetrics {
double getDescent () const override {return double(_descent)*_designSize;}
bool verticalLayout () const override {return false;}
uint32_t getChecksum () const override {return _checksum;}
- uint16_t firstChar () const override {return _firstChar;}
- uint16_t lastChar () const override {return _lastChar;}
+ uint32_t firstChar () const override {return _firstChar;}
+ uint32_t lastChar () const override {return _lastChar;}
protected:
- TFM () : _params(7) {}
void readHeader (StreamReader &reader);
void readTables (StreamReader &reader, int nw, int nh, int nd, int ni);
void readParameters (StreamReader &reader, int np);
- virtual int charIndex (int c) const;
+ virtual size_t charIndex (int c) const;
void setCharRange (int firstchar, int lastchar) {_firstChar=firstchar; _lastChar=lastchar;}
private:
@@ -67,7 +67,7 @@ class TFM : public FontMetrics {
std::vector<FixWord> _depthTable; ///< character depth in design size units
std::vector<FixWord> _italicTable; ///< italic corrections in design size units
std::vector<FixWord> _params; ///< values of the TFM's param section
- FixWord _ascent, _descent; ///< max. height and depth
+ FixWord _ascent=0, _descent=0; ///< max. height and depth
};
#endif