/* internal-gui.h -- common header file for the internal GUI API.
- Copyright (C) 2003, 2004
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
You should have received a copy of the GNU Lesser General Public
License along with the m17n library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
02111-1307, USA. */
#ifndef _M_INTERNAL_GUI_H
character of the default face. */
int space_width;
+ int average_width;
+
/** The default ascent and descent of a line. It is ascent and
descent of ASCII font of the default face. */
int ascent, descent;
/** Logical OR of enum MDeviceType. */
int device_type;
+ /** Resolution (dots per inch) of the device. */
+ int dpi;
+
/** Correction of functions to manipulate the device. */
MDeviceDriver *driver;
typedef struct
{
- int pos, to;
- int c;
- unsigned code;
+ MFLTGlyph g;
MRealizedFace *rface;
- short width, ascent, descent, lbearing, rbearing;
- short xoff, yoff;
- unsigned enabled : 1;
unsigned left_padding : 1;
unsigned right_padding : 1;
- unsigned otf_encoded : 1;
+ unsigned enabled : 1;
unsigned bidi_level : 6;
- enum glyph_category category : 2;
- enum glyph_type type : 3;
- int combining_code;
+ unsigned category : 2;
+ unsigned type : 3;
} MGlyph;
struct MGlyphString
(gstring)->used -= newlen; \
} while (0)
-#define MAKE_COMBINING_CODE(base_y, base_x, add_y, add_x, off_y, off_x) \
- (((off_y) << 16) \
- | ((off_x) << 8) \
- | ((base_x) << 6) \
- | ((base_y) << 4) \
- | ((add_x) << 2) \
- | (add_y))
-
-#define COMBINING_CODE_OFF_Y(code) (((code) >> 16) & 0xFF)
-#define COMBINING_CODE_OFF_X(code) (((code) >> 8) & 0xFF)
-#define COMBINING_CODE_BASE_X(code) (((code) >> 6) & 0x3)
-#define COMBINING_CODE_BASE_Y(code) (((code) >> 4) & 0x3)
-#define COMBINING_CODE_ADD_X(code) (((code) >> 2) & 0x3)
-#define COMBINING_CODE_ADD_Y(code) ((code) & 0x3)
-
-#define MAKE_COMBINING_CODE_BY_CLASS(class) (0x1000000 | class)
-
-#define COMBINING_BY_CLASS_P(code) ((code) & 0x1000000)
-
-#define COMBINING_CODE_CLASS(code) ((code) & 0xFFFFFF)
-
-#define MAKE_PRECOMPUTED_COMBINDING_CODE() (0x2000000)
-
-#define COMBINING_PRECOMPUTED_P(code) ((code) & 0x2000000)
-
typedef struct MGlyphString MGlyphString;
-typedef struct MFontDriver MFontDriver;
-
typedef struct
{
short x, y;