/* Font backend for the Microsoft Windows API.
- Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <config.h>
#include <windows.h>
+#include <stdio.h>
#include <math.h>
#include <ctype.h>
#include <commdlg.h>
-#include <setjmp.h>
#include "lisp.h"
#include "w32term.h"
s_pfn_Get_Outline_Text_MetricsW = (GetOutlineTextMetricsW_Proc)
GetProcAddress (hm_unicows, "GetOutlineTextMetricsW");
}
- if (s_pfn_Get_Outline_Text_MetricsW == NULL)
- abort (); /* cannot happen */
+ eassert (s_pfn_Get_Outline_Text_MetricsW != NULL);
return s_pfn_Get_Outline_Text_MetricsW (hdc, cbData, lpotmw);
}
s_pfn_Get_Text_MetricsW = (GetTextMetricsW_Proc)
GetProcAddress (hm_unicows, "GetTextMetricsW");
}
- if (s_pfn_Get_Text_MetricsW == NULL)
- abort (); /* cannot happen */
+ eassert (s_pfn_Get_Text_MetricsW != NULL);
return s_pfn_Get_Text_MetricsW (hdc, lptmw);
}
s_pfn_Get_Glyph_OutlineW = (GetGlyphOutlineW_Proc)
GetProcAddress (hm_unicows, "GetGlyphOutlineW");
}
- if (s_pfn_Get_Glyph_OutlineW == NULL)
- abort (); /* cannot happen */
+ eassert (s_pfn_Get_Glyph_OutlineW != NULL);
return s_pfn_Get_Glyph_OutlineW (hdc, uChar, uFormat, lpgm, cbBuffer,
lpvBuffer, lpmat2);
}
/* w32 implementation of draw for font backend.
Optional.
Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
- position of frame F with S->FACE and S->GC. If WITH_BACKGROUND
- is nonzero, fill the background in advance. It is assured that
- WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars).
+ position of frame F with S->FACE and S->GC. If WITH_BACKGROUND,
+ fill the background in advance. It is assured that WITH_BACKGROUND
+ is false when (FROM > 0 || TO < S->nchars).
TODO: Currently this assumes that the colors and fonts are already
set in the DC. This seems to be true now, but maybe only due to
int
w32font_draw (struct glyph_string *s, int from, int to,
- int x, int y, int with_background)
+ int x, int y, bool with_background)
{
UINT options;
HRGN orig_clip = NULL;
w32font_otf_drive (struct font *font, Lisp_Object features,
Lisp_Object gstring_in, int from, int to,
Lisp_Object gstring_out, int idx,
- int alternate_subst);
+ bool alternate_subst);
*/
/* Internal implementation of w32font_list.
font->space_width = font->average_width = w32_font->metrics.tmAveCharWidth;
font->vertical_centering = 0;
- font->encoding_type = 0;
font->baseline_offset = 0;
font->relative_compose = 0;
font->default_ascent = w32_font->metrics.tmAscent;
return 1;
}
+#ifndef WINDOWSNT
+#define _strlwr strlwr
+#endif /* !WINDOWSNT */
static int
check_face_name (LOGFONT *font, char *full_name)