r18354 by fschmid - Fixed Bug #11640: IDML should access 'Fonts' and 'Links' folder

scribus-commit scribus-commit at lists.scribus.net
Mon Jul 8 20:04:33 UTC 2013


Author: fschmid
Date: Mon Jul  8 20:04:33 2013
New Revision: 18354

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18354
Log:
Fixed Bug #11640: IDML should access 'Fonts' and 'Links' folder
Scribus searches now in
- Fonts
- fonts
- Document fonts
for used fonts.

Modified:
    trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18354&path=/trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidml.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidml.cpp Mon Jul  8 20:04:33 2013
@@ -2451,7 +2451,13 @@
 					if (fi.exists())
 						fileName = url.toLocalFile().toLocal8Bit();
 					else
+					{
 						fileName = fi.fileName().toLocal8Bit();
+						fileName.prepend("./Links/");
+						QFileInfo fi2(fileName);
+						if (!fi2.exists())
+							fileName = fi.fileName().toLocal8Bit();
+					}
 					item->AspectRatio = true;
 					if (imageFit == "None")
 						item->ScaleType   = true;

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18354&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Jul  8 20:04:33 2013
@@ -4038,10 +4038,16 @@
 		if (docProfileDir.exists())
 			ScCore->getCMSProfilesDir(fi.absolutePath()+"/profiles", false, false);
 
+		prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/", FName);
 		QDir docFontDir(fi.absolutePath() + "/fonts");
-		prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/", FName);
 		if (docFontDir.exists())
 			prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/fonts", FName);
+		QDir docFontDir2(fi.absolutePath() + "/Fonts");
+		if (docFontDir2.exists())
+			prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Fonts", FName);
+		QDir docFontDir3(fi.absolutePath() + "/Document fonts");
+		if (docFontDir3.exists())
+			prefsManager->appPrefs.fontPrefs.AvailFonts.AddScalableFonts(fi.absolutePath()+"/Document fonts", FName);
 		prefsManager->appPrefs.fontPrefs.AvailFonts.updateFontMap();
 
 		doc=new ScribusDoc();




More information about the scribus-commit mailing list