diff --recursive -c abi/abi/src/af/xap/unix/xap_UnixApp.cpp abidist/abi/src/af/xap/unix/xap_UnixApp.cpp *** abi/abi/src/af/xap/unix/xap_UnixApp.cpp Sun Aug 13 01:04:32 2000 --- abidist/abi/src/af/xap/unix/xap_UnixApp.cpp Fri Aug 4 10:37:45 2000 *************** *** 176,182 **** UT_Bool XAP_UnixApp::_loadFonts(void) { // create a font manager for our app to use ! int RelativePathsSoFar,RelativePathCount; m_fontManager = new XAP_UnixFontManager(); UT_ASSERT(m_fontManager); --- 176,182 ---- UT_Bool XAP_UnixApp::_loadFonts(void) { // create a font manager for our app to use ! m_fontManager = new XAP_UnixFontManager(); UT_ASSERT(m_fontManager); *************** *** 188,210 **** getPrefsValue(XAP_PREF_KEY_UnixFontPath, (const XML_Char**)&szPrefFontPath); UT_ASSERT((szPrefFontPath) && (*szPrefFontPath)); ! ! for (UT_uint32 i = RelativePathCount=0;szPrefFontPath[i];i++) { ! RelativePathCount+=(i==0||szPrefFontPath[i-1]==';')&&szPrefFontPath[i]!='/'; } ! for (UT_uint32 i = RelativePathsSoFar=0;szPrefFontPath[i];i++) ! if ((i==0||szPrefFontPath[i-1]==';')&&szPrefFontPath[i]!='/') // if relative path in prefs, prepend library directory. ! { ! szTemp = (char *)calloc(strlen(getAbiSuiteLibDir())+strlen(szPrefFontPath)+10,sizeof(char)); ! strcpy(szTemp,szPrefFontPath); ! sprintf(szTemp+i,"%s/%s",getAbiSuiteLibDir(),szPrefFontPath+i); ! if (RelativePathsSoFar) ! free(szPrefFontPath); ! szPrefFontPath = szTemp; ! RelativePathsSoFar++; ! } ! UT_ASSERT(RelativePathsSoFar==RelativePathCount); UT_DEBUGMSG(("Using FontPath from preferences [%s].\n",szPrefFontPath)); m_fontManager->setFontPath(szPrefFontPath); FREEP(szTemp); --- 188,201 ---- getPrefsValue(XAP_PREF_KEY_UnixFontPath, (const XML_Char**)&szPrefFontPath); UT_ASSERT((szPrefFontPath) && (*szPrefFontPath)); ! ! if (*szPrefFontPath != '/') // if relative path in prefs, prepend library directory. { ! szTemp = (char *)calloc(strlen(getAbiSuiteLibDir())+strlen(szPrefFontPath)+10,sizeof(char)); ! sprintf(szTemp,"%s/%s",getAbiSuiteLibDir(),szPrefFontPath); ! szPrefFontPath = szTemp; } ! UT_DEBUGMSG(("Using FontPath from preferences [%s].\n",szPrefFontPath)); m_fontManager->setFontPath(szPrefFontPath); FREEP(szTemp);