summaryrefslogtreecommitdiff
path: root/pango/pangowin32-fontmap.c
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2001-11-03 11:37:51 +0000
committerHans Breuer <hans@src.gnome.org>2001-11-03 11:37:51 +0000
commit29a68a3b824a279f39b274af96244fb9c6665839 (patch)
tree5ac14cba7d953d9cced6211ca07502998337b155 /pango/pangowin32-fontmap.c
parentb851a3c13af7e7cd4750fa7df1f80782415a0c54 (diff)
downloadpango-29a68a3b824a279f39b274af96244fb9c6665839.tar.gz
don't bother with module dir recalculation if LIBDIR isn't defined
2001-11-03 Hans Breuer <hans@breuer.org> * pango/modules.c : don't bother with module dir recalculation if LIBDIR isn't defined * pango/pangowin32-fontmap.c : make it compile again after the g_ascii_* change below. Use EnumFontFamiliesExA to ensure to use the ascii version, though defining UNICODE for G_OS_WIN32 will break at other place anyway. * pango/makefile.msc : use (hopefully temporary) DIRENT_CFLAGS and DIRENT_LIBS (see #63667)
Diffstat (limited to 'pango/pangowin32-fontmap.c')
-rw-r--r--pango/pangowin32-fontmap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index 7dbefe24..a84160a8 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -223,7 +223,7 @@ pango_win32_enum_proc (LOGFONT *lfp,
lf = *lfp;
- EnumFontFamiliesEx (pango_win32_hdc, &lf, (FONTENUMPROC) pango_win32_inner_enum_proc, lParam, 0);
+ EnumFontFamiliesExA (pango_win32_hdc, &lf, (FONTENUMPROC) pango_win32_inner_enum_proc, lParam, 0);
return 1;
}
@@ -256,7 +256,7 @@ pango_win32_font_map_for_display (void)
memset (&logfont, 0, sizeof (logfont));
logfont.lfCharSet = DEFAULT_CHARSET;
- EnumFontFamiliesEx (pango_win32_hdc, &logfont, (FONTENUMPROC) pango_win32_enum_proc, 0, 0);
+ EnumFontFamiliesExA (pango_win32_hdc, &logfont, (FONTENUMPROC) pango_win32_enum_proc, 0, 0);
#ifdef _WE_WANT_GLOBAL_ALIASES_
pango_win32_font_map_read_aliases (fontmap);
@@ -718,6 +718,7 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap,
PangoVariant variant;
PangoWeight weight;
PangoStretch stretch;
+ int i;
PING(("lfp.face=%s,wt=%ld,ht=%ld",lfp->lfFaceName,lfp->lfWeight,lfp->lfHeight));
@@ -725,7 +726,9 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap,
*/
lfp2 = g_new (LOGFONT, 1);
*lfp2 = *lfp;
- lfp2->lfFaceName = g_ascii_strdown (lfp2->lfFaceName, -1);
+ /* lfp2->lfFaceName is an array of CHAR, change inplace */
+ for (i = 0; i < LF_FACESIZE; i++)
+ lfp2->lfFaceName[i] = g_ascii_tolower (lfp2->lfFaceName[i]);
size_info = g_hash_table_lookup (win32fontmap->size_infos, lfp);
if (!size_info)
{
@@ -803,7 +806,8 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap,
win32face->coverage = NULL;
win32face->logfont = *lfp;
win32face->unicode_table = NULL;
- win32face->logfont.lfFaceName = g_ascii_strdown (lfp->lfFaceName, -1);
+ for (i = 0; i < LF_FACESIZE; i++)
+ win32face->logfont.lfFaceName[i] = g_ascii_tolower (win32face->logfont.lfFaceName[i]);
font_family->font_entries = g_slist_append (font_family->font_entries, win32face);
win32fontmap->n_fonts++;