summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-11-30 21:04:52 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-11-30 21:04:52 +0000
commit86666507ded9c2dd4d89e21c8694d14eabe6c0d9 (patch)
tree237765b634b73f5e113830fa44d8f080188b9837 /pango/pangowin32.c
parent801c16be4a652441d34df85892621470fce58f28 (diff)
downloadpango-86666507ded9c2dd4d89e21c8694d14eabe6c0d9.tar.gz
Define PANGO_VERSION.
2000-11-30 Tor Lillqvist <tml@iki.fi> * pango/makefile.mingw.in (DEFINES): Define PANGO_VERSION. Changes by Hans Breuer: * pango/pango-layout.c (shape_tab): Add a FIXME comment. * pango/pango-markup.c (compare_xcolor_entries): Use g_strcasecmp. * pango/pango-utils.c (pango_get_sysconf_subdirectory): Use second fallback location if there is no pango subdir in the Windows directory. * pango/pangowin32-fontmap.c (pango_win32_font_entry_get_coverage): Check if fopen succeeded. * pango/pangowin32-private.h (DEBUGGING): Turn off. * pango/pangowin32.c (pango_win32_unicode_classify): We can in fact get out of the loop. Return invalid value in that case. (subfont_has_glyph): Improve performance a bit. * pango/querymodules.c: Small change for MSVC build. * modules/basic/basic-win32.c (basic_engine_get_coverage): Performance improvement. * examples/viewer-win32.c (main): Disable double buffering on the layout widget.
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index 2b457f4c..5c434a7a 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -557,8 +557,7 @@ pango_win32_unicode_classify (wchar_t wc)
else
return -1;
}
- /* NOTREACHED */
- return 0;
+ return PANGO_WIN32_U_LAST_PLUS_ONE;
}
static void
@@ -989,13 +988,18 @@ subfont_has_glyph (PangoFont *font,
{
TEXTMETRIC tm;
PangoWin32Font *win32font = (PangoWin32Font *) font;
+ PangoWin32UnicodeSubrange subrange;
wchar_t default_wc;
#ifdef HEAVY_DEBUGGING
static int dispx = 5, dispy = 0;
#endif
+ subrange = pango_win32_unicode_classify (wc);
+ if (PANGO_WIN32_U_LAST_PLUS_ONE == subrange)
+ return FALSE;
+
if (!pango_win32_logfont_has_subrange (win32font->fontmap, &info->logfont,
- pango_win32_unicode_classify (wc)))
+ subrange))
return FALSE;
if (info->buf_hbm == NULL)
@@ -1044,6 +1048,19 @@ subfont_has_glyph (PangoFont *font,
SelectObject (info->buf_hdc, info->buf_hbm);
}
+
+#if 0 /* This doesn't work either */
+ /* GetTextMetricsW unsupported on Win9x, questionable results
+ * on NT 4.0
+ */
+ if (GetTextMetricsW (info->buf_hdc, &tmw)
+ && ((tmw.tmLastChar < wc) || (wc < tmw.tmFirstChar)))
+ {
+ //g_print("ShortCut %d %d %d\n", wc, tmw.tmFirstChar, tmw.tmLastChar);
+ return FALSE;
+ }
+#endif
+
/* Draw character into our bitmap; compare with the bitmap for
* the default character. If they are identical, this character
* does not exist in the font.