summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-08-20 08:36:41 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-08-20 08:36:41 +0000
commit79546feb86a232b0d3e01b1f436e258aef32b840 (patch)
treed35f417b2a3112bb3e0fb18d4fc057a37ab79f40 /pango/pangowin32.c
parente95590dd006740ab6bdcf71cae31efbf8404033e (diff)
downloadpango-79546feb86a232b0d3e01b1f436e258aef32b840.tar.gz
Add parameter telling whether to print warning or not if string isn't
2000-08-20 Tor Lillqvist <tml@iki.fi> * pango/pango-utils.c (pango_parse_*): Add parameter telling whether to print warning or not if string isn't recognised. Use g_strncasecmp(). * pango/pango-utils.h: Change prototype accordingly. * pango/pangox-fontmap.c * pango/pangowin32-fontmap.c: Change calls correspondingly. * pango/pangowin32.h: * pango/pangowin32.c: Cosmetic changes, dead code removal. * pango/pangoft2.h * pango/pangoft2-private.h * pango/pangoft2.c * pango/pangoft2-fontmap.c * pango/pangoft2-fontcache.c: New files implementing a FreeType2 backend. Used only on Win32 so far, but doesn't contain Win32-specific code per se, so if somebody wants to try it out on X11, too, be my guest. It works, more or less, but there are some details still to sort out. Performance needs to be improved. Debugging printouts still present. Font path currently hardcoded to C:\windows\fonts, heh. Owen says he doesn't think it's a good idea to use ths on Win32, but I'll try anyway. If it turns out using the native Win32 GDI backend is better after all, oh well. * pango/makefile.mingw: Delete. Move contents to makefile.mingw.in. * pango/makefile.mingw.in: New file. Add rules for FreeType2 backend. Add FreeType2 CFLAGS and LIBS. * pango/Makefile.am: Generate makefile.mingw. (EXTRA_DIST): Add FreeType2 backend sources, and makefile.mingw{,.in} * modules/basic/basic-win32.c: Couple of cosmetic changes. * modules/basic/Makefile.am: Generate makefile.mingw. (EXTRA_DIST): Add basic-ft2.c, and makefile.mingw{,.in} * modules/basic/makefile.mingw: Delete. Move contents to makefile.mingw.in. * modules/basic/makefile.mingw.in: New file. Add rule for basic-ft2. Add FreeType2 CFLAGS and LIBS. * examples/viewer-win32.c (read_file): Fix error messages. (draw): Get HDC from GDK once for all paragraphs. * examples/viewer-ft2.c: New file. The FT_Bitmap (256-level bitmap) produced by the FreeType2 backend is copied to the GtkLayout window using gdk_draw_gray_image from GdkRGB (!). Yes, this is kinda circular dependency between Pango and GTK+. * examples/makefile.mingw: Delete. Move contents to makefile.mingw.in. * examples/makefile.mingw.in: New file. Add rules for viewer-ft2. Add FreeType2 CFLAGS and LIBS. * examples/Makefile.am: Generate makefile.mingw. (EXTRA_DIST): Add viewer-win32.c and viewer-ft2.c, and makefile.mingw{,.in}
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index d5e6663f..9bf2a026 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -90,18 +90,22 @@ static void pango_win32_font_shutdown (GObject *object);
static void pango_win32_font_finalize (GObject *object);
static PangoFontDescription *pango_win32_font_describe (PangoFont *font);
+
static PangoCoverage *pango_win32_font_get_coverage (PangoFont *font,
const char *lang);
+
static PangoEngineShape *pango_win32_font_find_shaper (PangoFont *font,
const char *lang,
guint32 ch);
-static void pango_win32_font_get_glyph_extents (PangoFont *font,
- PangoGlyph glyph,
- PangoRectangle *ink_rect,
- PangoRectangle *logical_rect);
-static void pango_win32_font_get_metrics (PangoFont *font,
- const gchar *lang,
- PangoFontMetrics *metrics);
+
+static void pango_win32_font_get_glyph_extents (PangoFont *font,
+ PangoGlyph glyph,
+ PangoRectangle *ink_rect,
+ PangoRectangle *logical_rect);
+
+static void pango_win32_font_get_metrics (PangoFont *font,
+ const gchar *lang,
+ PangoFontMetrics *metrics);
static PangoWin32SubfontInfo *pango_win32_find_subfont (PangoFont *font,
PangoWin32Subfont subfont_index);
@@ -110,9 +114,11 @@ static gboolean pango_win32_find_glyph (PangoFont *font,
PangoGlyph glyph,
PangoWin32SubfontInfo **subfont_return,
SIZE *size_return);
+
static HFONT pango_win32_get_hfont (PangoFont *font,
PangoWin32SubfontInfo *info);
+
static void pango_win32_get_item_properties (PangoItem *item,
PangoUnderline *uline,
PangoAttrColor *fg_color,
@@ -540,6 +546,8 @@ pango_win32_unicode_classify (wchar_t wc)
else
return -1;
}
+ /* NOTREACHED */
+ return 0;
}
static void
@@ -867,7 +875,7 @@ pango_win32_list_subfonts (PangoFont *font,
LOGFONT *lfp;
PangoWin32Font *win32font = (PangoWin32Font *)font;
PangoWin32Subfont *subfont_list;
- int i, j;
+ int i;
int n_subfonts;
g_return_val_if_fail (font != NULL, 0);
@@ -985,7 +993,7 @@ subfont_has_glyph (PangoFont *font,
info->oldfont = SelectObject (info->buf_hdc, info->hfont);
SetTextAlign (info->buf_hdc, TA_LEFT|TA_BASELINE|TA_NOUPDATECP);
GetTextMetrics (info->buf_hdc, &tm);
- PING(("wt:%d,ht:%d",tm.tmMaxCharWidth,tm.tmHeight));
+ PING(("wt:%ld,ht:%ld",tm.tmMaxCharWidth,tm.tmHeight));
info->default_char_hbm =
create_bitmap_dibsection (info->buf_hdc, &info->default_char_buf,
@@ -1279,7 +1287,6 @@ pango_win32_render_layout_line (HDC hdc,
PangoRectangle overall_rect;
PangoRectangle logical_rect;
PangoRectangle ink_rect;
- PangoContext *context = pango_layout_get_context (line->layout);
int x_off = 0;