Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!stanford.edu!msi.umn.edu!cs.umn.edu!thelake!steve From: steve@thelake.mn.org (Steve Yelvington) Newsgroups: comp.sys.atari.st.tech Subject: detecting GDOS and using vst_load_fonts Message-ID: Date: 28 May 91 19:51:58 GMT Organization: St. Croix Valley rhubarb and tomato patch Lines: 62 X-UUCP-route: {rutgers,plains,decwrl}!umn-cs!thelake!steve I'm having trouble figuring out how to use an alternate font to draw text in a GEM window. I presume I need to check for the existence of GDOS before calling vst_load_fonts, but how? I'm also getting three bombs when calling vst_load_fonts, with AMCLITE installed and ASSIGN.SYS set up properly (or at least well enough that GEMINI doesn't complain). I'd like to install Gemini 9 pt inside an application program. Do I need to search for "Gemini 9 pt" in the data returned by vqt_name() or do I search for the filename "BAGE09.FNT"? Code fragment follows: open_vwork() { int i; char tmpln[80]; handle = graf_handle( &char_w, &char_h, &box_w, &box_h); for( i=0; i<10; work_in[i++] = 1 ); work_in[10] = 2; v_opnvwk( work_in, &handle, work_out); fonts_loaded = work_out[10]; sprintf(tmpln,"[1][There are %d|fonts available][OK]",fonts_loaded); form_alert(1,tmpln); /* note: it tells me I have one font available */ fonts_loaded = vst_load_fonts(handle,2); /* BOOM! Three big ones and we go no further */ sprintf(tmpln,"[1][After vst_load_fonts,|there are %d|fonts available][OK]",fonts_loaded); form_alert(1,tmpln); if (fonts_loaded > 1) set_font(); } set_font() { /* Wouldn't it be nice if there were a font selector like the file selector? (Volunteers?) */ int i,fontindex; char fontname[32]; char *p = "BAGE09.FNT"; /* or should it be "Gemini 9"? */ if (form_alert(2,"[1][Load BAGE09.FNT?][Yes|No]") == 2) return; for (i=0;i