X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Finternal-gui.h;h=398e5f3f7f0ec7fe359eeed18fae2ef3eaf6f17f;hb=d60f8953f7addee2a4d8fa9f1be503db4276dfb0;hp=3b5fdc6fb530908d903d5bb581160f6b299c3141;hpb=eb9f03f4523b5ea23e2ca7a8160e349a0607a19e;p=m17n%2Fm17n-lib.git diff --git a/src/internal-gui.h b/src/internal-gui.h index 3b5fdc6..398e5f3 100644 --- a/src/internal-gui.h +++ b/src/internal-gui.h @@ -17,7 +17,7 @@ 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 @@ -54,6 +54,8 @@ struct MFrame 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; @@ -72,6 +74,9 @@ struct MFrame /** 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; @@ -110,32 +115,28 @@ enum glyph_type GLYPH_TYPE_MAX }; -typedef struct -{ - MSymbol script; - MSymbol langsys; - MSymbol gsub_features; - MSymbol gpos_features; -} FontLayoutCmdOTF; +enum glyph_category + { + GLYPH_CATEGORY_NORMAL, + GLYPH_CATEGORY_MODIFIER, + GLYPH_CATEGORY_FORMATTER + }; typedef struct { int pos, to; int c; unsigned code; - MSymbol category; MRealizedFace *rface; short width, ascent, descent, lbearing, rbearing; short xoff, yoff; -#ifdef HAVE_OTF - FontLayoutCmdOTF *otf_cmd; -#endif unsigned enabled : 1; unsigned left_padding : 1; unsigned right_padding : 1; unsigned otf_encoded : 1; unsigned bidi_level : 6; - enum glyph_type type : 3; + unsigned category : 2; + unsigned type : 3; int combining_code; } MGlyph; @@ -148,24 +149,18 @@ struct MGlyphString int size, inc, used; MGlyph *glyphs; - MText *mt; int from, to; short width, height, ascent, descent; short physical_ascent, physical_descent, lbearing, rbearing; short text_ascent, text_descent, line_ascent, line_descent; int indent, width_limit; - /* Members to keep temporary data while layouting. */ - short sub_width, sub_lbearing, sub_rbearing; - /* Copied for .anti_alias but never set if the frame's depth is less than 8. */ unsigned anti_alias : 1; MDrawControl control; - MDrawRegion region; - struct MGlyphString *next, *top; }; @@ -227,9 +222,11 @@ struct MGlyphString #define COMBINING_CODE_CLASS(code) ((code) & 0xFFFFFF) -typedef struct MGlyphString MGlyphString; +#define MAKE_PRECOMPUTED_COMBINDING_CODE() (0x2000000) -typedef struct MFontDriver MFontDriver; +#define COMBINING_PRECOMPUTED_P(code) ((code) & 0x2000000) + +typedef struct MGlyphString MGlyphString; typedef struct { @@ -281,9 +278,9 @@ struct MDeviceDriver MSymbol (*parse_event) (MFrame *frame, void *arg, int *modifiers); }; -extern MSymbol Mx; +extern MSymbol Mlatin; + extern MSymbol Mgd; -extern MSymbol Mfreetype; extern int mfont__init (); extern void mfont__fini ();