[wellylug] Freetype path...

Edouard Chalaron e.chalaron at paradise.net.nz
Thu Jan 16 14:09:10 NZDT 2003

Hi all,

I am strugling with a piece of soft.he install of the does not find the 
installed freetype fonts (needed), e.g. it compiles and install but it seems 
that a path is wrong.

> Size 14 [14]{-adobe-times-medium-r-normal-}
> FDir /home/edouard/.kde/share/fonts
> FDir unix/:-1
> Error: Font file not found
> Error New Face FT

Iasked the author who replied:
"That's because you are using a font server. You have to hardcode line
ft_titler.cc:242 with the actual path of the TT fonts directory."

So, I tried the ./configure -with-fontdir-Where-I-supposed-it-could-be. 

Here is a part of the code I have to modify. Pointless to say I am lost....
If anybody can help.

void FT_Titler::setXFontName(char *fontname) 
   int xx = 1, nf, l;
   char **fontdirs;
   static char *fontpath = FONTPATH;
   fontdirs = &fontpath;
   nf = 1;
   fontdirs = XGetFontPath(gdk_display, &nf);
   string subfn, fn = fontname;
   for (int i=0; i < 5; i++)
	xx = fn.find('-', xx);
   subfn = fn.substr(0, xx);
   xx = fn.find('-', xx);
   l = xx+1;
   l = fn.find('-', l);
   sscanf(fn.substr(xx+1, l).c_str(), "%d", &size);
   fprintf(stderr, "Size %d [%s]{%s}\n", size, 
	   fn.substr(xx+1, l-xx-1).c_str(),
   while (--nf >= 0) {
      string file = fontdirs[nf];
      file += "/fonts.dir";
      fprintf(stderr, "FDir %s\n", fontdirs[nf]);
      FILE *inf = fopen(file.c_str(), "r");
      if (inf) {	   
	 while (!feof(inf)) {
	    static char s[1024];
	    fgets(&s[0], 1000, inf);
	    string t, tmps = s;
	    int i = tmps.find('-');
	    int l = subfn.size();
	    int n = strncasecmp(subfn.c_str(), &tmps.c_str()[i], l);
	    if (n == 0) {
	       fprintf(stderr, "FILE! [%s] [%s]\n", &s[0], tmps.substr(0, 
	       sprintf(s, "%s/%s", fontdirs[nf], tmps.substr(0, i-1).c_str());	      
	       if (strcmp(".gz", &s[strlen(s)-3])==0) {
		  char cmd[1024];
		  sprintf(cmd, "cp %s /tmp; gunzip /tmp/%s", s, tmps.substr(0, 
		  sprintf(s, "/tmp/%s", tmps.substr(0, i-1).c_str());
	       fname = &s[0];	       

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Flexible Keyboard is the ideal accessory for PDA users that are on the move.

  .-.   Wellington
  /V\   Linux
 // \\  Users       
/(   )\ Group

To unsubscribe from this group, send an email to:
wellylug-unsubscribe at egroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the wellylug mailing list