summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.pre-1-1012
-rw-r--r--pango/pangowin32-fontmap.c2
-rw-r--r--pango/pangowin32.c14
4 files changed, 35 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index c8ba64d3..3ee7f595 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-07-22 Tor Lillqvist <tml@novell.com>
+
+ * pango/pangowin32.c: No need to include modules.h here any
+ longer.
+ (pango_win32_get_context): Remove unused variable.
+ (pango_win32_render_layout_line): Fix underlining. (#304692)
+ Mention in the doc comment that the DC's text alignment needs to
+ have TA_BASELINE and TA_LEFT for underlining to be correct.
+
+ * pango/pangowin32-fontmap.c: Include modules.h here instead.
+ (pango_win32_font_map_class_init): Define variable i.
+
2005-07-21 Owen Taylor <otaylor@redhat.com>
* pango/pangofc-fontmap.c (pango_fc_font_map_add): Fix an
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index c8ba64d3..3ee7f595 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,15 @@
+2005-07-22 Tor Lillqvist <tml@novell.com>
+
+ * pango/pangowin32.c: No need to include modules.h here any
+ longer.
+ (pango_win32_get_context): Remove unused variable.
+ (pango_win32_render_layout_line): Fix underlining. (#304692)
+ Mention in the doc comment that the DC's text alignment needs to
+ have TA_BASELINE and TA_LEFT for underlining to be correct.
+
+ * pango/pangowin32-fontmap.c: Include modules.h here instead.
+ (pango_win32_font_map_class_init): Define variable i.
+
2005-07-21 Owen Taylor <otaylor@redhat.com>
* pango/pangofc-fontmap.c (pango_fc_font_map_add): Fix an
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index d29ee20d..37cb279c 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -32,6 +32,7 @@
#include "pango-fontmap.h"
#include "pango-utils.h"
#include "pangowin32-private.h"
+#include "modules.h"
typedef struct _PangoWin32Family PangoWin32Family;
typedef struct _PangoWin32SizeInfo PangoWin32SizeInfo;
@@ -184,6 +185,7 @@ pango_win32_font_map_class_init (PangoWin32FontMapClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
PangoFontMapClass *fontmap_class = PANGO_FONT_MAP_CLASS (class);
+ int i;
class->find_font = pango_win32_font_map_real_find_font;
object_class->finalize = pango_win32_font_map_finalize;
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 536542f6..b7769650 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -30,7 +30,6 @@
#include "pango-utils.h"
#include "pangowin32.h"
#include "pangowin32-private.h"
-#include "modules.h"
#define PANGO_WIN32_UNKNOWN_FLAG 0x10000000
@@ -132,7 +131,6 @@ PangoContext *
pango_win32_get_context (void)
{
PangoContext *result;
- int i;
result = pango_context_new ();
pango_context_set_font_map (result, pango_win32_font_map_for_display ());
@@ -866,12 +864,14 @@ pango_win32_get_unknown_glyph (PangoFont *font,
/**
* pango_win32_render_layout_line:
- * @hdc: HDC to use for uncolored drawing
+ * @hdc: DC to use for uncolored drawing
* @line: a #PangoLayoutLine
* @x: the x position of start of string (in pixels)
* @y: the y position of baseline (in pixels)
*
- * Render a #PangoLayoutLine onto a device context
+ * Render a #PangoLayoutLine onto a device context. For underlining to
+ * work property the text alignment of the DC should have TA_BASELINE
+ * and TA_LEFT.
*/
void
pango_win32_render_layout_line (HDC hdc,
@@ -945,9 +945,13 @@ pango_win32_render_layout_line (HDC hdc,
points[0].y = points[1].y = y + 4;
points[1].x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width);
Polyline (hdc, points, 2);
- /* Fall through */
+ points[0].y = points[1].y = y + 2;
+ Polyline (hdc, points, 2);
+ break;
case PANGO_UNDERLINE_SINGLE:
+ points[0].x = x + PANGO_PIXELS (x_off + ink_rect.x) - 1;
points[0].y = points[1].y = y + 2;
+ points[1].x = x + PANGO_PIXELS (x_off + ink_rect.x + ink_rect.width);
Polyline (hdc, points, 2);
break;
case PANGO_UNDERLINE_ERROR: