On Sun, 11 Feb 2001, Tomas Frydrych wrote:

 Hi Tomas, 

 I'm sorry for testing your patch so late.
 For locale-specific fonts (which I was checking), m_fontfile doesn't contain
double slash, that's why it triggered the problem. It seems m_fontfile
for locale-specific fonts doesn't have double slash. 

 I wonder why you had any problems with double slash - it seems that any unix
allows any number of extra slashes in pathnames.
 
 
> Hi Vlad,
> thanks for taking your time on this. What does your m_fontfile 
> contain? My contains something like
> /usr/local/AbiSuite/fonts//tahoma.ttf -- note the double slash 
> between the font name and the path. I have initially tried to do 
> exactly what you do in the else branch, but ended up trying to open
> /usr/local/AbiSuite/fonts//tahoma.u2g, which it would refuse to 
> open because of the double slash. That's why I went looking for 
> "//"; the else branch was meant to try to open the file in current 
> directory, since I concluded that if there is no "//" then the the font 
> name is unqualified. We can, of course add an extra else if ... else
> to test for a single slash to, but what puzzles me is why on my 
> machine the font name is separated from the path by "//" and on 
> yours by single '/'. Any ideas?
> 
> I will make a small change so that we can satisfy both cases for 
> the time being.
> 
> Tomas
> 
> >                 else
> >                 {
> > -                   full_name = new char[20];
> > -                   *full_name = 0;
> > +                   full_name = new char[strlen(m_fontfile)+50];
> > +                   strcpy(full_name,m_fontfile);
> > +                   strrchr(full_name,'/')[1]=0;
> >                 }
> 

 Best regards,
  -Vlad


Reply via email to