[Fwd: Re: [Sodipodi-list] Win32 0.33 prerelease beta2]
For those of you working on the Inkscape Win32 stuff...
(you might want to hit the sodipodi list archives and follow the whole thread though)
-----Forwarded Message----- From: Mitsuru Oka <oka326@...90...> To: Lauris Kaplinski <lauris@...39...> Cc: sodipodi-list@lists.sourceforge.net Subject: Re: [Sodipodi-list] Win32 0.33 prerelease beta2 Date: Mon, 01 Dec 2003 04:20:09 +0900
Lauris Kaplinski <1070186315.8512.36.camel@...91...> wrote:
Yeah, It's reasonable.
I found that dirty hack also works on win98:
Index: nr-type-w32.c =================================================================== RCS file: /cvs/gnome/sodipodi/src/libnrtype/nr-type-w32.c,v retrieving revision 1.18 diff -u -r1.18 nr-type-w32.c --- nr-type-w32.c 29 Nov 2003 23:50:52 -0000 1.18 +++ nr-type-w32.c 30 Nov 2003 19:15:43 -0000 @@ -15,6 +15,8 @@ #include <stdio.h> #include <tchar.h>
+#include <glib.h> + #include <libarikkei/arikkei-dict.h> #include <libarikkei/arikkei-strlib.h>
@@ -565,11 +567,16 @@ nr_type_w32_typefaces_enum_proc (LOGFONT *lfp, TEXTMETRIC *metrics, DWORD fontType, LPARAM lParam) { if (fontType == TRUETYPE_FONTTYPE) { - LOGFONT lf; + GSList *list; + LOGFONT *lf; + + lf = nr_new (LOGFONT, 1); + *lf = *lfp;
- lf = *lfp; + list = g_slist_append (*(GSList **)lParam, lf); + *(GSList **)lParam = list;
- EnumFontFamiliesEx (hdc, &lf, (FONTENUMPROC) nr_type_w32_inner_enum_proc, lParam, 0); +/* EnumFontFamiliesEx (hdc, &lf, (FONTENUMPROC) nr_type_w32_inner_enum_proc, lParam, 0); */ }
return 1; @@ -578,12 +585,14 @@ static void nr_type_w32_init (void) { + GSList *font_que = NULL; LOGFONT logfont; int pos, i;
/* g_print ("Loading W32 type directory...\n"); */
- hdc = CreateDC (L"DISPLAY", NULL, NULL, NULL); + /* hdc = CreateDC (L"DISPLAY", NULL, NULL, NULL); */ + hdc = CreateDCA ("DISPLAY", NULL, NULL, NULL);
arikkei_dict_setup_string (&familydict, 131); arikkei_dict_setup_string (&namedict, 537); @@ -591,7 +600,14 @@ /* read system font directory */ memset (&logfont, 0, sizeof (LOGFONT)); logfont.lfCharSet = DEFAULT_CHARSET; - EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) nr_type_w32_typefaces_enum_proc, 0, 0); + EnumFontFamiliesEx (hdc, &logfont, (FONTENUMPROC) nr_type_w32_typefaces_enum_proc, (LPARAM)&font_que, 0); + + while (font_que) { + LOGFONT *lf; + lf = (LOGFONT*)font_que->data; + EnumFontFamiliesEx (hdc, lf, (FONTENUMPROC) nr_type_w32_inner_enum_proc, 0, 0); + font_que = g_slist_remove (font_que, (gpointer)lf); + }
/* Fill in lists */ NRW32Families.length = families_len; Best regards,
participants (1)
-
MenTaLguY