// XFontSize.h Version 1.0 // // Author: Hans Dietrich // hdietrich@gmail.com // // License: // This software is released into the public domain. You are free to use // it in any way you like, except that you may not sell this source code. // // This software is provided "as is" with no expressed or implied warranty. // I accept no liability for any damage or loss of business that this // software may cause. // /////////////////////////////////////////////////////////////////////////////// #ifndef XFONTSIZE_H #define XFONTSIZE_H //============================================================================= class CXFontSize //============================================================================= { // Construction public: CXFontSize(); virtual ~CXFontSize(); void Init(); // Operations public: int GetFontPointSize(int nHeight); int GetFontHeight(int nPointSize); // Implementation private: static int m_cyPixelsPerInch; }; //============================================================================= // CXFontSize instance // #ifndef XFONTSIZE_CPP // include an instance in each file; the namespace insures uniqueness namespace { CXFontSize FontSize; } #endif #endif //XFONTSIZE_H