🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.graphics
Article #146

Re: GL Font Manager on IBM

#146
From: Trevor Paquette
Date: Tue, 26 Jan 1993 20:39
147 lines
6465 bytes
In article <1993Jan19.231224.16755@colorado.edu> michel@testa.Colorado.EDU (Michel Lesoinne) writes:

>
> Hello Netland,
>  I have been asked to port a program that we wrote on SGI machines to an
> IBM RS/6000 machine that has the GL Library. However it doesn't seem to
> have the font manager. Does anybody know where to find it ?
> Thanks for any help.

>   Michel (Michel@testa.colorado.edu)

  I have already replied to Michel via email, but I thought that this would
  be of general interest.

  I have written such a beastie. It is about 90% plug compatable with the
 SGI FM. I wrote it to port the FORMS to the IBM. I have not had any problems
 with it so far.

  I sent my changes to FORMS 2.1 to Mark Overmars for AIX a few days ago, and
 asked him where he wanted me to put TFM (Trev's Font Manager) but have not
 had a reply back yet. If there is an ftp site out there that is willing
 to carry TFM and the supporting fonts (about 5 meg in all) please email me.

 Here is the TFM README file:

   TFM (Trev's Font Manager)

 TFM is an almost dropin replacement for the SGI Font Manager. Just about
anything that calls the SGI FM, should be able to run with TFM with
a recompile to the TFM libraries.

 What is does:
  Emulates the SGI FM. It has almost all of the calls that the SGI FM does.
 for calls that it cannot handle, it just has wrppers for them and these
 calls do nothing.
  These are the calls that it emulate:

void fminit()				void fmenumerate(callback)
					void (*callback)()

fmfonthandle fmfindfont(face)		fmfonthandle fmscalefont(tfh,scale)
char *face;				fmfonthandle tfh;                  
					double scale;                      

void fmsetfont(tfh)			char *fmfontpath()
fmfonthandle tfh;

long fmgetchrwidth(tfh, ch)		int fmgetfontinfo(tfh, info)
fmfonthandle tfh;			fmfonthandle tfh;           
unsigned char ch;			fmfontinfo *info;           

int fmgetfontname(tfh, slen, str)       long fmgetstrwidth(tfh, str)
fmfonthandle tfh;			fmfonthandle tfh;           
int slen;				char *str;                  
char *str;

int fmgetwholemetrics(tfh,gi)           long fmoutchar(tfh, ch)
fmfonthandle tfh;			fmfonthandle tfh;      
fmglyphinfo *gi;			unsigned char ch;      

int fmprstr(str)			void fmsetpath(path)
char *str;				char *path;         


 There are the calls that it does nothing for:
  void fmcachedisable()			void fmcacheenable()

  int  fmcachelimit()			int fmgetcacheused()

  int fmgetcomment(tfh, slen, str)	fmfonthandle fmmakefont(tfh, m)
  fmfonthandle tfh;			fmfonthandle tfh;              
  int slen;				double m[3][2];                
  char *str;

  void fminitpagematrix()		void fmsetpagematrix(m)
					double m[3][2];

  void fmgetpagematrix(m)		void fmscalepagematrix(m)
  double m[3][2];			double m;

  void fmrotatepagematrix(m)		void fmconcatpagematrix(m)
  double m;				double m[3][2];

  void fmprintermatch(set)              void fmsetcachelimit(new_limit)
  int set;				long new_limit;


 Installation
 ------------
 1) Look at the Makefile provided and change the definitions to suit your site.

 2) Type 'make' to create libtfm.a.

 3) Type 'make install' to install the include file, library and
	fonts.

    OR manually
	Copy libtfm.a to /usr/lib
	Copy tfmclient.h to /usr/include/fmclient.h
	Create a directory to put the precompiled fonts into.
	    I suggest you use /usr/local/lib/tfmfonts.
	    Copy all files under tfmfonts to this directory.

	    If this directory is not "/usr/local/lib/tfmfonts",
	    then you must set an environment variable called FONTPATH
	    to tell TFM where these fonts are.
	    (IE: if FONTPATH is not set in your enviroment variables, then
	         TFM will look under '/usr/local/lib/tfmfonts')

  4) Put "-ltfm" to your compile line to get the TFM functions.

 NOTE: If you do not have the directory tfmfonts with all the precompiled
       fonts, AND you have access to an SGI with the Font Manager,
       you can use the program fm2tfm to create the necessary font and
       support files under the current directory. fm2tfm converts SGI
       FontManager fonts to TFM format. WHILE IT IS RUNNING DO NOT PUT
       ANYTHING IN FRONT OF THE WINDOWS IT CREATES.

 NOTE2: This is not the perfect solution to getting FM on the IBM. I should be
        able to figure out the X font bitmaps and use them, but I don't have
        the time. Better yet IBM should have just licensed FM in the first
        place.

 DISCLAIMER:
   THIS SOFTWARE IS PUBLIC DOMAIN. IT MAY FREELY BE COPIED AND USED IN
   NON-COMMERCIAL PRODUCTS, ASSUMING PROPER CREDIT TO THE AUTHOR IS GIVEN,
   BUT IT SHOULD NOT BE RESOLD. IF YOU WANT TO USE THE SOFTWARE FOR
   COMMERCIAL PRODUCTS, CONTACT THE AUTHOR.

   THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT WARRANTY OF ANY KIND,
   EITHER EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND
   PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
   DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
   CORRECTION.

  Bug reports, questions or improvments should be directed to the author

Name : Trevor Paquette       | Landmark/ITA             |   _\___ Fahrvergnugen
Email: tpaquette@ita.lgc.com | Calgary, Alberta, Canada |  /     \____         
Visitor from CyberSpace      | (403) 269-4669           | / G60       \        
Renagade of Virtual Reality  | #include <disclaimer.h>  | \-O------O--/        
--
Name : Trevor Paquette       | Landmark/ITA             |  _\___ Fahrvergnuegen
Email: tpaquette@ita.lgc.com | Calgary, Alberta, Canada | /     \____
Visitor from CyberSpace      | (403) 269-4669           |/ G60       \
Renegade of Virtual Reality  | #include <disclaimer.h>  |\-O------O--/
Technical Details
Message-ID: <TPAQUETTE.93Jan26143947@gumby.ita.lgc.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!spool.mu.edu!howland.reston.ans.net!usc!cs.utexas.edu!lgc.com!rice!lgc!ita!tpaquette
References: <1993Jan19.231224.16755@colorado.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!spool.mu.edu!howland.reston.ans.net!usc!cs.utexas.edu!lgc.com!rice!lgc!ita!tpaquette
From: tpaquette@ita.lgc.com (Trevor Paquette)
Newsgroups: comp.sys.sgi.graphics
Subject: Re: GL Font Manager on IBM
Message-ID: <TPAQUETTE.93Jan26143947@gumby.ita.lgc.com>
Date: 26 Jan 93 20:39:47 GMT
References: <1993Jan19.231224.16755@colorado.edu>
Sender: usenet@lgc.com
Organization: Landmark/ITA Inverse Theory and Applications
Lines: 147
In-Reply-To: michel@testa.Colorado.EDU's message of Tue, 19 Jan 1993 23: 12:24 GMT
Nntp-Posting-Host: gumby.ita.lgc.com