Strip out all Xft, FreeType, and pangoxft checking. Rewrite X checks to
2005-08-09 Owen Taylor <otaylor@redhat.com> * configure.in: Strip out all Xft, FreeType, and pangoxft checking. Rewrite X checks to use pkg-config as much as possible. * gdk/win32/gdkfont-win32.c (gdk_font_from_description_for_display): Make this return Arial always to avoid using PangoWin32FontMap. (X11 backend has always been returned "fixed" for a long time) * gdk/linux-fb/gdkdrawable-fb2.c: Remove draw_glyphs() implementations, fall through to the default implementation in terms of Cairo. * gdk/linux-fb/gdkdrawable-fb2.c (gdk_fb_draw_text): Use gdk_draw_glyphs() on the wrapper rather than gdk_fb_draw_glyphs()
This commit is contained in:
@ -30,8 +30,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <pango/pangowin32.h>
|
||||
|
||||
#include "gdkfont.h"
|
||||
#include "gdkpango.h" /* gdk_pango_context_get() */
|
||||
#include "gdkdisplay.h"
|
||||
@ -1239,27 +1237,31 @@ GdkFont*
|
||||
gdk_font_from_description_for_display (GdkDisplay *display,
|
||||
PangoFontDescription *font_desc)
|
||||
{
|
||||
PangoFontMap *font_map;
|
||||
PangoFont *font;
|
||||
GdkFont *result = NULL;
|
||||
LOGFONT logfont;
|
||||
int size;
|
||||
|
||||
g_return_val_if_fail (font_desc != NULL, NULL);
|
||||
g_return_val_if_fail (display == gdk_display_get_default (), NULL);
|
||||
|
||||
font_map = pango_win32_font_map_for_display ();
|
||||
font = pango_font_map_load_font (font_map, gdk_pango_context_get (), font_desc);
|
||||
size = PANGO_PIXELS (pango_font_description_get_size (font_desc));
|
||||
|
||||
if (font)
|
||||
{
|
||||
LOGFONT *lfp =
|
||||
pango_win32_font_logfont (font);
|
||||
result = gdk_font_from_one_singlefont (gdk_font_load_logfont (lfp));
|
||||
g_free (lfp);
|
||||
logfont.lfHeight = - MulDiv (PointSize, GetDeviceCaps (hDC, LOGPIXELSY), 72);
|
||||
logfont.lfWidth = 0;
|
||||
logfont.lfEscapement = 0;
|
||||
logfont.lfOrientation = 0;
|
||||
logfont.lfWeight = FW_DONTCARE;
|
||||
logfont.lfItalic = FALSE;
|
||||
logfont.lfUnderline = FALSE;
|
||||
logfont.lfStrikeOut = FALSE;
|
||||
logfont.lfCharSet = ANSI_CHARSET;
|
||||
logfont.lfOutPrecision = OUT_TT_ONLY_PRECIS;
|
||||
logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
|
||||
logfont.lfQuality = PROOF_QUALITY;
|
||||
logfont.lfPitchAndFamily = DEFAULT_PITCH;
|
||||
strcpy (logfont.lfFaceName, "Arial");
|
||||
|
||||
g_object_unref (font);
|
||||
}
|
||||
|
||||
return result;
|
||||
return gdk_font_from_one_singlefont (gdk_font_load_logfont (&logfont));
|
||||
}
|
||||
|
||||
GdkFont*
|
||||
|
||||
Reference in New Issue
Block a user