/* Special categories */
static MSymbol McatCc, McatCf;
+static MSymbol Mdepth;
+
\f
/* Glyph-string composer. */
g_physical_descent = gstring->physical_descent;
g_width = g_lbearing = g_rbearing = 0;
+ mfont__get_metric (gstring, from, to);
+
while (g < last_g)
{
MGlyph *base = g++;
int size = rfont->font.property[MFONT_SIZE];
int width, lbearing, rbearing;
- mfont__get_metric (rfont, base);
if (g == last_g || ! g->combining_code)
{
/* No combining. */
else if (end < g->to)
end = g->to;
- mfont__get_metric (rfont, g);
g->xoff = left + (width * base_x - g->width * add_x) / 2 + off_x;
if (g->xoff < left)
left = g->xoff;
static MGlyphString scratch_gstring;
static MGlyphString *
-alloc_gstring (MText *mt, int pos, MDrawControl *control, int line, int y)
+alloc_gstring (MFrame *frame, MText *mt, int pos, MDrawControl *control,
+ int line, int y)
{
MGlyphString *gstring;
(*control->format) (line, y, &(gstring->indent), &(gstring->width_limit));
else
gstring->width_limit = control->max_line_width;
+ gstring->anti_alias = control->anti_alias;
+ if (gstring->anti_alias
+ && (unsigned) mwin__device_get_prop (frame->device, Mdepth) < 8)
+ gstring->anti_alias = 0;
return gstring;
}
beg = pos;
end = to;
}
- gstring = alloc_gstring (mt, beg, control, line, y);
+ gstring = alloc_gstring (frame, mt, beg, control, line, y);
compose_glyph_string (frame, mt, beg, end, gstring);
layout_glyph_string (frame, gstring);
end = gstring->to;
while (gst->to < end)
{
line++, y += gst->height;
- gst->next = alloc_gstring (mt, gst->from, control, line, y);
+ gst->next = alloc_gstring (frame, mt, gst->from, control,
+ line, y);
gst->next->top = gstring;
compose_glyph_string (frame, mt, gst->to, end, gst->next);
gst = gst->next;
McatCc = msymbol ("Cc");
McatCf = msymbol ("Cf");
+ Mdepth = msymbol ("depth");
MbidiR = msymbol ("R");
MbidiAL = msymbol ("AL");