#ifdef USE_FONT_BACKEND
#include "font.h"
+void w32font_initialize P_ ((void));
#endif /* USE_FONT_BACKEND */
#define abs(x) ((x) < 0 ? -(x) : (x))
if (retval)
{
- pcm->width = sz.cx - font->tm.tmOverhang;
- pcm->rbearing = sz.cx;
+ pcm->width = sz.cx;
+ pcm->rbearing = sz.cx + font->tm.tmOverhang;
pcm->lbearing = 0;
pcm->ascent = FONT_BASE (font);
pcm->descent = FONT_DESCENT (font);
#ifdef USE_FONT_BACKEND
else if (enable_font_backend)
{
- unsigned *code = alloca (sizeof (unsigned) * s->nchars);
int boff = s->font_info->baseline_offset;
struct font *font = (struct font *) s->font_info;
int y;
- for (i = 0; i < s->nchars; i++)
- code[i] = (s->char2b[i].byte1 << 8) | s->char2b[i].byte2;
-
if (s->font_info->vertical_centering)
boff = VCENTER_BASELINE_OFFSET (s->font, s->f) - boff;
&& (s->font->bdf || !s->font->tm.tmUnderlined))
{
unsigned long h;
- unsigned long dy = 0;
+ int y;
/* Get the underline thickness. Default is 1 pixel. */
#ifdef USE_FONT_BACKEND
if (enable_font_backend)
else
#endif
{
- if (x_underline_at_descent_line)
- dy = s->height - h;
- else
+ y = s->y + s->height - h;
+ /* TODO: Use font information for positioning and
+ thickness of underline. See OUTLINETEXTMETRIC,
+ and xterm.c. Note: If you make this work,
+ don't forget to change the doc string of
+ x-use-underline_color-position-properties
+ below. */
+#if 0
+ if (!x_underline_at_descent_line)
{
- /* TODO: Use font information for positioning and
- thickness of underline. See OUTLINETEXTMETRIC,
- and xterm.c. Note: If you makedev this work,
- don't forget to change the doc string of
- x-use-underline_color-position-properties
- below. */
- dy = s->height - h;
+ ...
}
+#endif
}
if (s->face->underline_defaulted_p)
{
w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x,
- s->y + dy, s->background_width, 1);
+ y, s->background_width, 1);
}
else
{
w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x,
- s->y + dy, s->background_width, 1);
+ y, s->background_width, 1);
}
}
/* Draw overline. */
&& SystemParametersInfo (SPI_GETFONTSMOOTHINGTYPE, 0, &smoothing_type, 0)
&& smoothing_type == FE_FONTSMOOTHINGCLEARTYPE;
}
+
+#ifdef USE_FONT_BACKEND
+ w32font_initialize ();
+
+#endif
}
void