1 // Copyright (C) 2000-2007, Luca Padovani <padovani@sti.uniurb.it>. 2 // 3 // This file is part of GtkMathView, a flexible, high-quality rendering 4 // engine for MathML documents. 5 // 6 // GtkMathView is free software; you can redistribute it and/or modify it 7 // under the terms of the GNU Lesser General Public License as published 8 // by the Free Software Foundation; either version 3 of the License, or 9 // (at your option) any later version. 10 // 11 // GtkMathView is distributed in the hope that it will be useful, but 12 // WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 // Lesser General Public License for more details. 15 // 16 // You should have received a copy of the GNU Lesser General Public License 17 // along with this program. If not, see <http://www.gnu.org/licenses/>. 18 19 #ifndef __TFMFont_hh__ 20 #define __TFMFont_hh__ 21 22 #include "Char.hh" 23 #include "T1Font.hh" 24 #include "SmartPtr.hh" 25 #include "BoundingBox.hh" 26 27 class GMV_MathView_EXPORT TFMFont : public T1Font 28 { 29 protected: 30 TFMFont(const SmartPtr<class TFM>&, const scaled&); 31 virtual ~TFMFont(); 32 33 public: 34 static SmartPtr<TFMFont> create(const SmartPtr<class TFM>&, const scaled&); 35 36 SmartPtr<class TFM> getTFM(void) const; 37 38 virtual scaled getGlyphLeftEdge(Char8) const; 39 virtual scaled getGlyphRightEdge(Char8) const; 40 virtual BoundingBox getGlyphBoundingBox(Char8) const; 41 42 private: 43 SmartPtr<class TFM> tfm; 44 }; 45 46 #endif // __TFMFont_hh__ 47