Xref: utzoo comp.sys.atari.st:38633 comp.sys.atari.st.tech:2556 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!zaphod.mps.ohio-state.edu!think.com!spool.mu.edu!cs.umn.edu!thelake!steve From: steve@thelake.mn.org (Steve.Yelvington) Newsgroups: comp.sys.atari.st,comp.sys.atari.st.tech Subject: detecting GDOS and using vst_load_fonts Message-ID: Date: 29 May 91 21:09:58 GMT Organization: St. Croix Valley rhubarb and tomato patch Lines: 67 X-UUCP-route: {rutgers,plains,decwrl}!umn-cs!thelake!steve (This is a repost ... because of a configuration error, the original may not have achieved the distribution I had intended.) --- 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