home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sgi / graphics / 215 < prev    next >
Encoding:
Text File  |  1993-01-28  |  6.2 KB  |  161 lines

  1. Path: 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
  2. From: tpaquette@ita.lgc.com (Trevor Paquette)
  3. Newsgroups: comp.sys.sgi.graphics
  4. Subject: Re: GL Font Manager on IBM
  5. Message-ID: <TPAQUETTE.93Jan26143947@gumby.ita.lgc.com>
  6. Date: 26 Jan 93 20:39:47 GMT
  7. References: <1993Jan19.231224.16755@colorado.edu>
  8. Sender: usenet@lgc.com
  9. Organization: Landmark/ITA Inverse Theory and Applications
  10. Lines: 147
  11. In-Reply-To: michel@testa.Colorado.EDU's message of Tue, 19 Jan 1993 23: 12:24 GMT
  12. Nntp-Posting-Host: gumby.ita.lgc.com
  13.  
  14.  
  15. In article <1993Jan19.231224.16755@colorado.edu> michel@testa.Colorado.EDU (Michel Lesoinne) writes:
  16.  
  17. >
  18. > Hello Netland,
  19. >  I have been asked to port a program that we wrote on SGI machines to an
  20. > IBM RS/6000 machine that has the GL Library. However it doesn't seem to
  21. > have the font manager. Does anybody know where to find it ?
  22. > Thanks for any help.
  23.  
  24. >   Michel (Michel@testa.colorado.edu)
  25.  
  26.   I have already replied to Michel via email, but I thought that this would
  27.   be of general interest.
  28.  
  29.   I have written such a beastie. It is about 90% plug compatable with the
  30.  SGI FM. I wrote it to port the FORMS to the IBM. I have not had any problems
  31.  with it so far.
  32.  
  33.   I sent my changes to FORMS 2.1 to Mark Overmars for AIX a few days ago, and
  34.  asked him where he wanted me to put TFM (Trev's Font Manager) but have not
  35.  had a reply back yet. If there is an ftp site out there that is willing
  36.  to carry TFM and the supporting fonts (about 5 meg in all) please email me.
  37.  
  38.  Here is the TFM README file:
  39.  
  40.    TFM (Trev's Font Manager)
  41.  
  42.  TFM is an almost dropin replacement for the SGI Font Manager. Just about
  43. anything that calls the SGI FM, should be able to run with TFM with
  44. a recompile to the TFM libraries.
  45.  
  46.  What is does:
  47.   Emulates the SGI FM. It has almost all of the calls that the SGI FM does.
  48.  for calls that it cannot handle, it just has wrppers for them and these
  49.  calls do nothing.
  50.   These are the calls that it emulate:
  51.  
  52. void fminit()                void fmenumerate(callback)
  53.                     void (*callback)()
  54.  
  55. fmfonthandle fmfindfont(face)        fmfonthandle fmscalefont(tfh,scale)
  56. char *face;                fmfonthandle tfh;                  
  57.                     double scale;                      
  58.  
  59. void fmsetfont(tfh)            char *fmfontpath()
  60. fmfonthandle tfh;
  61.  
  62. long fmgetchrwidth(tfh, ch)        int fmgetfontinfo(tfh, info)
  63. fmfonthandle tfh;            fmfonthandle tfh;           
  64. unsigned char ch;            fmfontinfo *info;           
  65.  
  66. int fmgetfontname(tfh, slen, str)       long fmgetstrwidth(tfh, str)
  67. fmfonthandle tfh;            fmfonthandle tfh;           
  68. int slen;                char *str;                  
  69. char *str;
  70.  
  71. int fmgetwholemetrics(tfh,gi)           long fmoutchar(tfh, ch)
  72. fmfonthandle tfh;            fmfonthandle tfh;      
  73. fmglyphinfo *gi;            unsigned char ch;      
  74.  
  75. int fmprstr(str)            void fmsetpath(path)
  76. char *str;                char *path;         
  77.  
  78.  
  79.  There are the calls that it does nothing for:
  80.   void fmcachedisable()            void fmcacheenable()
  81.  
  82.   int  fmcachelimit()            int fmgetcacheused()
  83.  
  84.   int fmgetcomment(tfh, slen, str)    fmfonthandle fmmakefont(tfh, m)
  85.   fmfonthandle tfh;            fmfonthandle tfh;              
  86.   int slen;                double m[3][2];                
  87.   char *str;
  88.  
  89.   void fminitpagematrix()        void fmsetpagematrix(m)
  90.                     double m[3][2];
  91.  
  92.   void fmgetpagematrix(m)        void fmscalepagematrix(m)
  93.   double m[3][2];            double m;
  94.  
  95.   void fmrotatepagematrix(m)        void fmconcatpagematrix(m)
  96.   double m;                double m[3][2];
  97.  
  98.   void fmprintermatch(set)              void fmsetcachelimit(new_limit)
  99.   int set;                long new_limit;
  100.  
  101.  
  102.  Installation
  103.  ------------
  104.  1) Look at the Makefile provided and change the definitions to suit your site.
  105.  
  106.  2) Type 'make' to create libtfm.a.
  107.  
  108.  3) Type 'make install' to install the include file, library and
  109.     fonts.
  110.  
  111.     OR manually
  112.     Copy libtfm.a to /usr/lib
  113.     Copy tfmclient.h to /usr/include/fmclient.h
  114.     Create a directory to put the precompiled fonts into.
  115.         I suggest you use /usr/local/lib/tfmfonts.
  116.         Copy all files under tfmfonts to this directory.
  117.  
  118.         If this directory is not "/usr/local/lib/tfmfonts",
  119.         then you must set an environment variable called FONTPATH
  120.         to tell TFM where these fonts are.
  121.         (IE: if FONTPATH is not set in your enviroment variables, then
  122.              TFM will look under '/usr/local/lib/tfmfonts')
  123.  
  124.   4) Put "-ltfm" to your compile line to get the TFM functions.
  125.  
  126.  NOTE: If you do not have the directory tfmfonts with all the precompiled
  127.        fonts, AND you have access to an SGI with the Font Manager,
  128.        you can use the program fm2tfm to create the necessary font and
  129.        support files under the current directory. fm2tfm converts SGI
  130.        FontManager fonts to TFM format. WHILE IT IS RUNNING DO NOT PUT
  131.        ANYTHING IN FRONT OF THE WINDOWS IT CREATES.
  132.  
  133.  NOTE2: This is not the perfect solution to getting FM on the IBM. I should be
  134.         able to figure out the X font bitmaps and use them, but I don't have
  135.         the time. Better yet IBM should have just licensed FM in the first
  136.         place.
  137.  
  138.  DISCLAIMER:
  139.    THIS SOFTWARE IS PUBLIC DOMAIN. IT MAY FREELY BE COPIED AND USED IN
  140.    NON-COMMERCIAL PRODUCTS, ASSUMING PROPER CREDIT TO THE AUTHOR IS GIVEN,
  141.    BUT IT SHOULD NOT BE RESOLD. IF YOU WANT TO USE THE SOFTWARE FOR
  142.    COMMERCIAL PRODUCTS, CONTACT THE AUTHOR.
  143.  
  144.    THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT WARRANTY OF ANY KIND,
  145.    EITHER EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND
  146.    PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE
  147.    DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
  148.    CORRECTION.
  149.  
  150.   Bug reports, questions or improvments should be directed to the author
  151.  
  152. Name : Trevor Paquette       | Landmark/ITA             |   _\___ Fahrvergnugen
  153. Email: tpaquette@ita.lgc.com | Calgary, Alberta, Canada |  /     \____         
  154. Visitor from CyberSpace      | (403) 269-4669           | / G60       \        
  155. Renagade of Virtual Reality  | #include <disclaimer.h>  | \-O------O--/        
  156. --
  157. Name : Trevor Paquette       | Landmark/ITA             |  _\___ Fahrvergnuegen
  158. Email: tpaquette@ita.lgc.com | Calgary, Alberta, Canada | /     \____
  159. Visitor from CyberSpace      | (403) 269-4669           |/ G60       \
  160. Renegade of Virtual Reality  | #include <disclaimer.h>  |\-O------O--/
  161.