[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32font.c,v
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32font.c,v |
Date: |
Thu, 26 Jun 2008 10:48:30 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Jason Rumney <jasonr> 08/06/26 10:48:29
Index: w32font.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32font.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- w32font.c 20 Jun 2008 15:27:28 -0000 1.41
+++ w32font.c 26 Jun 2008 10:48:27 -0000 1.42
@@ -234,14 +234,7 @@
struct font *font;
{
struct w32font_info *w32_font = (struct w32font_info *) font;
-
- if (w32_font->compat_w32_font)
- {
- W32FontStruct *old_w32_font = w32_font->compat_w32_font;
- DeleteObject (old_w32_font->hfont);
- xfree (old_w32_font);
- w32_font->compat_w32_font = 0;
- }
+ DeleteObject (w32_font->hfont);
}
/* w32 implementation of has_char for font backend.
@@ -314,7 +307,7 @@
f = XFRAME (selected_frame);
dc = get_frame_dc (f);
- old_font = SelectObject (dc, w32_font->compat_w32_font->hfont);
+ old_font = SelectObject (dc, w32_font->hfont);
/* GetCharacterPlacement is used here rather than GetGlyphIndices because
it is supported on Windows NT 4 and 9x/ME. But it cannot reliably report
@@ -367,10 +360,10 @@
WORD *wcode = NULL;
SIZE size;
- if (metrics)
- {
struct w32font_info *w32_font = (struct w32font_info *) font;
+ if (metrics)
+ {
bzero (metrics, sizeof (struct font_metrics));
metrics->ascent = font->ascent;
metrics->descent = font->descent;
@@ -419,7 +412,7 @@
f = XFRAME (selected_frame);
dc = get_frame_dc (f);
- old_font = SelectObject (dc, FONT_COMPAT (font)->hfont);
+ old_font = SelectObject (dc, w32_font->hfont);
}
compute_metrics (dc, w32_font, *(code + i), char_metric);
}
@@ -476,7 +469,7 @@
f = XFRAME (selected_frame);
dc = get_frame_dc (f);
- old_font = SelectObject (dc, FONT_COMPAT (font)->hfont);
+ old_font = SelectObject (dc, w32_font->hfont);
}
if (GetTextExtentPoint32W (dc, wcode, nglyphs, &size))
@@ -765,8 +758,6 @@
HDC dc;
HFONT hfont, old_font;
Lisp_Object val, extra;
- /* For backwards compatibility. */
- W32FontStruct *compat_w32_font;
struct w32font_info *w32_font;
struct font * font;
OUTLINETEXTMETRIC* metrics = NULL;
@@ -832,15 +823,7 @@
SelectObject (dc, old_font);
release_frame_dc (f, dc);
- /* W32FontStruct - we should get rid of this, and use the w32font_info
- struct for any W32 specific fields. font->font.font can then be hfont. */
- w32_font->compat_w32_font = xmalloc (sizeof (W32FontStruct));
- compat_w32_font = w32_font->compat_w32_font;
- bzero (compat_w32_font, sizeof (W32FontStruct));
- compat_w32_font->font_type = UNICODE_FONT;
- /* Duplicate the text metrics. */
- bcopy (&w32_font->metrics, &compat_w32_font->tm, sizeof (TEXTMETRIC));
- compat_w32_font->hfont = hfont;
+ w32_font->hfont = hfont;
{
char *name;
@@ -912,11 +895,6 @@
font->underline_position = -1;
}
- /* max_descent is used for underlining in w32term.c. Hopefully this
- is temporary, as we'll want to get rid of the old compatibility
- stuff later. */
- compat_w32_font->max_bounds.descent = font->descent;
-
/* For temporary compatibility with legacy code that expects the
name to be usable in x-list-fonts. Eventually we expect to change
x-list-fonts and other places that use fonts so that this can be
@@ -2070,7 +2048,7 @@
/* Initialize as much of the font details as we can from the current
default font. */
hdc = GetDC (FRAME_W32_WINDOW (f));
- oldobj = SelectObject (hdc, FONT_COMPAT (FRAME_FONT (f))->hfont);
+ oldobj = SelectObject (hdc, ((struct w32font_info *) FRAME_FONT (f))->hfont);
GetTextFace (hdc, LF_FACESIZE, lf.lfFaceName);
if (GetTextMetrics (hdc, &tm))
{
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/01
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Kenichi Handa, 2008/06/09
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/11
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Juanma Barranquero, 2008/06/12
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/13
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/16
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/18
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/20
- [Emacs-diffs] Changes to emacs/src/w32font.c,v,
Jason Rumney <=
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/26
- [Emacs-diffs] Changes to emacs/src/w32font.c,v, Jason Rumney, 2008/06/27