diff options
Diffstat (limited to 'Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/include/efont/ttfhead.hh')
-rw-r--r-- | Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/include/efont/ttfhead.hh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/include/efont/ttfhead.hh b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/include/efont/ttfhead.hh new file mode 100644 index 00000000000..2611a405b1b --- /dev/null +++ b/Build/source/texk/lcdf-typetools/lcdf-typetools-2.99/include/efont/ttfhead.hh @@ -0,0 +1,41 @@ +// -*- related-file-name: "../../libefont/ttfhead.cc" -*- +#ifndef EFONT_TTFHEAD_HH +#define EFONT_TTFHEAD_HH +#include <efont/otf.hh> +#include <efont/otfdata.hh> // for ntohl() +#include <lcdf/error.hh> +namespace Efont { namespace OpenType { + +class Head { public: + + Head(const String &, ErrorHandler * = 0); + // default destructor + + bool ok() const { return _error >= 0; } + int error() const { return _error; } + + unsigned units_per_em() const; + unsigned index_to_loc_format() const; + + private: + + Data _d; + int _error; + + int parse_header(ErrorHandler *); + +}; + + +inline unsigned Head::units_per_em() const +{ + return (_error >= 0 ? _d.u16(18) : 0); +} + +inline unsigned Head::index_to_loc_format() const +{ + return (_error >= 0 ? _d.u16(50) : 0); +} + +}} +#endif |