#include <qdebug.h>
#include "qfontsubset_p.h"
#include <qendian.h>
#include <qpainterpath.h>
#include "private/qpdf_p.h"
Include dependency graph for qfontsubset.cpp:

Go to the source code of this file.
Classes | |
| class | QTtfStream |
| struct | QTtfTable |
| struct | qttf_head_table |
| struct | qttf_hhea_table |
| struct | qttf_maxp_table |
| struct | qttf_name_table |
| struct | qttf_font_tables |
| struct | QTtfGlyph |
| struct | QTtfNameRecord |
| struct | TTF_POINT |
Defines | |
| #define | MAKE_TAG(str) |
| #define | TAG(x) char(t.tag >> 24) << char((t.tag >> 16) & 0xff) << char((t.tag >> 8) & 0xff) << char(t.tag & 0xff) |
| #define | TO_TTF(x) qRound(x * 2048. / ppem) |
Typedefs | |
| typedef qint16 | F2DOT14 |
| typedef quint32 | Tag |
| typedef quint16 | GlyphID |
| typedef quint16 | Offset |
Enumerations | |
| enum | Flags |
Functions | |
| static FT_Face | ft_face (const QFontEngine *engine) |
| static void | checkRanges (QPdf::ByteStream &ts, QByteArray &ranges, int &nranges) |
| Q_DECLARE_TYPEINFO (QTtfTable, Q_MOVABLE_TYPE) | |
| static QTtfTable | generateHead (const qttf_head_table &head) |
| static QTtfTable | generateHhea (const qttf_hhea_table &hhea) |
| static QTtfTable | generateMaxp (const qttf_maxp_table &maxp) |
| static QTtfTable | generateName (const qttf_name_table &name) |
| Q_DECLARE_TYPEINFO (QTtfGlyph, Q_MOVABLE_TYPE) | |
| static QTtfGlyph | generateGlyph (int index, const QPainterPath &path, qreal advance, qreal lsb, qreal ppem) |
| static QList< QTtfTable > | generateGlyphTables (qttf_font_tables &tables, const QList< QTtfGlyph > &_glyphs) |
| static QByteArray | bindFont (const QList< QTtfTable > &_tables) |
| static quint32 | checksum (const QByteArray &table) |
| static QTtfTable | generateName (const QList< QTtfNameRecord > &name) |
| Q_DECLARE_TYPEINFO (TTF_POINT, Q_PRIMITIVE_TYPE) | |
| static void | convertPath (const QPainterPath &path, QList< TTF_POINT > *points, QList< int > *endPoints, qreal ppem) |
| static void | getBounds (const QList< TTF_POINT > &points, qint16 *xmin, qint16 *xmax, qint16 *ymin, qint16 *ymax) |
| static int | convertToRelative (QList< TTF_POINT > *points) |
| static void | getGlyphData (QTtfGlyph *glyph, const QList< TTF_POINT > &points, const QList< int > &endPoints, int point_array_size) |
| static bool | operator< (const QTtfGlyph &g1, const QTtfGlyph &g2) |
| static bool | operator< (const QTtfTable &t1, const QTtfTable &t2) |
| static const char * | encodeNumber (int num, char *tmp) |
| static QByteArray | charString (const QPainterPath &path, qreal advance, qreal lsb, qreal ppem) |
Variables | |
| static const char *const | agl |
| struct { | |
| quint16 u | |
| quint16 index | |
| } | unicode_to_aglindex [] |
| static const unsigned short | symbol_map [0x100] |
| static const char * | helvetica_styles [4] |
| static const char * | times_styles [4] |
| static const char * | courier_styles [4] |
| #define MAKE_TAG | ( | str | ) |
Value:
( ( (quint32)str[0] << 24 ) | \ ( (quint32)str[1] << 16 ) | \ ( (quint32)str[2] << 8 ) | \ (quint32)str[3] )
Definition at line 535 of file qfontsubset.cpp.
Referenced by bindFont(), generateGlyphTables(), generateHead(), generateHhea(), generateMaxp(), generateName(), and QFontSubset::toTruetype().
| #define TAG | ( | x | ) | char(t.tag >> 24) << char((t.tag >> 16) & 0xff) << char((t.tag >> 8) & 0xff) << char(t.tag & 0xff) |
Referenced by QFragmentMapData::init().
| #define TO_TTF | ( | x | ) | qRound(x * 2048. / ppem) |
Referenced by QFontSubset::toTruetype().
Definition at line 510 of file qfontsubset.cpp.
Definition at line 512 of file qfontsubset.cpp.
Definition at line 513 of file qfontsubset.cpp.
Definition at line 511 of file qfontsubset.cpp.
| enum Flags |
Definition at line 899 of file qfontsubset.cpp.
00899 { 00900 OffCurve = 0, 00901 OnCurve = (1 << 0), 00902 XShortVector = (1 << 1), 00903 YShortVector = (1 << 2), 00904 Repeat = (1 << 3), 00905 XSame = (1 << 4), 00906 XShortPositive = (1 << 4), 00907 YSame = (1 << 5), 00908 YShortPositive = (1 << 5) 00909 };
| static QByteArray bindFont | ( | const QList< QTtfTable > & | _tables | ) | [static] |
Definition at line 1270 of file qfontsubset.cpp.
References QList< T >::at(), checksum(), QTtfTable::data, QByteArray::data(), i, MAKE_TAG, n, qSort(), qToBigEndian(), qWarning(), QByteArray::resize(), s, QList< T >::size(), size, and t.
Referenced by QFontSubset::toTruetype().
01271 { 01272 QList<QTtfTable> tables = _tables; 01273 01274 qSort(tables); 01275 01276 QByteArray font; 01277 const int header_size = sizeof(qint32) + 4*sizeof(quint16); 01278 const int directory_size = 4*sizeof(quint32)*tables.size(); 01279 font.resize(header_size + directory_size); 01280 01281 int log2 = 0; 01282 int pow = 1; 01283 int n = tables.size() >> 1; 01284 while (n) { 01285 ++log2; 01286 pow <<= 1; 01287 n >>= 1; 01288 } 01289 01290 quint32 head_offset = 0; 01291 { 01292 QTtfStream f(font); 01293 // Offset Table 01294 // Type Name Description 01295 // qint32 sfnt version 0x00010000 for version 1.0. 01296 // quint16 numTables Number of tables. 01297 // quint16 searchRange (Maximum power of 2 <= numTables) x 16. 01298 // quint16 entrySelector Log2(maximum power of 2 <= numTables). 01299 // quint16 rangeShift NumTables x 16-searchRange. 01300 f << qint32(0x00010000) 01301 << quint16(tables.size()) 01302 << quint16(16*pow) 01303 << quint16(log2) 01304 << quint16(16*(tables.size() - pow)); 01305 01306 // Table Directory 01307 // Type Name Description 01308 // quint32 tag 4 -byte identifier. 01309 // quint32 checkSum CheckSum for this table. 01310 // quint32 offset Offset from beginning of TrueType font file. 01311 // quint32 length Length of this table. 01312 quint32 table_offset = header_size + directory_size; 01313 for (int i = 0; i < tables.size(); ++i) { 01314 const QTtfTable &t = tables.at(i); 01315 const quint32 size = (t.data.size() + 3) & ~3; 01316 if (t.tag == MAKE_TAG("head")) 01317 head_offset = table_offset; 01318 f << t.tag 01319 << checksum(t.data) 01320 << table_offset 01321 << t.data.size(); 01322 table_offset += size; 01323 #define TAG(x) char(t.tag >> 24) << char((t.tag >> 16) & 0xff) << char((t.tag >> 8) & 0xff) << char(t.tag & 0xff) 01324 //qDebug() << "table " << TAG(t.tag) << "has size " << t.data.size() << "stream at " << f.offset(); 01325 } 01326 } 01327 for (int i = 0; i < tables.size(); ++i) { 01328 const QByteArray &t = tables.at(i).data; 01329 font += t; 01330 int s = t.size(); 01331 while (s & 3) { font += '\0'; ++s; } 01332 } 01333 01334 if (!head_offset) { 01335 qWarning("QFontSubset: Font misses 'head' table"); 01336 return QByteArray(); 01337 } 01338 01339 // calculate the fonts checksum and qToBigEndian into 'head's checksum_adjust 01340 quint32 checksum_adjust = 0xB1B0AFBA - checksum(font); 01341 qToBigEndian(checksum_adjust, (uchar *)font.data() + head_offset + 8); 01342 01343 return font; 01344 }
Here is the call graph for this function:

| static QByteArray charString | ( | const QPainterPath & | path, | |
| qreal | advance, | |||
| qreal | lsb, | |||
| qreal | ppem | |||
| ) | [static] |
Definition at line 1506 of file qfontsubset.cpp.
References QPainterPath::CurveToElement, encodeNumber(), i, QByteArray::insert(), QByteArray::length(), QPainterPath::LineToElement, QPainterPath::MoveToElement, path, qRound(), type, QPainterPath::Element::x, x, QPainterPath::Element::y, and y.
Referenced by QFontSubset::type1AddedGlyphs().
01507 { 01508 // the charstring commands we need 01509 const char *hsbw = "0D"; 01510 const char *closepath = "09"; 01511 const char *moveto[3] = { "16", "04", "15" }; 01512 const char *lineto[3] = { "06", "07", "05" }; 01513 const char *rcurveto = "08"; 01514 const char *endchar = "0E"; 01515 01516 enum { horizontal = 1, vertical = 2 }; 01517 01518 char tmp[16]; 01519 01520 qreal factor = 1000./ppem; 01521 01522 int lsb_i = qRound(lsb*factor); 01523 int advance_i = qRound(advance*factor); 01524 // qDebug("--- charstring"); 01525 01526 // first of all add lsb and width to the charstring using the hsbw command 01527 QByteArray charstring; 01528 charstring += encodeNumber(lsb_i, tmp); 01529 charstring += encodeNumber(advance_i, tmp); 01530 charstring += hsbw; 01531 01532 // add the path 01533 int xl = lsb_i; 01534 int yl = 0; 01535 bool openpath = false; 01536 for (int i = 0; i < path.elementCount(); ++i) { 01537 const QPainterPath::Element &elm = path.elementAt(i); 01538 int x = qRound(elm.x*factor); 01539 int y = -qRound(elm.y*factor); 01540 int dx = x - xl; 01541 int dy = y - yl; 01542 if (elm.type == QPainterPath::MoveToElement && openpath) { 01543 // qDebug("closepath %s", closepath); 01544 charstring += closepath; 01545 } 01546 if (elm.type == QPainterPath::MoveToElement || 01547 elm.type == QPainterPath::LineToElement) { 01548 int type = -1; 01549 if (dx || !dy) { 01550 charstring += encodeNumber(dx, tmp); 01551 type += horizontal; 01552 // qDebug("horizontal"); 01553 } 01554 if (dy) { 01555 charstring += encodeNumber(dy, tmp); 01556 type += vertical; 01557 // qDebug("vertical"); 01558 } 01559 // qDebug("moveto/lineto %s", (elm.type == QPainterPath::MoveToElement ? moveto[type] : lineto[type])); 01560 charstring += (elm.type == QPainterPath::MoveToElement ? moveto[type] : lineto[type]); 01561 openpath = true; 01562 xl = x; 01563 yl = y; 01564 } else { 01565 Q_ASSERT(elm.type == QPainterPath::CurveToElement); 01566 const QPainterPath::Element &elm2 = path.elementAt(++i); 01567 const QPainterPath::Element &elm3 = path.elementAt(++i); 01568 int x2 = qRound(elm2.x*factor); 01569 int y2 = -qRound(elm2.y*factor); 01570 int x3 = qRound(elm3.x*factor); 01571 int y3 = -qRound(elm3.y*factor); 01572 charstring += encodeNumber(dx, tmp); 01573 charstring += encodeNumber(dy, tmp); 01574 charstring += encodeNumber(x2 - x, tmp); 01575 charstring += encodeNumber(y2 - y, tmp); 01576 charstring += encodeNumber(x3 - x2, tmp); 01577 charstring += encodeNumber(y3 - y2, tmp); 01578 charstring += rcurveto; 01579 openpath = true; 01580 xl = x3; 01581 yl = y3; 01582 // qDebug("rcurveto"); 01583 } 01584 } 01585 if (openpath) 01586 charstring += closepath; 01587 charstring += endchar; 01588 if (charstring.length() > 240) { 01589 int pos = 240; 01590 while (pos < charstring.length()) { 01591 charstring.insert(pos, '\n'); 01592 pos += 241; 01593 } 01594 } 01595 return charstring; 01596 }
Here is the call graph for this function:

| static void checkRanges | ( | QPdf::ByteStream & | ts, | |
| QByteArray & | ranges, | |||
| int & | nranges | |||
| ) | [static] |
Definition at line 377 of file qfontsubset.cpp.
Referenced by QFontSubset::createToUnicodeMap().
00378 { 00379 if (++nranges > 100) { 00380 ts << nranges << "beginbfrange\n" 00381 << ranges << "endbfrange\n"; 00382 ranges = QByteArray(); 00383 nranges = 0; 00384 } 00385 }
| static quint32 checksum | ( | const QByteArray & | table | ) | [static] |
Definition at line 626 of file qfontsubset.cpp.
References QByteArray::constData(), d, qFromBigEndian< quint32 >(), shift(), QByteArray::size(), and x.
Referenced by bindFont().
00627 { 00628 quint32 sum = 0; 00629 int offset = 0; 00630 const uchar *d = (uchar *)table.constData(); 00631 while (offset <= table.size()-3) { 00632 sum += qFromBigEndian<quint32>(d + offset); 00633 offset += 4; 00634 } 00635 int shift = 24; 00636 quint32 x = 0; 00637 while (offset < table.size()) { 00638 x |= ((quint32)d[offset]) << shift; 00639 ++offset; 00640 shift -= 8; 00641 } 00642 sum += x; 00643 00644 return sum; 00645 }
Here is the call graph for this function:

| static void convertPath | ( | const QPainterPath & | path, | |
| QList< TTF_POINT > * | points, | |||
| QList< int > * | endPoints, | |||
| qreal | ppem | |||
| ) | [static] |
Definition at line 917 of file qfontsubset.cpp.
References a, QList< T >::append(), QList< T >::at(), b, base, c, QPainterPath::CurveToDataElement, QPainterPath::CurveToElement, d, TTF_POINT::flags, flags, i, QPainterPath::LineToElement, QPainterPath::MoveToElement, OffCurve, OnCurve, p, path, qRound(), QList< T >::size(), start, QList< T >::takeLast(), TTF_POINT::x, QPainterPath::Element::x, x, TTF_POINT::y, QPainterPath::Element::y, and y.
Referenced by generateGlyph().
00918 { 00919 int numElements = path.elementCount(); 00920 for (int i = 0; i < numElements - 1; ++i) { 00921 const QPainterPath::Element &e = path.elementAt(i); 00922 TTF_POINT p; 00923 p.x = qRound(e.x * 2048. / ppem); 00924 p.y = qRound(-e.y * 2048. / ppem); 00925 00926 switch(e.type) { 00927 case QPainterPath::MoveToElement: 00928 if (i != 0) { 00929 // see if start and end points of the last contour agree 00930 int start = endPoints->size() ? endPoints->at(endPoints->size()-1) - 1 : 0; 00931 int end = points->size() - 1; 00932 if (points->at(end).x == points->at(start).x 00933 && points->at(end).y == points->at(start).y) 00934 points->takeLast(); 00935 endPoints->append(points->size() - 1); 00936 } 00937 // fall through 00938 case QPainterPath::LineToElement: 00939 p.flags = OnCurve; 00940 break; 00941 case QPainterPath::CurveToElement: { 00942 // cubic bezier curve, we need to reduce to a list of quadratic curves 00943 TTF_POINT list[3*16 + 4]; // we need max 16 subdivisions 00944 list[3] = points->at(points->size() - 1); 00945 list[2] = p; 00946 const QPainterPath::Element &e2 = path.elementAt(++i); 00947 list[1].x = qRound(e2.x * 2048. / ppem); 00948 list[1].y = qRound(-e2.y * 2048. / ppem); 00949 const QPainterPath::Element &e3 = path.elementAt(++i); 00950 list[0].x = qRound(e3.x * 2048. / ppem); 00951 list[0].y = qRound(-e3.y * 2048. / ppem); 00952 00953 TTF_POINT *base = list; 00954 00955 bool try_reduce = points->size() > 1 00956 && points->at(points->size() - 1).flags == OnCurve 00957 && points->at(points->size() - 2).flags == OffCurve; 00958 // qDebug("generating beziers:"); 00959 while (base >= list) { 00960 const int split_limit = 3; 00961 // { 00962 // qDebug("iteration:"); 00963 // TTF_POINT *x = list; 00964 // while (x <= base + 3) { 00965 // qDebug() << " " << QPoint(x->x, x->y); 00966 // ++x; 00967 // } 00968 // } 00969 Q_ASSERT(base - list < 3*16 + 1); 00970 // first see if we can easily reduce the cubic to a quadratic bezier curve 00971 int i1_x = base[1].x + ((base[1].x - base[0].x) >> 1); 00972 int i1_y = base[1].y + ((base[1].y - base[0].y) >> 1); 00973 int i2_x = base[2].x + ((base[2].x - base[3].x) >> 1); 00974 int i2_y = base[2].y + ((base[2].y - base[3].y) >> 1); 00975 // qDebug() << "checking: i1=" << QPoint(i1_x, i1_y) << " i2=" << QPoint(i2_x, i2_y); 00976 if (qAbs(i1_x - i2_x) <= split_limit && qAbs(i1_y - i2_y) <= split_limit) { 00977 // got a quadratic bezier curve 00978 TTF_POINT np; 00979 np.x = (i1_x + i2_x) >> 1; 00980 np.y = (i1_y + i2_y) >> 1; 00981 if (try_reduce) { 00982 // see if we can optimise out the last onCurve point 00983 int mx = (points->at(points->size() - 2).x + base[2].x) >> 1; 00984 int my = (points->at(points->size() - 2).y + base[2].y) >> 1; 00985 if (qAbs(mx - base[3].x) <= split_limit && qAbs(my = base[3].y) <= split_limit) 00986 points->takeLast(); 00987 try_reduce = false; 00988 } 00989 np.flags = OffCurve; 00990 points->append(np); 00991 // qDebug() << " appending offcurve point " << QPoint(np.x, np.y); 00992 base -= 3; 00993 } else { 00994 // need to split 00995 // qDebug() << " -> splitting"; 00996 qint16 a, b, c, d; 00997 base[6].x = base[3].x; 00998 c = base[1].x; 00999 d = base[2].x; 01000 base[1].x = a = ( base[0].x + c ) >> 1; 01001 base[5].x = b = ( base[3].x + d ) >> 1; 01002 c = ( c + d ) >> 1; 01003 base[2].x = a = ( a + c ) >> 1; 01004 base[4].x = b = ( b + c ) >> 1; 01005 base[3].x = ( a + b ) >> 1; 01006 01007 base[6].y = base[3].y; 01008 c = base[1].y; 01009 d = base[2].y; 01010 base[1].y = a = ( base[0].y + c ) >> 1; 01011 base[5].y = b = ( base[3].y + d ) >> 1; 01012 c = ( c + d ) >> 1; 01013 base[2].y = a = ( a + c ) >> 1; 01014 base[4].y = b = ( b + c ) >> 1; 01015 base[3].y = ( a + b ) >> 1; 01016 base += 3; 01017 } 01018 } 01019 p = list[0]; 01020 p.flags = OnCurve; 01021 break; 01022 } 01023 case QPainterPath::CurveToDataElement: 01024 Q_ASSERT(false); 01025 break; 01026 } 01027 // qDebug() << " appending oncurve point " << QPoint(p.x, p.y); 01028 points->append(p); 01029 } 01030 int start = endPoints->size() ? endPoints->at(endPoints->size()-1) + 1 : 0; 01031 int end = points->size() - 1; 01032 if (points->at(end).x == points->at(start).x 01033 && points->at(end).y == points->at(start).y) 01034 points->takeLast(); 01035 endPoints->append(points->size() - 1); 01036 }
Here is the call graph for this function:

Definition at line 1053 of file qfontsubset.cpp.
References QList< T >::at(), TTF_POINT::flags, i, QList< T >::size(), TTF_POINT::x, x, XSame, XShortPositive, XShortVector, TTF_POINT::y, y, YSame, YShortPositive, and YShortVector.
Referenced by generateGlyph().
01054 { 01055 // convert points to relative and setup flags 01056 // qDebug() << "relative points:"; 01057 qint16 prev_x = 0; 01058 qint16 prev_y = 0; 01059 int point_array_size = 0; 01060 for (int i = 0; i < points->size(); ++i) { 01061 const int x = points->at(i).x; 01062 const int y = points->at(i).y; 01063 TTF_POINT rel; 01064 rel.x = x - prev_x; 01065 rel.y = y - prev_y; 01066 rel.flags = points->at(i).flags; 01067 Q_ASSERT(rel.flags < 2); 01068 if (!rel.x) { 01069 rel.flags |= XSame; 01070 } else if (rel.x > 0 && rel.x < 256) { 01071 rel.flags |= XShortVector|XShortPositive; 01072 point_array_size++; 01073 } else if (rel.x < 0 && rel.x > -256) { 01074 rel.flags |= XShortVector; 01075 rel.x = -rel.x; 01076 point_array_size++; 01077 } else { 01078 point_array_size += 2; 01079 } 01080 if (!rel.y) { 01081 rel.flags |= YSame; 01082 } else if (rel.y > 0 && rel.y < 256) { 01083 rel.flags |= YShortVector|YShortPositive; 01084 point_array_size++; 01085 } else if (rel.y < 0 && rel.y > -256) { 01086 rel.flags |= YShortVector; 01087 rel.y = -rel.y; 01088 point_array_size++; 01089 } else { 01090 point_array_size += 2; 01091 } 01092 (*points)[i] = rel; 01093 // #define toString(x) ((rel.flags & x) ? #x : "") 01094 // qDebug() << " " << QPoint(rel.x, rel.y) << "flags=" 01095 // << toString(OnCurve) << toString(XShortVector) 01096 // << (rel.flags & XShortVector ? toString(XShortPositive) : toString(XSame)) 01097 // << toString(YShortVector) 01098 // << (rel.flags & YShortVector ? toString(YShortPositive) : toString(YSame)); 01099 01100 prev_x = x; 01101 prev_y = y; 01102 } 01103 return point_array_size; 01104 }
Here is the call graph for this function:

| static const char* encodeNumber | ( | int | num, | |
| char * | tmp | |||
| ) | [static] |
Definition at line 1470 of file qfontsubset.cpp.
References QPdf::toHex().
Referenced by charString().
01471 { 01472 const char *ret = tmp; 01473 if(num >= -107 && num <= 107) { 01474 QPdf::toHex((uchar)(num + 139), tmp); 01475 tmp += 2; 01476 } else if (num > 107 && num <= 1131) { 01477 num -= 108; 01478 QPdf::toHex((uchar)((num >> 8) + 247), tmp); 01479 tmp += 2; 01480 QPdf::toHex((uchar)(num & 0xff), tmp); 01481 tmp += 2; 01482 } else if(num < - 107 && num >= -1131) { 01483 num += 108; 01484 num = -num; 01485 QPdf::toHex((uchar)((num >> 8) + 251), tmp); 01486 tmp += 2; 01487 QPdf::toHex((uchar)(num & 0xff), tmp); 01488 tmp += 2; 01489 } else { 01490 *tmp++ = 'f'; 01491 *tmp++ = 'f'; 01492 QPdf::toHex((uchar)(num >> 24), tmp); 01493 tmp += 2; 01494 QPdf::toHex((uchar)(num >> 16), tmp); 01495 tmp += 2; 01496 QPdf::toHex((uchar)(num >> 8), tmp); 01497 tmp += 2; 01498 QPdf::toHex((uchar)(num >> 0), tmp); 01499 tmp += 2; 01500 } 01501 *tmp = 0; 01502 // qDebug("encodeNumber: %d -> '%s'", num, ret); 01503 return ret; 01504 }
Here is the call graph for this function:

| static FT_Face ft_face | ( | const QFontEngine * | engine | ) | [static] |
Definition at line 255 of file qfontsubset.cpp.
References QFontEngine::Freetype, QFontEngine::type(), and QFontEngine::XLFD.
Referenced by QFontSubset::glyphName(), and QFontSubset::toType1().
00256 { 00257 #ifdef Q_WS_X11 00258 #ifndef QT_NO_FONTCONFIG 00259 if (engine->type() == QFontEngine::Freetype) { 00260 const QFontEngineFT *ft = static_cast<const QFontEngineFT *>(engine); 00261 return ft->non_locked_face(); 00262 } else 00263 #endif 00264 if (engine->type() == QFontEngine::XLFD) { 00265 const QFontEngineXLFD *xlfd = static_cast<const QFontEngineXLFD *>(engine); 00266 return xlfd->non_locked_face(); 00267 } 00268 #endif 00269 #ifdef Q_WS_QWS 00270 if (engine->type() == QFontEngine::Freetype) { 00271 const QFontEngineFT *ft = static_cast<const QFontEngineFT *>(engine); 00272 return ft->face; 00273 } 00274 #endif 00275 return 0; 00276 }
Here is the call graph for this function:

| static QTtfGlyph generateGlyph | ( | int | index, | |
| const QPainterPath & | path, | |||
| qreal | advance, | |||
| qreal | lsb, | |||
| qreal | ppem | |||
| ) | [static] |
Definition at line 1154 of file qfontsubset.cpp.
References QTtfGlyph::advanceWidth, convertPath(), convertToRelative(), getBounds(), getGlyphData(), QTtfGlyph::index, QTtfGlyph::lsb, QTtfGlyph::numContours, QTtfGlyph::numPoints, path, qRound(), QTtfGlyph::xMax, QTtfGlyph::xMin, QTtfGlyph::yMax, and QTtfGlyph::yMin.
Referenced by QFontSubset::toTruetype().
01155 { 01156 QList<TTF_POINT> points; 01157 QList<int> endPoints; 01158 QTtfGlyph glyph; 01159 glyph.index = index; 01160 glyph.advanceWidth = qRound(advance * 2048. / ppem); 01161 glyph.lsb = qRound(lsb * 2048. / ppem); 01162 01163 if (!path.elementCount()) { 01164 //qDebug("glyph %d is empty", index); 01165 lsb = 0; 01166 glyph.xMin = glyph.xMax = glyph.yMin = glyph.yMax = 0; 01167 glyph.numContours = 0; 01168 glyph.numPoints = 0; 01169 return glyph; 01170 } 01171 01172 convertPath(path, &points, &endPoints, ppem); 01173 01174 // qDebug() << "number of contours=" << endPoints.size(); 01175 // for (int i = 0; i < points.size(); ++i) 01176 // qDebug() << " point[" << i << "] = " << QPoint(points.at(i).x, points.at(i).y) << " flags=" << points.at(i).flags; 01177 // qDebug() << "endPoints:"; 01178 // for (int i = 0; i < endPoints.size(); ++i) 01179 // qDebug() << endPoints.at(i); 01180 01181 getBounds(points, &glyph.xMin, &glyph.xMax, &glyph.yMin, &glyph.yMax); 01182 int point_array_size = convertToRelative(&points); 01183 getGlyphData(&glyph, points, endPoints, point_array_size); 01184 return glyph; 01185 }
Here is the call graph for this function:

| static QList< QTtfTable > generateGlyphTables | ( | qttf_font_tables & | tables, | |
| const QList< QTtfGlyph > & | _glyphs | |||
| ) | [static] |
Definition at line 1192 of file qfontsubset.cpp.
References QTtfGlyph::advanceWidth, QByteArray::append(), QList< T >::at(), QTtfTable::data, QTtfGlyph::data, qttf_font_tables::head, qttf_font_tables::hhea, i, index, qttf_head_table::indexToLocFormat, QTtfGlyph::lsb, MAKE_TAG, qttf_font_tables::maxp, qttf_hhea_table::numberOfHMetrics, qttf_maxp_table::numGlyphs, QTtfStream::offset(), qSort(), QByteArray::resize(), QByteArray::size(), QList< T >::size(), and QTtfTable::tag.
Referenced by QFontSubset::toTruetype().
01193 { 01194 const int max_size_small = 65536*2; 01195 QList<QTtfGlyph> glyphs = _glyphs; 01196 qSort(glyphs); 01197 01198 Q_ASSERT(tables.maxp.numGlyphs == glyphs.at(glyphs.size()-1).index + 1); 01199 int nGlyphs = tables.maxp.numGlyphs; 01200 01201 int glyf_size = 0; 01202 for (int i = 0; i < glyphs.size(); ++i) 01203 glyf_size += (glyphs.at(i).data.size() + 3) & ~3; 01204 01205 tables.head.indexToLocFormat = glyf_size < max_size_small ? 0 : 1; 01206 tables.hhea.numberOfHMetrics = nGlyphs; 01207 01208 QTtfTable glyf; 01209 glyf.tag = MAKE_TAG("glyf"); 01210 01211 QTtfTable loca; 01212 loca.tag = MAKE_TAG("loca"); 01213 loca.data.resize(glyf_size < max_size_small ? (nGlyphs+1)*sizeof(quint16) : (nGlyphs+1)*sizeof(quint32)); 01214 QTtfStream ls(loca.data); 01215 01216 QTtfTable hmtx; 01217 hmtx.tag = MAKE_TAG("hmtx"); 01218 hmtx.data.resize(nGlyphs*4); 01219 QTtfStream hs(hmtx.data); 01220 01221 int pos = 0; 01222 for (int i = 0; i < nGlyphs; ++i) { 01223 int gpos = glyf.data.size(); 01224 quint16 advance = 0; 01225 qint16 lsb = 0; 01226 01227 if (glyphs[pos].index == i) { 01228 // emit glyph 01229 // qDebug("emitting glyph %d: size=%d", i, glyphs.at(i).data.size()); 01230 glyf.data += glyphs.at(pos).data; 01231 while (glyf.data.size() & 1) 01232 glyf.data.append('\0'); 01233 advance = glyphs.at(pos).advanceWidth; 01234 lsb = glyphs.at(pos).lsb; 01235 ++pos; 01236 } 01237 if (glyf_size < max_size_small) { 01238 // use short loca format 01239 ls << quint16(gpos>>1); 01240 } else { 01241 // use long loca format 01242 ls << quint32(gpos); 01243 } 01244 hs << advance 01245 << lsb; 01246 } 01247 if (glyf_size < max_size_small) { 01248 // use short loca format 01249 ls << quint16(glyf.data.size()>>1); 01250 } else { 01251 // use long loca format 01252 ls << quint32(glyf.data.size()); 01253 } 01254 01255 Q_ASSERT(loca.data.size() == ls.offset()); 01256 Q_ASSERT(hmtx.data.size() == hs.offset()); 01257 01258 QList<QTtfTable> list; 01259 list.append(glyf); 01260 list.append(loca); 01261 list.append(hmtx); 01262 return list; 01263 }
Here is the call graph for this function:

| static QTtfTable generateHead | ( | const qttf_head_table & | head | ) | [static] |
Definition at line 647 of file qfontsubset.cpp.
References qttf_head_table::created, qttf_head_table::font_revision, qttf_head_table::indexToLocFormat, qttf_head_table::macStyle, MAKE_TAG, qttf_head_table::modified, s, t, qttf_head_table::xMax, qttf_head_table::xMin, qttf_head_table::yMax, and qttf_head_table::yMin.
Referenced by QFontSubset::toTruetype().
00648 { 00649 const int head_size = 54; 00650 QTtfTable t; 00651 t.tag = MAKE_TAG("head"); 00652 t.data.resize(head_size); 00653 00654 QTtfStream s(t.data); 00655 00656 // qint32 Table version number 0x00010000 for version 1.0. 00657 // qint32 fontRevision Set by font manufacturer. 00658 s << qint32(0x00010000) 00659 << head.font_revision 00660 // quint32 checkSumAdjustment To compute: set it to 0, sum the entire font as quint32, then store 0xB1B0AFBA - sum. 00661 << quint32(0) 00662 // quint32 magicNumber Set to 0x5F0F3CF5. 00663 << quint32(0x5F0F3CF5) 00664 // quint16 flags Bit 0: Baseline for font at y=0; 00665 // Bit 1: Left sidebearing point at x=0; 00666 // Bit 2: Instructions may depend on point size; 00667 // Bit 3: Force ppem to integer values for all internal scaler math; may use fractional ppem sizes if this bit is clear; 00668 // Bit 4: Instructions may alter advance width (the advance widths might not scale linearly); 00669 // Bits 5-10: These should be set according to Apple's specification . However, they are not implemented in OpenType. 00670 // Bit 11: Font data is 'lossless,' as a result of having been compressed and decompressed with the Agfa MicroType Express engine. 00671 // Bit 12: Font converted (produce compatible metrics) 00672 // Bit 13: Font optimised for ClearType 00673 // Bit 14: Reserved, set to 0 00674 // Bit 15: Reserved, set to 0 00675 << quint16(0) 00676 00677 // quint16 unitsPerEm Valid range is from 16 to 16384. This value should be a power of 2 for fonts that have TrueType outlines. 00678 << quint16(2048) 00679 // qint64 created Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer 00680 << head.created 00681 // qint64 modified Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer 00682 << head.modified 00683 // qint16 xMin For all glyph bounding boxes. 00684 // qint16 yMin For all glyph bounding boxes. 00685 // qint16 xMax For all glyph bounding boxes. 00686 // qint16 yMax For all glyph bounding boxes. 00687 << head.xMin 00688 << head.yMin 00689 << head.xMax 00690 << head.yMax 00691 // quint16 macStyle Bit 0: Bold (if set to 1); 00692 // Bit 1: Italic (if set to 1) 00693 // Bit 2: Underline (if set to 1) 00694 // Bit 3: Outline (if set to 1) 00695 // Bit 4: Shadow (if set to 1) 00696 // Bit 5: Condensed (if set to 1) 00697 // Bit 6: Extended (if set to 1) 00698 // Bits 7-15: Reserved (set to 0). 00699 << head.macStyle 00700 // quint16 lowestRecPPEM Smallest readable size in pixels. 00701 << quint16(6) // just a wild guess 00702 // qint16 fontDirectionHint 0: Fully mixed directional glyphs; 00703 << qint16(0) 00704 // 1: Only strongly left to right; 00705 // 2: Like 1 but also contains neutrals; 00706 // -1: Only strongly right to left; 00707 // -2: Like -1 but also contains neutrals. 1 00708 // qint16 indexToLocFormat 0 for short offsets, 1 for long. 00709 << head.indexToLocFormat 00710 // qint16 glyphDataFormat 0 for current format. 00711 << qint16(0); 00712 00713 Q_ASSERT(s.offset() == head_size); 00714 return t; 00715 }
| static QTtfTable generateHhea | ( | const qttf_hhea_table & | hhea | ) | [static] |
Definition at line 718 of file qfontsubset.cpp.
References qttf_hhea_table::ascender, qttf_hhea_table::descender, qttf_hhea_table::lineGap, MAKE_TAG, qttf_hhea_table::maxAdvanceWidth, qttf_hhea_table::minLeftSideBearing, qttf_hhea_table::minRightSideBearing, qttf_hhea_table::numberOfHMetrics, s, t, and qttf_hhea_table::xMaxExtent.
Referenced by QFontSubset::toTruetype().
00719 { 00720 const int hhea_size = 36; 00721 QTtfTable t; 00722 t.tag = MAKE_TAG("hhea"); 00723 t.data.resize(hhea_size); 00724 00725 QTtfStream s(t.data); 00726 // qint32 Table version number 0x00010000 for version 1.0. 00727 s << qint32(0x00010000) 00728 // qint16 Ascender Typographic ascent. (Distance from baseline of highest ascender) 00729 << hhea.ascender 00730 // qint16 Descender Typographic descent. (Distance from baseline of lowest descender) 00731 << hhea.descender 00732 // qint16 LineGap Typographic line gap. 00733 // Negative LineGap values are treated as zero 00734 // in Windows 3.1, System 6, and 00735 // System 7. 00736 << hhea.lineGap 00737 // quint16 advanceWidthMax Maximum advance width value in 'hmtx' table. 00738 << hhea.maxAdvanceWidth 00739 // qint16 minLeftSideBearing Minimum left sidebearing value in 'hmtx' table. 00740 << hhea.minLeftSideBearing 00741 // qint16 minRightSideBearing Minimum right sidebearing value; calculated as Min(aw - lsb - (xMax - xMin)). 00742 << hhea.minRightSideBearing 00743 // qint16 xMaxExtent Max(lsb + (xMax - xMin)). 00744 << hhea.xMaxExtent 00745 // qint16 caretSlopeRise Used to calculate the slope of the cursor (rise/run); 1 for vertical. 00746 << qint16(1) 00747 // qint16 caretSlopeRun 0 for vertical. 00748 << qint16(0) 00749 // qint16 caretOffset The amount by which a slanted highlight on a glyph needs to be shifted to produce the best appearance. Set to 0 for non-slanted fonts 00750 << qint16(0) 00751 // qint16 (reserved) set to 0 00752 << qint16(0) 00753 // qint16 (reserved) set to 0 00754 << qint16(0) 00755 // qint16 (reserved) set to 0 00756 << qint16(0) 00757 // qint16 (reserved) set to 0 00758 << qint16(0) 00759 // qint16 metricDataFormat 0 for current format. 00760 << qint16(0) 00761 // quint16 numberOfHMetrics Number of hMetric entries in 'hmtx' table 00762 << hhea.numberOfHMetrics; 00763 00764 Q_ASSERT(s.offset() == hhea_size); 00765 return t; 00766 }
| static QTtfTable generateMaxp | ( | const qttf_maxp_table & | maxp | ) | [static] |
Definition at line 769 of file qfontsubset.cpp.
References MAKE_TAG, qttf_maxp_table::maxComponentDepth, qttf_maxp_table::maxComponentElements, qttf_maxp_table::maxCompositeContours, qttf_maxp_table::maxCompositePoints, qttf_maxp_table::maxContours, qttf_maxp_table::maxPoints, qttf_maxp_table::numGlyphs, s, and t.
Referenced by QFontSubset::toTruetype().
00770 { 00771 const int maxp_size = 32; 00772 QTtfTable t; 00773 t.tag = MAKE_TAG("maxp"); 00774 t.data.resize(maxp_size); 00775 00776 QTtfStream s(t.data); 00777 00778 // qint32 Table version number 0x00010000 for version 1.0. 00779 s << qint32(0x00010000) 00780 // quint16 numGlyphs The number of glyphs in the font. 00781 << maxp.numGlyphs 00782 // quint16 maxPoints Maximum points in a non-composite glyph. 00783 << maxp.maxPoints 00784 // quint16 maxContours Maximum contours in a non-composite glyph. 00785 << maxp.maxContours 00786 // quint16 maxCompositePoints Maximum points in a composite glyph. 00787 << maxp.maxCompositePoints 00788 // quint16 maxCompositeContours Maximum contours in a composite glyph. 00789 << maxp.maxCompositeContours 00790 // quint16 maxZones 1 if instructions do not use the twilight zone (Z0), or 2 if instructions do use Z0; should be set to 2 in most cases. 00791 << quint16(1) // we do not embed instructions 00792 // quint16 maxTwilightPoints Maximum points used in Z0. 00793 << quint16(0) 00794 // quint16 maxStorage Number of Storage Area locations. 00795 << quint16(0) 00796 // quint16 maxFunctionDefs Number of FDEFs. 00797 << quint16(0) 00798 // quint16 maxInstructionDefs Number of IDEFs. 00799 << quint16(0) 00800 // quint16 maxStackElements Maximum stack depth2. 00801 << quint16(0) 00802 // quint16 maxSizeOfInstructions Maximum byte count for glyph instructions. 00803 << quint16(0) 00804 // quint16 maxComponentElements Maximum number of components referenced at "top level" for any composite glyph. 00805 << maxp.maxComponentElements 00806 // quint16 maxComponentDepth Maximum levels of recursion; 1 for simple components. 00807 << maxp.maxComponentDepth; 00808 00809 Q_ASSERT(s.offset() == maxp_size); 00810 return t; 00811 }
| static QTtfTable generateName | ( | const QList< QTtfNameRecord > & | name | ) | [static] |
Definition at line 846 of file qfontsubset.cpp.
References i, len, MAKE_TAG, n, name, s, and t.
00847 { 00848 const int char_size = 2; 00849 00850 QTtfTable t; 00851 t.tag = MAKE_TAG("name"); 00852 00853 const int name_size = 6 + 12*name.size(); 00854 int string_size = 0; 00855 for (int i = 0; i < name.size(); ++i) { 00856 string_size += name.at(i).value.length()*char_size; 00857 } 00858 t.data.resize(name_size + string_size); 00859 00860 QTtfStream s(t.data); 00861 // quint16 format Format selector (=0). 00862 s << quint16(0) 00863 // quint16 count Number of name records. 00864 << quint16(name.size()) 00865 // quint16 stringOffset Offset to start of string storage (from start of table). 00866 << quint16(name_size); 00867 // NameRecord nameRecord[count] The name records where count is the number of records. 00868 // (Variable) 00869 00870 int off = 0; 00871 for (int i = 0; i < name.size(); ++i) { 00872 int len = name.at(i).value.length()*char_size; 00873 // quint16 platformID Platform ID. 00874 // quint16 encodingID Platform-specific encoding ID. 00875 // quint16 languageID Language ID. 00876 s << quint16(3) 00877 << quint16(1) 00878 << quint16(0x0409) // en_US 00879 // quint16 nameId Name ID. 00880 << name.at(i).nameId 00881 // quint16 length String length (in bytes). 00882 << quint16(len) 00883 // quint16 offset String offset from start of storage area (in bytes). 00884 << quint16(off); 00885 off += len; 00886 } 00887 for (int i = 0; i < name.size(); ++i) { 00888 const QString &n = name.at(i).value; 00889 const ushort *uc = n.utf16(); 00890 for (int i = 0; i < n.length(); ++i) { 00891 s << quint16(*uc); 00892 ++uc; 00893 } 00894 } 00895 return t; 00896 }
| static QTtfTable generateName | ( | const qttf_name_table & | name | ) | [static] |
Definition at line 820 of file qfontsubset.cpp.
References QList< T >::append(), name, QTtfNameRecord::nameId, and QTtfNameRecord::value.
Referenced by QFontSubset::toTruetype().
00821 { 00822 QList<QTtfNameRecord> list; 00823 QTtfNameRecord rec; 00824 rec.nameId = 0; 00825 rec.value = name.copyright; 00826 list.append(rec); 00827 rec.nameId = 1; 00828 rec.value = name.family; 00829 list.append(rec); 00830 rec.nameId = 2; 00831 rec.value = name.subfamily; 00832 list.append(rec); 00833 rec.nameId = 4; 00834 rec.value = name.family; 00835 if (name.subfamily != QLatin1String("Regular")) 00836 rec.value += QLatin1Char(' ') + name.subfamily; 00837 list.append(rec); 00838 rec.nameId = 6; 00839 rec.value = name.postscript_name; 00840 list.append(rec); 00841 00842 return generateName(list); 00843 }
Here is the call graph for this function:

| static void getBounds | ( | const QList< TTF_POINT > & | points, | |
| qint16 * | xmin, | |||
| qint16 * | xmax, | |||
| qint16 * | ymin, | |||
| qint16 * | ymax | |||
| ) | [static] |
Definition at line 1038 of file qfontsubset.cpp.
References QList< T >::at(), i, qMax(), qMin(), QList< T >::size(), TTF_POINT::x, and TTF_POINT::y.
Referenced by generateGlyph().
01039 { 01040 *xmin = points.at(0).x; 01041 *xmax = *xmin; 01042 *ymin = points.at(0).y; 01043 *ymax = *ymin; 01044 01045 for (int i = 1; i < points.size(); ++i) { 01046 *xmin = qMin(*xmin, points.at(i).x); 01047 *xmax = qMax(*xmax, points.at(i).x); 01048 *ymin = qMin(*ymin, points.at(i).y); 01049 *ymax = qMax(*ymax, points.at(i).y); 01050 } 01051 }
Here is the call graph for this function:

| static void getGlyphData | ( | QTtfGlyph * | glyph, | |
| const QList< TTF_POINT > & | points, | |||
| const QList< int > & | endPoints, | |||
| int | point_array_size | |||
| ) | [static] |
Definition at line 1106 of file qfontsubset.cpp.
References QList< T >::at(), QTtfGlyph::data, TTF_POINT::flags, flags, i, QTtfGlyph::numContours, QTtfGlyph::numPoints, QByteArray::resize(), s, QList< T >::size(), TTF_POINT::x, x, QTtfGlyph::xMax, QTtfGlyph::xMin, XSame, XShortVector, TTF_POINT::y, y, QTtfGlyph::yMax, QTtfGlyph::yMin, YSame, and YShortVector.
Referenced by generateGlyph().
01107 { 01108 const int max_size = 5*sizeof(qint16) // header 01109 + endPoints.size()*sizeof(quint16) // end points of contours 01110 + sizeof(quint16) // instruction length == 0 01111 + points.size()*(1) // flags 01112 + point_array_size; // coordinates 01113 01114 glyph->data.resize(max_size); 01115 01116 QTtfStream s(glyph->data); 01117 s << qint16(endPoints.size()) 01118 << glyph->xMin << glyph->yMin << glyph->xMax << glyph->yMax; 01119 01120 for (int i = 0; i < endPoints.size(); ++i) 01121 s << quint16(endPoints.at(i)); 01122 s << quint16(0); // instruction length 01123 01124 // emit flags 01125 for (int i = 0; i < points.size(); ++i) 01126 s << quint8(points.at(i).flags); 01127 // emit points 01128 for (int i = 0; i < points.size(); ++i) { 01129 quint8 flags = points.at(i).flags; 01130 qint16 x = points.at(i).x; 01131 01132 if (flags & XShortVector) 01133 s << quint8(x); 01134 else if (!(flags & XSame)) 01135 s << qint16(x); 01136 } 01137 for (int i = 0; i < points.size(); ++i) { 01138 quint8 flags = points.at(i).flags; 01139 qint16 y = points.at(i).y; 01140 01141 if (flags & YShortVector) 01142 s << quint8(y); 01143 else if (!(flags & YSame)) 01144 s << qint16(y); 01145 } 01146 01147 // qDebug() << "offset=" << s.offset() << "max_size=" << max_size << "point_array_size=" << point_array_size; 01148 Q_ASSERT(s.offset() == max_size); 01149 01150 glyph->numContours = endPoints.size(); 01151 glyph->numPoints = points.size(); 01152 }
Here is the call graph for this function:

| Q_DECLARE_TYPEINFO | ( | TTF_POINT | , | |
| Q_PRIMITIVE_TYPE | ||||
| ) |
| Q_DECLARE_TYPEINFO | ( | QTtfGlyph | , | |
| Q_MOVABLE_TYPE | ||||
| ) |
| Q_DECLARE_TYPEINFO | ( | QTtfTable | , | |
| Q_MOVABLE_TYPE | ||||
| ) |
const char* const agl [static] |
const char* courier_styles[4] [static] |
Initial value:
{
"Courier",
"Courier-Bold",
"Courier-Oblique",
"Courier-BoldOblique"
}
Definition at line 1611 of file qfontsubset.cpp.
Referenced by QFontSubset::toType1().
const char* helvetica_styles[4] [static] |
Initial value:
{
"Helvetica",
"Helvetica-Bold",
"Helvetica-Oblique",
"Helvetica-BoldOblique"
}
Definition at line 1599 of file qfontsubset.cpp.
Referenced by QFontSubset::toType1().
Definition at line 83 of file qfontsubset.cpp.
Referenced by QFileDialogPrivate::_q_autoCompleteFileName(), QAbstractItemViewPrivate::_q_columnsAboutToBeRemoved(), QCompleterPrivate::_q_complete(), QCompleterPrivate::_q_completionSelected(), QFileDialogPrivate::_q_createDirectory(), QFileDialogPrivate::_q_currentChanged(), QFileDialogPrivate::_q_deleteCurrent(), QComboBoxPrivate::_q_emitHighlighted(), QTableWidgetPrivate::_q_emitItemActivated(), QListWidgetPrivate::_q_emitItemActivated(), QTableWidgetPrivate::_q_emitItemChanged(), QListWidgetPrivate::_q_emitItemChanged(), QStandardItemModelPrivate::_q_emitItemChanged(), QTableWidgetPrivate::_q_emitItemClicked(), QListWidgetPrivate::_q_emitItemClicked(), QListWidgetPrivate::_q_emitItemDoubleClicked(), QTableWidgetPrivate::_q_emitItemDoubleClicked(), QListWidgetPrivate::_q_emitItemEntered(), QTableWidgetPrivate::_q_emitItemEntered(), QListWidgetPrivate::_q_emitItemPressed(), QTableWidgetPrivate::_q_emitItemPressed(), QFileDialogPrivate::_q_enterDirectory(), QFileDialogPrivate::_q_navigateToParent(), QGraphicsScenePrivate::_q_removeItemLater(), QFileDialogPrivate::_q_renameCurrent(), QComboBoxPrivate::_q_returnPressed(), QFileDialogPrivate::_q_showContextMenu(), QDesignerMenuBar::actionAtPosition(), QToolBar::actionEvent(), QAbstractItemViewPrivate::addEditor(), Q3FileDialog::addFilter(), Q3Header::addLabel(), QListViewPrivate::addLeaf(), QSvgIconEngine::addPixmap(), QDesignerMenuBar::adjustIndicator(), qdesigner_internal::QDesignerResource::applyProperties(), qdesigner_internal::QDesignerFormBuilder::applyProperties(), Q3GVector::at(), qdesigner_internal::GridLayout::buildGrid(), canBeBuddy(), qdesigner_internal::FormWindow::canBeBuddy(), QTableWidget::cellWidget(), QStandardItemPrivate::childDeleted(), QAbstractItemViewPrivate::clearOrRemove(), Rpp::RppTreeEvaluator::cloneTokenList(), QAbstractItemView::closeEditor(), QAbstractItemView::closePersistentEditor(), QTableWidget::closePersistentEditor(), QListWidget::closePersistentEditor(), QTreeViewPrivate::collapse(), QTreeView::collapse(), Main::collapseView(), QAbstractItemModelPrivate::columnsAboutToBeInserted(), QStandardItemModelPrivate::columnsAboutToBeInserted(), QStandardItemModelPrivate::columnsAboutToBeRemoved(), QAbstractItemView::commitData(), QFileInfo::completeBaseName(), qdesigner_internal::QDesignerResource::computeProperties(), TokenStreamAdapter::TokenStream::containerIndex(), TokenEngine::TokenRef::containerIndex(), QItemSelection::contains(), QItemSelectionRange::contains(), Q3TextEdit::contentsMouseDoubleClickEvent(), Q3TextEdit::contentsMouseReleaseEvent(), QAbstractItemViewPrivate::contiguousSelectionCommand(), QFTOutlineMapper::convertPath(), QDockWidgetLayout::convertToGap(), QDockAreaLayoutInfo::convertToGap(), QDockAreaLayoutInfo::convertToWidget(), QDockWidgetLayout::convertToWidget(), QString::count(), qdesigner_internal::QDesignerResource::create(), qdesigner_internal::QDesignerResource::createDom(), qdesigner_internal::QPropertyEditorDelegate::createEditor(), VariantDelegate::createEditor(), PPDOptionsEditor::createEditor(), BookDelegate::createEditor(), QtBrushDelegate::createEditor(), qdesigner_internal::ColorDelegate::createEditor(), qdesigner_internal::ConnectionDelegate::createEditor(), qdesigner_internal::WidgetBoxItemDelegate::createEditor(), ImageDelegate::createEditor(), QItemDelegate::createEditor(), SpreadSheetDelegate::createEditor(), QLayoutSupport::createEmptyCells(), QDesignerPropertySheet::createFakeProperty(), QGraphicsScene::createItemGroup(), QShortcutMap::createNewSequences(), createReadHandler(), qdesigner_internal::PropertyEditor::currentPropertyName(), QDockAreaLayoutInfo::currentTabId(), PieView::dataChanged(), dataPointer(), decomposition(), QUnicodeTables::decompositionTag(), PhraseBookBox::definitionChanged(), QAbstractItemViewPrivate::delegateForIndex(), Q3DockArea::dockWindow(), QTreeView::doItemsLayout(), QAbstractItemView::dragMoveEvent(), QListView::dragMoveEvent(), qdesigner_internal::QrcView::dragMoveEvent(), QDesignerMenuBar::dragMoveEvent(), QTableViewPrivate::drawAndClipSpans(), QItemDelegate::drawBackground(), qdesigner_internal::TreeWidget::drawBranches(), QTreeView::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QTableViewPrivate::drawCell(), drawLine_midpoint_i(), QTreeView::drawRow(), QDesignerToolBar::dropEvent(), qdesigner_internal::QrcView::dropEvent(), QDesignerMenu::dropEvent(), QDesignerMenuBar::dropEvent(), QTableWidget::dropEvent(), QAbstractItemView::dropEvent(), QAbstractItemViewPrivate::dropOn(), PieView::edit(), QAbstractItemView::edit(), qdesigner_internal::WidgetBoxTreeView::editCurrentItem(), QAbstractItemViewPrivate::editor(), BookDelegate::editorEvent(), QItemDelegate::editorEvent(), QAbstractItemViewPrivate::editorForIndex(), QComboBoxPrivate::emitActivated(), PhraseBookBox::enableDisable(), SortingBox::event(), HoverPoints::eventFilter(), QDesignerTabWidget::eventFilter(), QTreeViewPrivate::expand(), QTreeView::expand(), QAbstractItemViewPrivate::extendedSelectionCommand(), QAbstractItemViewPrivate::fetchMore(), qdesigner_internal::ActionRepository::filter(), Q3GList::find(), Q3GVector::find(), QDesignerMenuBar::findAction(), QDesignerMenu::findAction(), QDesignerToolBar::findAction(), TrWindow::findCurrentContextRow(), Q3ListBox::findItem(), QLayoutSupport::findItemAt(), QTreeWidget::findItems(), QListWidget::findItems(), QTableWidget::findItems(), QDesignerWidgetBoxInterface::findOrInsertCategory(), Q3GVector::findRef(), Q3GList::findRef(), Ui3Reader::fixMethod(), Q3TextDocument::focusNextPrevChild(), fontFile(), qdesigner_internal::FontProperty::FontProperty(), QDockWidgetLayout::gapRect(), Generator::generateCode(), generateGlyphTables(), QMutexPool::get(), QCalendarWidgetPrivate::getCurrentDate(), QComboMenuDelegate::getStyleOption(), QImageReaderPrivate::getText(), Index::getWildcardTerms(), qdesigner_internal::FormWindow::handleArrowKeyEvent(), Q3Header::handleAt(), QDesignerToolBar::handleContextMenuEvent(), QDesignerMenu::handleContextMenuEvent(), QCalendarView::handleMouseEvent(), QDesignerMenuBar::handleMouseMoveEvent(), QDesignerMenu::handleMousePressEvent(), QAbstractItemViewPrivate::hasEditor(), Q3GDict::hashKeyAscii(), Q3GDict::hashKeyString(), QCss::Parser::hasNext(), Highlighter::highlightBlock(), qdesigner_internal::FormWindow::highlightWidget(), QTreeView::indexAbove(), PieView::indexAt(), QListView::indexAt(), QTreeView::indexBelow(), QItemSelectionRange::indexes(), QRingBuffer::indexOf(), QDesignerPropertySheet::indexOf(), QLayoutSupport::indexOf(), QAccessibleApplication::indexOfChild(), QAccessibleWidget::indexOfChild(), indexOfItem(), qdesigner_internal::Utils::indexOfWidget(), QTreeView::indexRowSizeHint(), QListViewPrivate::indexToListViewItem(), QAbstractItemModelPrivate::indexValid(), QAbstractItemView::indexWidget(), QDockWidgetLayout::info(), QDockAreaLayoutInfo::info(), QStandardItemPrivate::insertColumns(), QDockAreaLayoutInfo::insertGap(), QDockWidgetLayout::insertGap(), QComboBox::insertItems(), MessageEditor::insertPhraseInTranslation(), MessageEditor::insertPhraseInTranslationAndLeave(), QStandardItemPrivate::insertRows(), QLayoutSupport::insertWidget(), Q3GList::inSort(), QListView::internalDrop(), QLCDNumberPrivate::internalSetString(), Q3ActionGroup::internalToggle(), QListViewPrivate::intersectingStaticSet(), QTreeView::isExpanded(), QTreeView::isIndexHidden(), QListView::isIndexHidden(), QTableView::isIndexHidden(), QAbstractItemViewPrivate::isIndexValid(), QTreeWidget::isItemHidden(), QTableWidget::isItemSelected(), QListWidget::isItemSelected(), QTreeView::isRowHidden(), isSection(), QItemSelectionModel::isSelected(), QDesignerFormWindowCursorInterface::isWidgetSelected(), QDockWidgetLayout::item(), qdesigner_internal::ResourceEditor::itemActivated(), qdesigner_internal::ResourceEditor::itemChanged(), QStandardItemModelPrivate::itemChanged(), QTreeViewPrivate::itemDecorationAt(), QAbstractItemView::itemDelegate(), QTreeWidget::itemFromIndex(), QTableWidget::itemFromIndex(), QListWidget::itemFromIndex(), QStandardItemModelPrivate::itemFromIndex(), QTreeViewPrivate::itemHeight(), QComboBox::itemIcon(), QDockWidgetLayout::itemRect(), PieView::itemRect(), PieView::itemRegion(), QListViewPrivate::itemSize(), QComboBoxPrivate::itemText(), QListWidget::itemWidget(), QTreeView::keyboardSearch(), QTabBar::keyPressEvent(), QComboBox::keyPressEvent(), QTextTableCell::lastPosition(), qdesigner_internal::level(), QUnicodeTables::ligature(), Q3FileDialog::listBoxSelectionChanged(), NewForm::loadFrom(), Q3GDict::look_ascii(), Q3GDict::look_int(), Q3GDict::look_ptr(), Q3GDict::look_string(), QCss::Parser::lookup(), main(), Q3AccelManager::match(), Q3DockArea::maxSpace(), QAbstractItemView::mouseDoubleClickEvent(), QTreeView::mouseDoubleClickEvent(), QAbstractItemView::mouseMoveEvent(), QCalendarView::mouseMoveEvent(), SortingBox::mousePressEvent(), Q3Header::mousePressEvent(), QCalendarView::mousePressEvent(), QAbstractItemView::mousePressEvent(), QToolBarHandle::mousePressEvent(), qdesigner_internal::WidgetHandle::mouseReleaseEvent(), QAbstractItemView::mouseReleaseEvent(), QCalendarView::moveCursor(), Q3DockArea::moveDockWindow(), QAbstractItemViewPrivate::multiSelectionCommand(), QDirModelPrivate::name(), QAccessibleWidget::navigate(), QCss::Parser::next(), QDirModelPrivate::node(), MainWindow::on_printAction_triggered(), TrPreviewTool::on_viewForms_doubleClicked(), QAbstractItemViewPrivate::openEditor(), QListWidget::openPersistentEditor(), QAbstractItemView::openPersistentEditor(), QTableWidget::openPersistentEditor(), Window::operationChanged(), CheckStateSetter::operator()(), QTreeViewPrivate::pageDown(), QTreeViewPrivate::pageUp(), QComboMenuDelegate::paint(), qdesigner_internal::SheetDelegate::paint(), qdesigner_internal::TreeWidgetDelegate::paint(), BookDelegate::paint(), QCalendarDelegate::paint(), TorrentViewDelegate::paint(), MessagesItemDelegate::paint(), qdesigner_internal::ActionGroupDelegate::paint(), QFontFamilyDelegate::paint(), qdesigner_internal::ColorDelegate::paint(), QItemDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), VariantDelegate::paint(), PixelDelegate::paint(), QTableView::paintEvent(), PieView::paintEvent(), WigglyWidget::paintEvent(), QDateTimeParser::parseFormat(), QLineEditPrivate::parseInputMask(), Q3TextEdit::pasteSubType(), QCompleter::pathFromIndex(), PeerManager::PeerManager(), QSvgIconEngine::pixmap(), QCss::Parser::prev(), QSQLite2Driver::primaryIndex(), QIBaseDriver::primaryIndex(), QODBCDriver::primaryIndex(), PeerWireClient::processIncomingData(), QUnicodeTables::properties(), QDesignerPropertySheet::QDesignerPropertySheet(), qGetProp(), qHash(), QItemSelectionRange::QItemSelectionRange(), QMutexPool::QMutexPool(), QPersistentModelIndex::QPersistentModelIndex(), qt_read_xpm_image_or_array(), qt_setWindowTitle_helperHelper(), QTreeWidgetItemIterator::QTreeWidgetItemIterator(), read_xpm_body(), QRingBuffer::readLine(), QPngHandlerPrivate::readPngImage(), QCss::Parser::recordError(), QItemDelegate::rect(), QListView::rectForIndex(), QTreeViewPrivate::reexpandChildren(), QSettings::registerFormat(), QDockAreaLayoutInfo::remove(), QObjectCleanupHandler::remove(), QDockWidgetLayout::remove(), QTextFramePrivate::remove_me(), QTextTable::removeColumns(), QUrlPrivate::removeDotsFromPath(), QDesignerWorkbench::removeFormWindow(), QGraphicsScenePrivate::removeFromIndex(), QGraphicsScene::removeItem(), Q3Header::removeLabel(), QTextTable::removeRows(), QWSSignalHandler::removeSemaphore(), QDesignerWorkbench::removeToolWindow(), QLayoutSupport::removeWidget(), Porting::renameClass(), Porting::renameEnumerator(), Porting::renameHeader(), QByteArray::replace(), QString::replace(), Q3GDict::resize(), QDirModelPrivate::restorePersistentIndexes(), QDockAreaLayoutInfo::restoreState(), PieView::rows(), QAbstractItemModelPrivate::rowsAboutToBeInserted(), QStandardItemModelPrivate::rowsAboutToBeInserted(), QStandardItemModelPrivate::rowsAboutToBeRemoved(), PieView::rowsAboutToBeRemoved(), QAbstractItemView::rowsAboutToBeRemoved(), PieView::rowsInserted(), qdesigner_internal::QDesignerResource::saveDom(), QDockAreaLayoutInfo::saveState(), QListView::scrollTo(), QTableView::scrollTo(), PieView::scrollTo(), QTreeView::scrollTo(), QListWidget::scrollToItem(), QTableWidget::scrollToItem(), Q3Header::sectionRect(), QItemSelectionModel::select(), QTreeViewPrivate::select(), QTableView::selectColumn(), QFileDialog::selectedFiles(), QListView::selectedIndexes(), QTreeView::selectedIndexes(), QTableView::selectedIndexes(), QTableWidget::selectedItems(), QFileDialog::selectFile(), QListViewPrivate::selectionAllowed(), QAbstractItemViewPrivate::selectionAllowed(), QAbstractItemView::selectionCommand(), PhraseBookBox::selectItem(), QTableView::selectRow(), QAbstractItemViewPrivate::sendDelegateEvent(), QDockWidgetLayout::separatorMove(), QDockWidgetLayout::separatorRect(), set_text(), QTableWidget::setCellWidget(), QStandardItemPrivate::setChild(), QGradient::setColorAt(), QTableWidget::setCurrentCell(), qdesigner_internal::ResourceEditor::setCurrentFile(), QAbstractItemView::setCurrentIndex(), QComboBoxPrivateContainer::setCurrentIndex(), QItemSelectionModel::setCurrentIndex(), QCompleterPrivate::setCurrentIndex(), QFontListView::setCurrentItem(), QDataWidgetMapper::setCurrentModelIndex(), QListWidget::setCurrentRow(), QDateTimeEdit::setCurrentSection(), qdesigner_internal::FormWindowWidgetStack::setCurrentTool(), QStackedLayout::setCurrentWidget(), qdesigner_internal::PaletteModel::setData(), setDataPointer(), QFileDialog::setDirectory(), TorrentClient::setDumpedState(), VariantDelegate::setEditorData(), QItemDelegate::setEditorData(), PPDOptionsEditor::setEditorData(), ImageDelegate::setEditorData(), qdesigner_internal::QPropertyEditorDelegate::setEditorData(), SpreadSheetDelegate::setEditorData(), qdesigner_internal::ColorDelegate::setEditorData(), SpinBoxDelegate::setEditorData(), qdesigner_internal::QrcItemDelegate::setEditorData(), QTreeView::setExpanded(), Q3FileDialog::setFilter(), QFileDialog::setHistory(), QAbstractItemView::setIndexWidget(), QTreeWidget::setItemHidden(), QListWidget::setItemSelected(), QTableWidget::setItemSelected(), QListWidget::setItemWidget(), VariantDelegate::setModelData(), ImageDelegate::setModelData(), qdesigner_internal::QrcItemDelegate::setModelData(), SpreadSheetDelegate::setModelData(), SpinBoxDelegate::setModelData(), QItemDelegate::setModelData(), qdesigner_internal::ColorDelegate::setModelData(), PPDOptionsEditor::setModelData(), qdesigner_internal::QPropertyEditorDelegate::setModelData(), QItemDelegate::setOptions(), QObjectPrivate::setParent_helper(), QListView::setPositionForIndex(), Q3TextDocument::setRichTextInternal(), QFileDialogPrivate::setRootIndex(), QAbstractItemView::setRootIndex(), QListView::setRootIndex(), QDataWidgetMapper::setRootIndex(), QTableView::setRootIndex(), QTreeView::setRootIndex(), QComboBox::setRootModelIndex(), QTreeView::setRowHidden(), Q3FileDialog::setSelectedFilter(), PieView::setSelection(), QTableView::setSelection(), Q3SVGPaintEnginePrivate::setTransform(), QFileDialogPrivate::setup(), qdesigner_internal::WidgetSelection::setWidget(), QAbstractItemViewPrivate::shouldEdit(), QDesignerActions::showHelp(), Main::showInfo(), QComboBox::showPopup(), QAbstractItemModel::sibling(), QDirModelPrivate::size(), QFontFamilyDelegate::sizeHint(), qdesigner_internal::TreeWidgetDelegate::sizeHint(), QItemDelegate::sizeHint(), qdesigner_internal::ColorDelegate::sizeHint(), qdesigner_internal::SheetDelegate::sizeHint(), QComboMenuDelegate::sizeHint(), qdesigner_internal::QPropertyEditorDelegate::sizeHint(), BookDelegate::sizeHint(), QTableView::sizeHintForColumn(), QTreeView::sizeHintForColumn(), QAbstractItemView::sizeHintForColumn(), QAbstractItemView::sizeHintForIndex(), QAbstractItemView::sizeHintForRow(), QTableView::sizeHintForRow(), qdesigner_internal::TabOrderEditor::skipWidget(), PhraseBookBox::sortAndSelectItem(), PhraseBookBox::sourceChanged(), QDesignerMenu::startDrag(), QDesignerMenuBar::startDrag(), QDesignerToolBar::startDrag(), store(), QCss::Parser::symbol(), PhraseBookBox::targetChanged(), TokenEngine::TokenRef::text(), QDirModelPrivate::time(), QTimerInfoList::timerInsert(), TrWindow::toggleFinished(), TokenStreamAdapter::TokenStream::tokenContainer(), TokenEngine::TokenSection::tokenContainer(), TokenEngine::TokenRef::tokenContainer(), TokenStreamAdapter::TokenStream::tokenText(), QAbstractFormBuilder::toVariant(), QLayoutSupport::tryRemoveColumn(), QLayoutSupport::tryRemoveRow(), QDirModelPrivate::type(), Q3GDict::unlink_ascii(), Q3GDict::unlink_int(), Q3GDict::unlink_ptr(), Q3GDict::unlink_string(), Q3ActionGroupPrivate::update(), QFileDialogPrivate::updateButtons(), qdesigner_internal::SignalSlotEditorWindow::updateDialogSelection(), QAbstractItemViewPrivate::updateEditorData(), QAbstractItemView::updateEditorGeometries(), qdesigner_internal::ColorDelegate::updateEditorGeometry(), qdesigner_internal::QPropertyEditorDelegate::updateEditorGeometry(), QItemDelegate::updateEditorGeometry(), qdesigner_internal::SignalSlotEditorWindow::updateEditorSelection(), QListView::updateGeometries(), FileManager::verifyFileContents(), QTreeViewPrivate::viewIndex(), QListWidget::visualItemRect(), QTableWidget::visualItemRect(), QTableView::visualRect(), QListView::visualRect(), QTreeView::visualRect(), PieView::visualRect(), PieView::visualRegionForSelection(), QDateTimeEdit::wheelEvent(), QComboBox::wheelEvent(), qdesigner_internal::GridLayout::widgetAt(), QToolBar::widgetForAction(), QLayoutSupport::widgets(), and QMutexPool::~QMutexPool().
const unsigned short symbol_map[0x100] [static] |
const char* times_styles[4] [static] |
Initial value:
{
"Times-Regular",
"Times-Bold",
"Times-Italic",
"Times-BoldItalic"
}
Definition at line 1605 of file qfontsubset.cpp.
Referenced by QFontSubset::toType1().
Definition at line 83 of file qfontsubset.cpp.
struct { ... } unicode_to_aglindex[] [static] |
Referenced by QFontSubset::glyphName().
1.5.1