Author: jghali
Date: Sat Aug 26 11:16:17 2017
New Revision: 22145

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22145
Log:
put some qDebug() in comments

Modified:
    trunk/Scribus/scribus/fonts/sfnt.cpp
    trunk/Scribus/scribus/pdflib_core.cpp

Modified: trunk/Scribus/scribus/fonts/sfnt.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22145&path=/trunk/Scribus/scribus/fonts/sfnt.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/sfnt.cpp        (original)
+++ trunk/Scribus/scribus/fonts/sfnt.cpp        Sat Aug 26 11:16:17 2017
@@ -337,7 +337,7 @@
        QByteArray postData;
        FT_ULong size = 0;
        int error = FT_Load_Sfnt_Table ( face, TTAG_post , 0, NULL, &size );
-       qDebug() << "load post" << error << size;
+       //qDebug() << "load post" << error << size;
        if (error || size == 0)
        {
                errorMsg = "no post table";
@@ -447,7 +447,7 @@
        uint faceOffset = sfnt::word(coll, ttc_OffsetTables + 4 * faceIndex);
        uint nTables    = sfnt::word16(coll, faceOffset + ttf_numtables);
        
-       qDebug() << QObject::tr("extracting face %1 from font %2 (offset=%3, 
nTables=%4)").arg(faceIndex).arg("collection").arg(faceOffset).arg(nTables);
+       //qDebug() << QObject::tr("extracting face %1 from font %2 (offset=%3, 
nTables=%4)").arg(faceIndex).arg("collection").arg(faceOffset).arg(nTables);
        
        uint headerLength = ttf_TableRecords + ttf_TableRecord_Size * nTables;
        
@@ -563,7 +563,7 @@
 
        void writeTable(QByteArray& ttf, const QByteArray& tag, QByteArray& 
table)
        {
-               qDebug() << "writing table" << tag << table.size() << "@" << 
ttf.size();
+               //qDebug() << "writing table" << tag << table.size() << "@" << 
ttf.size();
                uint length = table.size();
                while (table.size() & 0x3)
                        table.append('\0');
@@ -637,14 +637,14 @@
                {
                        advance = word16(hmtx, pos);
                        leftSideBearing = word16(hmtx, pos+2);
-                       qDebug() << pos << "hmtx" << advance << leftSideBearing;
+                       //qDebug() << pos << "hmtx" << advance << 
leftSideBearing;
                        result.append(std::pair<qint16,quint16>(advance, 
leftSideBearing));
                        pos += 4;
                }
                while (pos < (uint) hmtx.length())
                {
                        leftSideBearing = word16(hmtx, pos);
-                       qDebug() << pos << "hmtx =" << advance << 
leftSideBearing;
+                       //qDebug() << pos << "hmtx =" << advance << 
leftSideBearing;
                        result.append(std::pair<qint16,quint16>(advance, 
leftSideBearing));
                        pos += 2;
                }
@@ -659,7 +659,7 @@
                int i = 0;
                for (it = longHorMetrics.cbegin(); it < longHorMetrics.cend(); 
++it)
                {
-                       qDebug() << "hmtx" << i++ << it->first << it->second;
+                       //qDebug() << "hmtx" << i++ << it->first << it->second;
                        appendWord16(result, it->first);
                        appendWord16(result, it->second);
                }
@@ -708,7 +708,7 @@
                        startOfUnicodeTable = startOfSymbolTable;
                        format = symbolFormat;
                }
-               qDebug() << "reading cmap format" << format;
+               //qDebug() << "reading cmap format" << format;
                switch(format)
                {
                        case 4:
@@ -743,7 +743,8 @@
                                                if (!result.contains(c))
                                                {
                                                        // search would always 
find the one in the segment with the lower endcode, i.e. earlier segment
-                                                       if (c < 256 || glyph == 
0) qDebug() << "(" << QChar(c) << "," << glyph << ")";
+                                                       if (c < 256 || glyph == 
0)
+                                                               //qDebug() << 
"(" << QChar(c) << "," << glyph << ")";
                                                        result[c] = glyph;
                                                }
                                                else
@@ -809,14 +810,14 @@
                
                QList<uint> chars;
                QMap<uint, uint>::ConstIterator cit;
-               qDebug() << "writing cmap";
+               //qDebug() << "writing cmap";
                bool cmapHasData = false;
                for(cit = cmap.cbegin(); cit != cmap.cend(); ++cit)
                {
                        uint ch = cit.key();
                        if (!QChar::requiresSurrogates(ch) && cit.value() != 0)
                        {
-                               qDebug() << "(" << QChar(cit.key()) << "," << 
cit.value() << ")";
+                               //qDebug() << "(" << QChar(cit.key()) << "," << 
cit.value() << ")";
                                chars.append(ch);
                                cmapHasData = true;
                        }
@@ -908,7 +909,7 @@
                        if (rangeOffsets[i] == 0)
                        {
                                quint16 dbg = startCodes[i] + idDeltas[i];
-                               qDebug() << QChar(startCodes[i]) << "-" << 
QChar(endCodes[i]) << "/" << (endCodes[i]-startCodes[i]+1) << "+" << 
idDeltas[i] << "-->" << dbg;
+                               //qDebug() << QChar(startCodes[i]) << "-" << 
QChar(endCodes[i]) << "/" << (endCodes[i]-startCodes[i]+1) << "+" << 
idDeltas[i] << "-->" << dbg;
                                putWord16(result, idRangeOffsetAddress, 0);
                        }
                        else
@@ -916,7 +917,7 @@
                                quint16 idRangeOffset = result.size() - 
idRangeOffsetAddress;
                                putWord16(result, idRangeOffsetAddress, 
idRangeOffset);
 
-                               qDebug() << QChar(startCodes[i]) << "-" << 
QChar(endCodes[i]) << "/" << (endCodes[i]-startCodes[i]+1) << "@" << 
idRangeOffset << "+" << idDeltas[i];
+                               //qDebug() << QChar(startCodes[i]) << "-" << 
QChar(endCodes[i]) << "/" << (endCodes[i]-startCodes[i]+1) << "@" << 
idRangeOffset << "+" << idDeltas[i];
 
                                uint startCode = startCodes[i];
                                uint segLength = (endCodes[i]-startCode+1);
@@ -1028,14 +1029,14 @@
                        {
                                // simple glyph
                                uint destStart = destGlyf.size();
-                               qDebug() << i++ << ":" << nrOfContours << 
"contours" << glyphStart << "-->" << destStart << "/" << glyphLength;
+                               //qDebug() << i++ << ":" << nrOfContours << 
"contours" << glyphStart << "-->" << destStart << "/" << glyphLength;
                                destGlyf.resize(destStart + glyphLength);
                                copy(destGlyf, destStart, srcGlyf, glyphStart, 
glyphLength);
                        }
                        else
                        {
                                
compositeElements.append(copyGlyphComponents(destGlyf, srcGlyf, glyphStart, 
newForOldGid, nextFreeGid));
-                               qDebug() << i++ << ":" << srcGid << "composite 
glyph brought" << compositeElements.size() << "more glyphs";
+                               //qDebug() << i++ << ":" << srcGid << 
"composite glyph brought" << compositeElements.size() << "more glyphs";
                        }
                        // Data must be aligned at least on 2 byte boundary, 
however
                        // a 4-byte alignment is recommended by TTF specs for 
reasons
@@ -1112,7 +1113,7 @@
                        {
                                if (glyphs.length() > 0)
                                {
-                                       qDebug() << "MAP" << QChar(it.key()) << 
it.value() << "-->" << newForOldGid[it.value()];
+                                       //qDebug() << "MAP" << QChar(it.key()) 
<< it.value() << "-->" << newForOldGid[it.value()];
                                        it.value() = newForOldGid[it.value()];
                                }
                                if (it.key() < firstChar)
@@ -1143,7 +1144,7 @@
                        QMap<uint,uint>::const_iterator iter;
                        for (iter = newForOldGid.cbegin(); iter != 
newForOldGid.cend(); ++iter)
                        {
-                               qDebug() << "hmtx" << iter.key() << " -> " << 
iter.value() << "=" << oldHmtx[iter.key()].first;
+                               //qDebug() << "hmtx" << iter.key() << " -> " << 
iter.value() << "=" << oldHmtx[iter.key()].first;
                                newHmtx[iter.value()] = oldHmtx[iter.key()];
                        }
                        tables["hmtx"] = writeHmtx(newHmtx);

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22145&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp       (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp       Sat Aug 26 11:16:17 2017
@@ -2159,7 +2159,7 @@
        for (int i = 0; i < glyphs.length(); ++i)
        {
                glyphmap[glyphs[i]] = i;
-               qDebug() << glyphs[i] << " --> " << i << 
QChar(fullEncoding[glyphs[i]].charcode);
+               //qDebug() << glyphs[i] << " --> " << i << 
QChar(fullEncoding[glyphs[i]].charcode);
        }
        
        PdfFont result = PDF_EncodeCidFont(fontName, face, subsetName, fontDes, 
fullEncoding, glyphmap);
@@ -2203,7 +2203,7 @@
        for (int i = 0; i < glyphs.length(); ++i)
        {
                glyphmap[glyphs[i]] = i;
-               qDebug() << glyphs[i] << " --> " << i << 
QChar(fullEncoding[glyphs[i]].charcode);
+               //qDebug() << glyphs[i] << " --> " << i << 
QChar(fullEncoding[glyphs[i]].charcode);
        }
        
        PdfFont result = PDF_EncodeCidFont(fontName, face, subsetName, fontDes, 
fullEncoding, glyphmap);


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to