Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qfontsubset.cpp

    r396 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    334334    }
    335335    if (name[0]) {
    336         s << "/" << name;
     336        s << '/' << name;
    337337    } else
    338338#endif
     
    340340    if (fontEngine->type() == QFontEngine::XLFD) {
    341341        uint uc = static_cast<QFontEngineXLFD *>(fontEngine)->toUnicode(glyphIndex);
    342         s << "/" << glyphName(uc, false /* ### */);
     342        s << '/' << glyphName(uc, false /* ### */);
    343343    } else
    344344#endif
    345345    if (reverseMap[glyphIndex] && reverseMap[glyphIndex] < 0x10000) {
    346         s << "/" << glyphName(reverseMap[glyphIndex], false);
     346        s << '/' << glyphName(reverseMap[glyphIndex], false);
    347347    } else {
    348348        s << "/gl" << (int)glyphIndex;
     
    396396            // qDebug("    startLinear=%x endnonlinear=%x", startLinear,endnonlinear);
    397397            if (endnonlinear > start) {
    398                 s << start << "[";
     398                s << start << '[';
    399399                for (int i = start; i < endnonlinear; ++i)
    400400                    s << (widths[i]*scale).toInt();
     
    402402            }
    403403            if (startLinear)
    404                 s << startLinear << g - 1 << (widths[startLinear]*scale).toInt() << "\n";
     404                s << startLinear << g - 1 << (widths[startLinear]*scale).toInt() << '\n';
    405405        }
    406406        s << "]\n";
     
    489489        // qDebug("    startLinear=%x endnonlinear=%x", startLinear,endnonlinear);
    490490        if (endnonlinear > start) {
    491             s << "<" << QPdf::toHex((ushort)start, buf) << "> <";
     491            s << '<' << QPdf::toHex((ushort)start, buf) << "> <";
    492492            s << QPdf::toHex((ushort)(endnonlinear - 1), buf) << "> ";
    493493            if (endnonlinear == start + 1) {
    494                 s << "<" << QPdf::toHex((ushort)reverseMap[start], buf) << ">\n";
     494                s << '<' << QPdf::toHex((ushort)reverseMap[start], buf) << ">\n";
    495495            } else {
    496                 s << "[";
     496                s << '[';
    497497                for (int i = start; i < endnonlinear; ++i) {
    498                     s << "<" << QPdf::toHex((ushort)reverseMap[i], buf) << "> ";
     498                    s << '<' << QPdf::toHex((ushort)reverseMap[i], buf) << "> ";
    499499                }
    500500                s << "]\n";
     
    509509                if ((uc_end >> 8) != (uc_start >> 8))
    510510                    len = 256 - (uc_start & 0xff);
    511                 s << "<" << QPdf::toHex((ushort)startLinear, buf) << "> <";
     511                s << '<' << QPdf::toHex((ushort)startLinear, buf) << "> <";
    512512                s << QPdf::toHex((ushort)(startLinear + len - 1), buf) << "> ";
    513                 s << "<" << QPdf::toHex((ushort)reverseMap[startLinear], buf) << ">\n";
     513                s << '<' << QPdf::toHex((ushort)reverseMap[startLinear], buf) << ">\n";
    514514                checkRanges(ts, ranges, nranges);
    515515                startLinear += len;
     
    16561656    QByteArray id = QByteArray::number(object_id);
    16571657    QByteArray psname = properties.postscriptName;
    1658     psname.replace(" ", "");
     1658    psname.replace(' ', "");
    16591659
    16601660    standard_font = false;
     
    16821682    s << "/F" << id << "-Base\n";
    16831683    if (standard_font) {
    1684             s << "/" << psname << " findfont\n"
     1684            s << '/' << psname << " findfont\n"
    16851685                "0 dict copy dup /NumGlyphs 0 put dup /CMap 256 array put def\n";
    16861686    } else {
    16871687        s << "<<\n";
    16881688        if(!psname.isEmpty())
    1689             s << "/FontName /" << psname << "\n";
     1689            s << "/FontName /" << psname << '\n';
    16901690        s << "/FontInfo <</FsType " << (int)fontEngine->fsType << ">>\n"
    16911691            "/FontType 1\n"
     
    17231723    QByteArray id = QByteArray::number(object_id);
    17241724
    1725     s << "F" << id << "-Base [\n";
     1725    s << 'F' << id << "-Base [\n";
    17261726    for (int i = downloaded_glyphs; i < nGlyphs; ++i) {
    17271727        glyph_t g = glyph_indices.at(i);
Note: See TracChangeset for help on using the changeset viewer.