sl@0: /* sl@0: * sl@0: * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved sl@0: * sl@0: */ sl@0: sl@0: #ifndef __VALUERECORDS_H sl@0: #define __VALUERECORDS_H sl@0: sl@0: /** sl@0: * \file sl@0: * \internal sl@0: */ sl@0: sl@0: #include "LETypes.h" sl@0: #include "LEFontInstance.h" sl@0: #include "OpenTypeTables.h" sl@0: #include "GlyphIterator.h" sl@0: sl@0: U_NAMESPACE_BEGIN sl@0: sl@0: typedef le_uint16 ValueFormat; sl@0: typedef le_int16 ValueRecordField; sl@0: sl@0: struct ValueRecord sl@0: { sl@0: le_int16 values[ANY_NUMBER]; sl@0: sl@0: le_int16 getFieldValue(ValueFormat valueFormat, ValueRecordField field) const; sl@0: le_int16 getFieldValue(le_int16 index, ValueFormat valueFormat, ValueRecordField field) const; sl@0: void adjustPosition(ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, sl@0: const LEFontInstance *fontInstance) const; sl@0: void adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphIterator &glyphIterator, sl@0: const LEFontInstance *fontInstance) const; sl@0: sl@0: static le_int16 getSize(ValueFormat valueFormat); sl@0: sl@0: private: sl@0: static le_int16 getFieldCount(ValueFormat valueFormat); sl@0: static le_int16 getFieldIndex(ValueFormat valueFormat, ValueRecordField field); sl@0: }; sl@0: sl@0: enum ValueRecordFields sl@0: { sl@0: vrfXPlacement = 0, sl@0: vrfYPlacement = 1, sl@0: vrfXAdvance = 2, sl@0: vrfYAdvance = 3, sl@0: vrfXPlaDevice = 4, sl@0: vrfYPlaDevice = 5, sl@0: vrfXAdvDevice = 6, sl@0: vrfYAdvDevice = 7 sl@0: }; sl@0: sl@0: enum ValueFormatBits sl@0: { sl@0: vfbXPlacement = 0x0001, sl@0: vfbYPlacement = 0x0002, sl@0: vfbXAdvance = 0x0004, sl@0: vfbYAdvance = 0x0008, sl@0: vfbXPlaDevice = 0x0010, sl@0: vfbYPlaDevice = 0x0020, sl@0: vfbXAdvDevice = 0x0040, sl@0: vfbYAdvDevice = 0x0080, sl@0: vfbReserved = 0xFF00, sl@0: vfbAnyDevice = vfbXPlaDevice + vfbYPlaDevice + vfbXAdvDevice + vfbYAdvDevice sl@0: }; sl@0: sl@0: U_NAMESPACE_END sl@0: #endif sl@0: sl@0: