[Scribus] Fatal Error, No Postscript-Fonts
Michael Schloh von Bennewitz
michael.schloh
Thu May 22 16:57:07 CEST 2003
On Thu, May 22, 2003, Peter Linnell wrote:
>On Thu, 2003-05-22 at 10:08, Michael Schloh von Bennewitz wrote:
>> Our Scribus works on Solaris (and Linux maybe), but FreeBSD hangs before
>> displaying a single window or error message.
>
> Did you have to make any source code changes to get Scribus running on
> Solaris? Does this package run on sparc or x86? Does this require
> Xfree86 for Sun ? Sol8 or Sol9?
>
I patched the code quite a lot, and have only tested on Solaris 8 x86. Seems
like Solaris boxes in general come with their X server font paths
misconfigured, so you'll have to 'ln -s /usr/openwin/ /usr/X11R6/' first. Then
all should run well (with some 'missing module' warnings) with either the Sun
X server or XFree86.
My patch code is at the end of this email, and I'll send it to the maintainers
at their request.
>> Most of the system calls just before hanging seem to be fnctl(2). Scribus is
>> trying to manipulate a file descriptor that is already closed, as you can see
>> from the third line from the top.
>>
>> I tried looking through the code, especially 'scribus.cpp', but didn't get
>> very far. Seems like code near some call to loadIcon("AppIcon.xpm") is at
>> fault. Does anybody have an idea what is causing scribus to hang?
>
> <snip>
>
> That is something Paul and Franz will have to help you on. Sorry, not a
> programmer. But, as a guess is qt built with --thread ? Scribus requires
> qt-mt - could not tell from your spec file.
>
Our Qt package is kind of complicated, but both libqt and libqt-mt are
installed. I hope that Paul or Franz can help out.
Regards,
Michael
--------
The following patch can be applied by:
/tmp/$ ls
scribus-0.9.10
/tmp/$ patch -p1 <thisfile.patch
diff -Naur scribus-0.9.10.orig/scribus/scribus.cpp scribus-0.9.10/scribus/scribus.cpp
--- scribus-0.9.10.orig/scribus/scribus.cpp Sat Apr 19 12:09:44 2003
+++ scribus-0.9.10/scribus/scribus.cpp Tue May 13 16:07:27 2003
@@ -2877,7 +2877,7 @@
void ScribusApp::slotHelpAbout()
{
void *mo;
- char *error;
+ const char *error;
typedef About* (*sdem)(QWidget *d);
sdem demo;
QString pfad = PREL;
@@ -4433,7 +4433,7 @@
void ScribusApp::slotPrefsOrg()
{
void *mo;
- char *error;
+ const char *error;
typedef Preferences* (*sdem)(QWidget *d, preV *Vor);
sdem demo;
QString pfad = PREL;
@@ -4831,7 +4831,7 @@
PSLib* ScribusApp::getPSDriver(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
{
- char *error;
+ const char *error;
typedef PSLib* (*sdem)(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf);
sdem demo;
QString pfad = PREL;
@@ -4861,7 +4861,7 @@
PDFlib* ScribusApp::getPDFDriver()
{
- char *error;
+ const char *error;
typedef PDFlib* (*sdem)();
sdem demo;
QString pfad = PREL;
@@ -5418,7 +5418,7 @@
void ScribusApp::FinalizePlugs()
{
- char *error;
+ const char *error;
QMap<QString, PlugData>::Iterator it;
struct PlugData pda;
typedef void (*sdem2)();
@@ -5483,7 +5483,7 @@
void ScribusApp::CallDLL(QString name)
{
void *mo;
- char *error;
+ const char *error;
struct PlugData pda;
pda = PluginMap[name];
typedef void (*sdem)(QWidget *d, ScribusApp *plug);
@@ -5517,7 +5517,7 @@
bool ScribusApp::DLLName(QString name, QString *PName, int *typ, void **Zeig)
{
void *mo;
- char *error;
+ const char *error;
typedef QString (*sdem0)();
typedef int (*sdem1)();
typedef void (*sdem2)(QWidget *d, ScribusApp *plug);
diff -Naur scribus-0.9.10.orig/scribus/icc34.h scribus-0.9.10/scribus/icc34.h
--- scribus-0.9.10.orig/scribus/icc34.h Sun Mar 2 13:41:48 2003
+++ scribus-0.9.10/scribus/icc34.h Wed May 14 10:26:21 2003
@@ -180,10 +180,10 @@
typedef int32_t icSignature;
/* Unsigned integer numbers */
-typedef u_int8_t icUInt8Number;
-typedef u_int16_t icUInt16Number;
-typedef u_int32_t icUInt32Number;
-typedef u_int32_t icUInt64Number[2];
+typedef uint8_t icUInt8Number;
+typedef uint16_t icUInt16Number;
+typedef uint32_t icUInt32Number;
+typedef uint32_t icUInt64Number[2];
/* Signed numbers */
typedef int8_t icInt8Number;
@@ -193,7 +193,7 @@
/* Fixed numbers */
typedef int32_t icS15Fixed16Number;
-typedef u_int32_t icU16Fixed16Number;
+typedef uint32_t icU16Fixed16Number;
#else /* default definitions */
diff -Naur scribus-0.9.10.orig/scribus/scfonts_ttf.cpp scribus-0.9.10/scribus/scfonts_ttf.cpp
--- scribus-0.9.10.orig/scribus/scfonts_ttf.cpp Fri Apr 11 23:11:08 2003
+++ scribus-0.9.10/scribus/scfonts_ttf.cpp Wed May 14 10:25:46 2003
@@ -22,7 +22,7 @@
#endif
// #define doPost
-QString showTag(u_int32_t tag)
+QString showTag(uint32_t tag)
{
char tmp[5];
tmp[0]=(tag>>24) & 255;
@@ -80,8 +80,8 @@
SCFonts_Encoding OwnEncoding;
SCFonts_Encoding PostEncoding;
sc_TTFontError error;
- u_int16_t readBEUInt16();
- u_int32_t readBEUInt32();
+ uint16_t readBEUInt16();
+ uint32_t readBEUInt32();
bool readHeaders();
bool readOffsetTable();
@@ -120,7 +120,7 @@
bool GlyphNamesRead;
#endif
- QArray<u_int32_t> Loca;
+ QArray<uint32_t> Loca;
bool LocaRead;
QArray<tt_longHorMetric> Hmtx;
@@ -254,9 +254,9 @@
}
-u_int16_t sc_TTFont::readBEUInt16()
+uint16_t sc_TTFont::readBEUInt16()
{
- u_int16_t result=0;
+ uint16_t result=0;
unsigned char tmp[2];
char *t=reinterpret_cast<char *>(tmp);
if(file.readBlock(t,2)==2)
@@ -267,9 +267,9 @@
}
-u_int32_t sc_TTFont::readBEUInt32()
+uint32_t sc_TTFont::readBEUInt32()
{
- u_int32_t result=0;
+ uint32_t result=0;
unsigned char tmp[4];
char *t=reinterpret_cast<char *>(tmp);
if(file.readBlock(t,4)==4)
@@ -456,7 +456,7 @@
return(true);
struct {
fxp16_16_t version;
- u_int16_t nglyphs;
+ uint16_t nglyphs;
} data;
file.at(entries[o_maxp].offset);
@@ -561,7 +561,7 @@
error=sc_TTFBadFile;
return(false);
}
- u_int16_t nglyphsps = readBEUInt16();
+ uint16_t nglyphsps = readBEUInt16();
if(nglyphsps!=nGlyphs)
std::cout << "Warning: nGlyphs should be consistent between head and post" << endl;
@@ -765,9 +765,9 @@
#if 0 // Need to implement Mac encoding sometime...
struct CmapFormat0
{
- u_int16_t format;
- u_int16_t length;
- u_int16_t language;
+ uint16_t format;
+ uint16_t length;
+ uint16_t language;
char glyphIdArray[256];
};
#endif
@@ -794,7 +794,7 @@
}
int segCount=tcm.segCountX2/2;
- u_int16_t *data=new u_int16_t[segCount*4];
+ uint16_t *data=new uint16_t[segCount*4];
if(!(data))
{
@@ -831,7 +831,7 @@
int idarraylength=(tcm.length-(16+8*segCount))/2;
- u_int16_t *idarray = new u_int16_t[idarraylength];
+ uint16_t *idarray = new uint16_t[idarraylength];
for(int i=0;i<idarraylength;++i)
idarray[i]=readBEUInt16();
if(error)
diff -Naur scribus-0.9.10.orig/scribus/scfonts_ttftypes.h scribus-0.9.10/scribus/scfonts_ttftypes.h
--- scribus-0.9.10.orig/scribus/scfonts_ttftypes.h Sun Mar 2 13:40:52 2003
+++ scribus-0.9.10/scribus/scfonts_ttftypes.h Wed May 14 10:26:41 2003
@@ -10,7 +10,7 @@
struct fxp16_16_t
{
int16_t mantissa;
- u_int16_t fraction;
+ uint16_t fraction;
};
struct tt_datetime_t
@@ -18,25 +18,25 @@
char data[8];
};
-typedef u_int16_t fxp14_2_t;
+typedef uint16_t fxp14_2_t;
struct OffsetTable
{
fxp16_16_t version;
- u_int16_t numTables;
- u_int16_t searchRange;
- u_int16_t entrySelector;
- u_int16_t rangeShift;
+ uint16_t numTables;
+ uint16_t searchRange;
+ uint16_t entrySelector;
+ uint16_t rangeShift;
}; // 12 bytes
struct TableDirEntry
{
- u_int32_t tag;
- u_int32_t checkSum;
- u_int32_t offset;
- u_int32_t length;
+ uint32_t tag;
+ uint32_t checkSum;
+ uint32_t offset;
+ uint32_t length;
}; // 16 bytes
@@ -44,19 +44,19 @@
{
fxp16_16_t version;
fxp16_16_t fontRevision;
- u_int32_t checkSumAdjustment;
- u_int32_t magicNumber;
- u_int16_t flags;
- u_int16_t unitsPerEm;
+ uint32_t checkSumAdjustment;
+ uint32_t magicNumber;
+ uint16_t flags;
+ uint16_t unitsPerEm;
tt_datetime_t created;
tt_datetime_t modified;
int16_t xMin;
int16_t yMin;
int16_t xMax;
int16_t yMax;
- u_int16_t macStyle;
- u_int16_t lowestRecPPEM;
- u_int16_t fontDirectionHint;
+ uint16_t macStyle;
+ uint16_t lowestRecPPEM;
+ uint16_t fontDirectionHint;
int16_t indexToLocFormat;
int16_t glyphDataFormat;
};
@@ -65,12 +65,12 @@
struct NameRecord
{
- u_int16_t platformID;
- u_int16_t encodingID;
- u_int16_t languageID;
- u_int16_t nameID;
- u_int16_t length;
- u_int16_t offset;
+ uint16_t platformID;
+ uint16_t encodingID;
+ uint16_t languageID;
+ uint16_t nameID;
+ uint16_t length;
+ uint16_t offset;
};
/*------------------------------------------------------------*/
@@ -83,9 +83,9 @@
int16_t underlineThickness;
int32_t isFixedPitch;
int32_t minMemType42;
- u_int32_t maxMemType42;
- u_int32_t minMemType1;
- u_int32_t maxMemType1;
+ uint32_t maxMemType42;
+ uint32_t minMemType1;
+ uint32_t maxMemType1;
};
struct Post_GlyphName
@@ -101,40 +101,40 @@
struct CmapTable
{
- u_int16_t version;
- u_int16_t numTables;
+ uint16_t version;
+ uint16_t numTables;
};
struct CmapHeader
{
- u_int16_t platformID;
- u_int16_t encodingID;
- u_int32_t offset;
+ uint16_t platformID;
+ uint16_t encodingID;
+ uint32_t offset;
};
struct CmapFormat0
{
- u_int16_t format;
- u_int16_t length;
- u_int16_t language;
+ uint16_t format;
+ uint16_t length;
+ uint16_t language;
char glyphIdArray[256];
};
struct CmapFormat4
{
- u_int16_t format;
- u_int16_t length;
- u_int16_t language;
- u_int16_t segCountX2;
- u_int16_t searchRange;
- u_int16_t entrySelector;
- u_int16_t rangeShift;
- u_int16_t *endCount;
- u_int16_t reservedPad;
- u_int16_t *startCount;
- u_int16_t *idDelta;
- u_int16_t *idRangeOffset;
- u_int16_t *glyphIdArray;
+ uint16_t format;
+ uint16_t length;
+ uint16_t language;
+ uint16_t segCountX2;
+ uint16_t searchRange;
+ uint16_t entrySelector;
+ uint16_t rangeShift;
+ uint16_t *endCount;
+ uint16_t reservedPad;
+ uint16_t *startCount;
+ uint16_t *idDelta;
+ uint16_t *idRangeOffset;
+ uint16_t *glyphIdArray;
};
/*-----------------------------------------------------------------*/
@@ -145,7 +145,7 @@
int16_t Ascender;
int16_t Descender;
int16_t LineGap;
- u_int16_t advanceWidthMax;
+ uint16_t advanceWidthMax;
int16_t minLeftSideBearing;
int16_t minRightSideBearing;
int16_t xMaxExtent;
@@ -153,7 +153,7 @@
int16_t caretSlopeRun;
int16_t reserved[5];
int16_t metricDataFormat;
- u_int16_t numberOfHMetrics;
+ uint16_t numberOfHMetrics;
};
struct tt_Box
@@ -166,7 +166,7 @@
struct tt_longHorMetric
{
- u_int16_t advanceWidth;
+ uint16_t advanceWidth;
int16_t lsb;
};
@@ -174,15 +174,15 @@
struct KernTable
{
- u_int16_t version;
- u_int16_t nTables;
+ uint16_t version;
+ uint16_t nTables;
};
struct KernSubTableHeader
{
- u_int16_t version;
- u_int16_t length;
- u_int16_t coverage;
+ uint16_t version;
+ uint16_t length;
+ uint16_t coverage;
};
#define kernHorizontal 0x0001
@@ -193,16 +193,16 @@
struct KernSubTable
{
- u_int16_t nPairs;
- u_int16_t searchRange;
- u_int16_t entrySelector;
- u_int16_t rangeShift;
+ uint16_t nPairs;
+ uint16_t searchRange;
+ uint16_t entrySelector;
+ uint16_t rangeShift;
};
struct KernEntry
{
- u_int16_t left;
- u_int16_t right;
+ uint16_t left;
+ uint16_t right;
int16_t value;
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 467 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20030522/917a4ed3/attachment.pgp
More information about the scribus
mailing list