#include "qbitmap.h"
#include <qbytearray.h>
#include <qdebug.h>
#include <qtextcodec.h>
#include "qfontdatabase.h"
#include "qpaintdevice.h"
#include "qpainter.h"
#include "qvarlengtharray.h"
#include "qwidget.h"
#include "qsettings.h"
#include "qfile.h"
#include "qabstractfileengine.h"
#include <private/qpaintengine_x11_p.h>
#include "qfont.h"
#include "qfont_p.h"
#include "qfontengine_p.h"
#include "qopentype_p.h"
#include <qhash.h>
#include <private/qpainter_p.h>
#include <private/qunicodetables_p.h>
#include <private/qpdf_p.h>
#include <private/qt_x11_p.h>
#include "qx11info_x11.h"
#include <math.h>
#include <limits.h>
#include <ft2build.h>
#include <FT_FREETYPE_H>
#include <FT_OUTLINE_H>
#include <FT_TRUETYPE_TABLES_H>
#include <FT_TYPE1_TABLES_H>
#include <FT_GLYPH_H>
Include dependency graph for qfontengine_x11.cpp:

Go to the source code of this file.
Classes | |
| struct | QFreetypeFace |
Defines | |
| #define | X_SIZE(face, i) ((face)->available_sizes[i].x_ppem) |
| #define | Y_SIZE(face, i) ((face)->available_sizes[i].y_ppem) |
| #define | FLOOR(x) ((x) & -64) |
| #define | CEIL(x) (((x)+63) & -64) |
| #define | TRUNC(x) ((x) >> 6) |
| #define | ROUND(x) (((x)+32) & -64) |
Functions | |
| FT_Library | qt_getFreetype () |
| static void | addGlyphToPath (FT_GlyphSlot g, const QFixedPoint &point, QPainterPath *path, bool no_scale=false) |
| void | qt_addBitmapToPath (qreal x0, qreal y0, const uchar *image_data, int bpl, int w, int h, QPainterPath *path) |
| static void | addBitmapToPath (FT_GlyphSlot slot, const QFixedPoint &point, QPainterPath *path, bool=false) |
| static QStringList | fontPath () |
| static QFontEngine::FaceId | fontFile (const QByteArray &_xname, QFreetypeFace **freetype, int *synth) |
| int | qt_mib_for_xlfd_encoding (const char *encoding) |
| int | qt_xlfd_encoding_id (const char *encoding) |
| static XCharStruct * | charStruct (XFontStruct *xfs, uint ch) |
| static int | maxIndex (XFontStruct *f) |
| static QFontEngine * | engineForPattern (FcPattern *pattern, const QFontDef &request, int screen) |
| static QFontEngine::FaceId | face_id (FcPattern *pattern) |
| unsigned int | getChar (const QChar *str, int &i, const int len) |
Variables | |
| static FT_Library | library = 0 |
| static QHash< QFontEngine::FaceId, QFreetypeFace * > * | freetypeFaces = 0 |
| static QStringList * | qt_fontpath = 0 |
| static const uint | subpixel_filter [3][3] |
| static const ushort | char_table [] |
| static const int | char_table_entries = sizeof(char_table)/sizeof(ushort) |
| #define CEIL | ( | x | ) | (((x)+63) & -64) |
Definition at line 81 of file qfontengine_x11.cpp.
Referenced by QFontEngineFT::boundingBox(), and QFontEngineFT::Font::loadGlyph().
| #define FLOOR | ( | x | ) | ((x) & -64) |
Definition at line 80 of file qfontengine_x11.cpp.
Referenced by QFontEngineFT::boundingBox(), and QFontEngineFT::Font::loadGlyph().
| #define ROUND | ( | x | ) | (((x)+32) & -64) |
Definition at line 83 of file qfontengine_x11.cpp.
| #define TRUNC | ( | x | ) | ((x) >> 6) |
Definition at line 82 of file qfontengine_x11.cpp.
Referenced by addBitmapToPath(), QFontEngineFT::boundingBox(), and QFontEngineFT::Font::loadGlyph().
| #define X_SIZE | ( | face, | |||
| i | ) | ((face)->available_sizes[i].x_ppem) |
Definition at line 73 of file qfontengine_x11.cpp.
Referenced by QFreetypeFace::computeSize(), and QFreetypeFace::getFace().
| #define Y_SIZE | ( | face, | |||
| i | ) | ((face)->available_sizes[i].y_ppem) |
Definition at line 74 of file qfontengine_x11.cpp.
Referenced by QFreetypeFace::computeSize(), and QFreetypeFace::getFace().
| static void addBitmapToPath | ( | FT_GlyphSlot | slot, | |
| const QFixedPoint & | point, | |||
| QPainterPath * | path, | |||
| bool | = false | |||
| ) | [static] |
Definition at line 429 of file qfontengine_x11.cpp.
References FT_GlyphSlotRec_::bitmap, FT_Bitmap_::buffer, FT_GlyphSlotRec_::format, FT_GLYPH_FORMAT_BITMAP, FT_PIXEL_MODE_MONO, FT_GlyphSlotRec_::metrics, path, FT_Bitmap_::pitch, FT_Bitmap_::pixel_mode, qt_addBitmapToPath(), FT_Bitmap_::rows, QFixedPoint::toPointF(), TRUNC, FT_Bitmap_::width, QPointF::x(), and QPointF::y().
Referenced by QFontEngineXLFD::getUnscaledGlyph(), and QFontEngineFT::getUnscaledGlyph().
00430 { 00431 if (slot->format != FT_GLYPH_FORMAT_BITMAP 00432 || slot->bitmap.pixel_mode != FT_PIXEL_MODE_MONO) 00433 return; 00434 00435 QPointF cp = point.toPointF(); 00436 qt_addBitmapToPath(cp.x() + TRUNC(slot->metrics.horiBearingX), cp.y() - TRUNC(slot->metrics.horiBearingY), 00437 slot->bitmap.buffer, slot->bitmap.pitch, slot->bitmap.width, slot->bitmap.rows, path); 00438 }
Here is the call graph for this function:

| static void addGlyphToPath | ( | FT_GlyphSlot | g, | |
| const QFixedPoint & | point, | |||
| QPainterPath * | path, | |||
| bool | no_scale = false | |||
| ) | [static] |
Definition at line 347 of file qfontengine_x11.cpp.
References c, g, i, j, n, path, start, and QFixedPoint::toPointF().
Referenced by QFontEngineFT::addGlyphsToPath(), QFontEngineXLFD::getUnscaledGlyph(), and QFontEngineFT::getUnscaledGlyph().
00348 { 00349 qreal factor = no_scale ? 1. : 1./64.; 00350 00351 QPointF cp = point.toPointF(); 00352 00353 // convert the outline to a painter path 00354 int i = 0; 00355 for (int j = 0; j < g->outline.n_contours; ++j) { 00356 int last_point = g->outline.contours[j]; 00357 QPointF start = cp + QPointF(g->outline.points[i].x*factor, -g->outline.points[i].y*factor); 00358 if(!(g->outline.tags[i] & 1)) { 00359 start += cp + QPointF(g->outline.points[last_point].x*factor, -g->outline.points[last_point].y*factor); 00360 start /= 2; 00361 } 00362 // qDebug("contour: %d -- %d", i, g->outline.contours[c]); 00363 // qDebug("first point at %f %f", start.x(), start.y()); 00364 path->moveTo(start); 00365 00366 QPointF c[4]; 00367 c[0] = start; 00368 int n = 1; 00369 while (i < last_point) { 00370 ++i; 00371 c[n] = cp + QPointF(g->outline.points[i].x*factor, -g->outline.points[i].y*factor); 00372 // qDebug() << " i=" << i << " flag=" << (int)g->outline.tags[i] << "point=" << c[n]; 00373 ++n; 00374 switch (g->outline.tags[i] & 3) { 00375 case 2: 00376 // cubic bezier element 00377 if (n < 4) 00378 continue; 00379 c[3] = (c[3] + c[2])/2; 00380 --i; 00381 break; 00382 case 0: 00383 // quadratic bezier element 00384 if (n < 3) 00385 continue; 00386 c[3] = (c[1] + c[2])/2; 00387 c[2] = (2*c[1] + c[3])/3; 00388 c[1] = (2*c[1] + c[0])/3; 00389 --i; 00390 break; 00391 case 1: 00392 case 3: 00393 if (n == 2) { 00394 // qDebug() << "lineTo" << c[1]; 00395 path->lineTo(c[1]); 00396 c[0] = c[1]; 00397 n = 1; 00398 continue; 00399 } else if (n == 3) { 00400 c[3] = c[2]; 00401 c[2] = (2*c[1] + c[3])/3; 00402 c[1] = (2*c[1] + c[0])/3; 00403 } 00404 break; 00405 } 00406 // qDebug() << "cubicTo" << c[1] << c[2] << c[3]; 00407 path->cubicTo(c[1], c[2], c[3]); 00408 c[0] = c[3]; 00409 n = 1; 00410 } 00411 if (n == 1) { 00412 // qDebug() << "closeSubpath"; 00413 path->closeSubpath(); 00414 } else { 00415 c[3] = start; 00416 if (n == 2) { 00417 c[2] = (2*c[1] + c[3])/3; 00418 c[1] = (2*c[1] + c[0])/3; 00419 } 00420 // qDebug() << "cubicTo" << c[1] << c[2] << c[3]; 00421 path->cubicTo(c[1], c[2], c[3]); 00422 } 00423 ++i; 00424 } 00425 }
Here is the call graph for this function:

| static XCharStruct* charStruct | ( | XFontStruct * | xfs, | |
| uint | ch | |||
| ) | [inline, static] |
Definition at line 642 of file qfontengine_x11.cpp.
References c.
Referenced by QFontEngineXLFD::boundingBox(), QFontEngineXLFD::canRender(), and QFontEngineXLFD::stringToCMap().
00643 { 00644 XCharStruct *xcs = 0; 00645 unsigned char r = ch>>8; 00646 unsigned char c = ch&0xff; 00647 if (xfs->per_char && 00648 r >= xfs->min_byte1 && 00649 r <= xfs->max_byte1 && 00650 c >= xfs->min_char_or_byte2 && 00651 c <= xfs->max_char_or_byte2) { 00652 xcs = xfs->per_char + ((r - xfs->min_byte1) * 00653 (xfs->max_char_or_byte2 - 00654 xfs->min_char_or_byte2 + 1)) + 00655 (c - xfs->min_char_or_byte2); 00656 if (xcs->width == 0 && xcs->ascent == 0 && xcs->descent == 0) 00657 xcs = 0; 00658 } 00659 return xcs; 00660 }
| static QFontEngine* engineForPattern | ( | FcPattern * | pattern, | |
| const QFontDef & | request, | |||
| int | screen | |||
| ) | [static] |
Definition at line 1113 of file qfontengine_x11.cpp.
References QFontEngine::fontDef, QFontEngineFT::invalid(), match(), and QFontDef::pixelSize.
Referenced by QFontEngineMultiFT::loadEngine().
01115 { 01116 FcResult res; 01117 FcPattern *match = FcFontMatch(0, pattern, &res); 01118 QFontEngineFT *engine = new QFontEngineFT(match, request, screen); 01119 if (!engine->invalid()) 01120 return engine; 01121 01122 delete engine; 01123 QFontEngine *fe = new QFontEngineBox(request.pixelSize); 01124 fe->fontDef = request; 01125 return fe; 01126 }
Here is the call graph for this function:

| static QFontEngine::FaceId face_id | ( | FcPattern * | pattern | ) | [static] |
Definition at line 1191 of file qfontengine_x11.cpp.
References QFontEngineFT::face_id, QFontEngine::FaceId::filename, and QFontEngine::FaceId::index.
Referenced by QPdfBaseEnginePrivate::drawTextItem(), fontFile(), QFreetypeFace::getFace(), and QFreetypeFace::release().
01192 { 01193 char *file_name; 01194 FcPatternGetString(pattern, FC_FILE, 0, (FcChar8 **)&file_name); 01195 int face_index; 01196 if (!FcPatternGetInteger(pattern, FC_INDEX, 0, &face_index)) 01197 face_index = 0; 01198 QFontEngine::FaceId face_id; 01199 face_id.filename = file_name; 01200 face_id.index = face_index; 01201 return face_id; 01202 }
| static QFontEngine::FaceId fontFile | ( | const QByteArray & | _xname, | |
| QFreetypeFace ** | freetype, | |||
| int * | synth | |||
| ) | [static] |
Definition at line 546 of file qfontengine_x11.cpp.
References QFile::atEnd(), QList< T >::constBegin(), QList< T >::constEnd(), QByteArray::contains(), face_id(), fontPath(), QFreetypeFace::getFace(), index, QFontEngine::FaceId::index, QByteArray::indexOf(), QByteArray::isEmpty(), QByteArray::lastIndexOf(), QByteArray::left(), QByteArray::mid(), num, QFile::open(), QIODevice::readLine(), QIODevice::ReadOnly, s, QFontEngine::SynthesizedBold, QFontEngine::SynthesizedItalic, and QByteArray::toLower().
Referenced by QFontEngineXLFD::faceId().
00547 { 00548 *freetype = 0; 00549 *synth = 0; 00550 00551 QByteArray xname = _xname.toLower(); 00552 00553 int pos = 0; 00554 int minus = 0; 00555 while (minus < 5 && (pos = xname.indexOf('-', pos + 1))) 00556 ++minus; 00557 QByteArray searchname = xname.left(pos); 00558 while (minus < 12 && (pos = xname.indexOf('-', pos + 1))) 00559 ++minus; 00560 QByteArray encoding = xname.mid(pos + 1); 00561 //qDebug("xname='%s', searchname='%s', encoding='%s'", xname.data(), searchname.data(), encoding.data()); 00562 QStringList fontpath = ::fontPath(); 00563 QFontEngine::FaceId face_id; 00564 face_id.index = 0; 00565 00566 QByteArray best_mapping; 00567 00568 for (QStringList::ConstIterator it = fontpath.constBegin(); it != fontpath.constEnd(); ++it) { 00569 if ((*it).left(1) != QLatin1String("/")) 00570 continue; // not a path name, a font server 00571 QString fontmapname; 00572 int num = 0; 00573 // search font.dir and font.scale for the right file 00574 while (num < 2) { 00575 if (num == 0) 00576 fontmapname = (*it) + QLatin1String("/fonts.scale"); 00577 else 00578 fontmapname = (*it) + QLatin1String("/fonts.dir"); 00579 ++num; 00580 //qWarning(fontmapname); 00581 QFile fontmap(fontmapname); 00582 if (!fontmap.open(QIODevice::ReadOnly)) 00583 continue; 00584 while (!fontmap.atEnd()) { 00585 QByteArray mapping = fontmap.readLine(); 00586 QByteArray lmapping = mapping.toLower(); 00587 00588 //qWarning(xfontname); 00589 //qWarning(mapping); 00590 if (!lmapping.contains(searchname)) 00591 continue; 00592 int index = mapping.indexOf(' '); 00593 QByteArray ffn = mapping.mid(0,index); 00594 // remove bitmap formats freetype can't handle 00595 if (ffn.contains(".spd") || ffn.contains(".phont")) 00596 continue; 00597 bool best_match = false; 00598 if (!best_mapping.isEmpty()) { 00599 if (lmapping.contains("-0-0-0-0-")) { // scalable font 00600 best_match = true; 00601 goto found; 00602 } 00603 if (lmapping.contains(encoding) && !best_mapping.toLower().contains(encoding)) 00604 goto found; 00605 continue; 00606 } 00607 00608 found: 00609 int colon = ffn.lastIndexOf(':'); 00610 if (colon != -1) { 00611 QByteArray s = ffn.left(colon); 00612 ffn = ffn.mid(colon + 1); 00613 if (s.contains("ds=")) 00614 *synth |= QFontEngine::SynthesizedBold; 00615 if (s.contains("ai=")) 00616 *synth |= QFontEngine::SynthesizedItalic; 00617 } 00618 face_id.filename = (*it).toLocal8Bit() + '/' + ffn; 00619 best_mapping = mapping; 00620 if (best_match) 00621 goto end; 00622 } 00623 } 00624 } 00625 end: 00626 // qDebug("fontfile for %s is from '%s'\n got %s synth=%d", xname.data(), 00627 // best_mapping.data(), face_id.filename.data(), *synth); 00628 *freetype = QFreetypeFace::getFace(face_id); 00629 if (!*freetype) { 00630 face_id.index = 0; 00631 face_id.filename = QByteArray(); 00632 } 00633 return face_id; 00634 }
Here is the call graph for this function:

| static QStringList fontPath | ( | ) | [static] |
Definition at line 476 of file qfontengine_x11.cpp.
References QSettings::beginGroup(), QFile::close(), QFile::error(), QFile::exists(), fp, QString::fromLocal8Bit(), i, QString::indexOf(), QString::left(), QString::mid(), QFile::NoError, QFile::open(), qt_fontpath, QIODevice::readLine(), QIODevice::ReadOnly, QFile::setFileName(), QVariant::toStringList(), QString::trimmed(), QSettings::UserScope, QSettings::value(), and X11.
Referenced by fontFile().
00477 { 00478 if (qt_fontpath) 00479 return *qt_fontpath; 00480 00481 // append qsettings fontpath 00482 QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); 00483 settings.beginGroup(QLatin1String("Qt")); 00484 00485 QStringList fontpath; 00486 00487 int npaths; 00488 char** font_path; 00489 font_path = XGetFontPath(X11->display, &npaths); 00490 bool xfsconfig_read = false; 00491 for (int i=0; i<npaths; i++) { 00492 // If we're using xfs, append font paths from /etc/X11/fs/config 00493 // can't hurt, and chances are we'll get all fonts that way. 00494 if (((font_path[i])[0] != '/') && !xfsconfig_read) { 00495 // We're using xfs -> read its config 00496 bool finished = false; 00497 QFile f(QLatin1String("/etc/X11/fs/config")); 00498 if (!f.exists()) 00499 f.setFileName(QLatin1String("/usr/X11R6/lib/X11/fs/config")); 00500 if (!f.exists()) 00501 f.setFileName(QLatin1String("/usr/X11/lib/X11/fs/config")); 00502 if (f.exists()) { 00503 f.open(QIODevice::ReadOnly); 00504 while (f.error()==QFile::NoError && !finished) { 00505 QString fs = QString::fromLocal8Bit(f.readLine(1024)); 00506 fs=fs.trimmed(); 00507 if (fs.left(9)==QLatin1String("catalogue") && fs.contains(QLatin1Char('='))) { 00508 fs = fs.mid(fs.indexOf(QLatin1Char('=')) + 1).trimmed(); 00509 bool end = false; 00510 while (f.error()==QFile::NoError && !end) { 00511 if (fs[int(fs.length())-1] == QLatin1Char(',')) 00512 fs = fs.left(fs.length()-1); 00513 else 00514 end = true; 00515 00516 fs = fs.left(fs.indexOf(QLatin1String(":unscaled"))); 00517 if (fs[0] != QLatin1Char('#')) 00518 fontpath += fs; 00519 fs = QLatin1String(f.readLine(1024)); 00520 fs = fs.trimmed(); 00521 if (fs.isEmpty()) 00522 end = true; 00523 } 00524 finished = true; 00525 } 00526 } 00527 f.close(); 00528 } 00529 xfsconfig_read = true; 00530 } else { 00531 QString fs = QString::fromLocal8Bit(font_path[i]); 00532 fontpath += fs.left(fs.indexOf(QLatin1String(":unscaled"))); 00533 } 00534 } 00535 XFreeFontPath(font_path); 00536 00537 // append qsettings fontpath 00538 QStringList fp = settings.value(QLatin1String("fontPath")).toStringList(); 00539 if (!fp.isEmpty()) 00540 fontpath += fp; 00541 00542 qt_fontpath = new QStringList(fontpath); 00543 return fontpath; 00544 }
Here is the call graph for this function:

| unsigned int getChar | ( | const QChar * | str, | |
| int & | i, | |||
| const int | len | |||
| ) | [inline] |
Definition at line 1839 of file qfontengine_x11.cpp.
References QChar::unicode().
01840 { 01841 unsigned int uc = str[i].unicode(); 01842 if (uc >= 0xd800 && uc < 0xdc00 && i < len-1) { 01843 uint low = str[i+1].unicode(); 01844 if (low >= 0xdc00 && low < 0xe000) { 01845 uc = (uc - 0xd800)*0x400 + (low - 0xdc00) + 0x10000; 01846 ++i; 01847 } 01848 } 01849 return uc; 01850 }
Here is the call graph for this function:

| static int maxIndex | ( | XFontStruct * | f | ) | [inline, static] |
Definition at line 879 of file qfontengine_x11.cpp.
Referenced by QFontEngineXLFD::minLeftBearing(), and QFontEngineXLFD::minRightBearing().
00879 { 00880 return (((f->max_byte1 - f->min_byte1) * 00881 (f->max_char_or_byte2 - f->min_char_or_byte2 + 1)) + 00882 f->max_char_or_byte2 - f->min_char_or_byte2); 00883 }
| void qt_addBitmapToPath | ( | qreal | x0, | |
| qreal | y0, | |||
| const uchar * | image_data, | |||
| int | bpl, | |||
| int | w, | |||
| int | h, | |||
| QPainterPath * | path | |||
| ) |
Definition at line 258 of file qfontengine.cpp.
References collectSingleContour(), EdgeDown, EdgeLeft, EdgeRight, EdgeUp, GRID, path, SET, x, and y.
Referenced by QFontEngine::addBitmapFontToPath(), and addBitmapToPath().
00259 { 00260 uint *grid = new uint[(w+1)*(h+1)]; 00261 // set up edges 00262 for (int y = 0; y <= h; ++y) { 00263 for (int x = 0; x <= w; ++x) { 00264 bool topLeft = (x == 0)|(y == 0) ? false : SET(x - 1, y - 1); 00265 bool topRight = (x == w)|(y == 0) ? false : SET(x, y - 1); 00266 bool bottomLeft = (x == 0)|(y == h) ? false : SET(x - 1, y); 00267 bool bottomRight = (x == w)|(y == h) ? false : SET(x, y); 00268 00269 GRID(x, y) = 0; 00270 if ((!topRight) & bottomRight) 00271 GRID(x, y) |= EdgeRight; 00272 if ((!bottomRight) & bottomLeft) 00273 GRID(x, y) |= EdgeDown; 00274 if ((!bottomLeft) & topLeft) 00275 GRID(x, y) |= EdgeLeft; 00276 if ((!topLeft) & topRight) 00277 GRID(x, y) |= EdgeUp; 00278 } 00279 } 00280 00281 // collect edges 00282 for (int y = 0; y < h; ++y) { 00283 for (int x = 0; x < w; ++x) { 00284 if (!GRID(x, y)) 00285 continue; 00286 // found start of a contour, follow it 00287 collectSingleContour(x0, y0, grid, x, y, w, h, path); 00288 } 00289 } 00290 delete [] grid; 00291 }
Here is the call graph for this function:

| FT_Library qt_getFreetype | ( | ) |
Definition at line 131 of file qfontengine_x11.cpp.
References FT_Init_FreeType(), and library.
Referenced by checkSymbolFont().
00132 { 00133 if (!library) 00134 FT_Init_FreeType(&library); 00135 return library; 00136 }
Here is the call graph for this function:

| int qt_mib_for_xlfd_encoding | ( | const char * | encoding | ) |
Definition at line 364 of file qfontdatabase_x11.cpp.
References XlfdEncoding::mib, qt_xlfd_encoding_id(), and xlfd_encoding.
00365 { 00366 int id = qt_xlfd_encoding_id(encoding); 00367 if (id != -1) return xlfd_encoding[id].mib; 00368 return 0; 00369 };
Here is the call graph for this function:

| int qt_xlfd_encoding_id | ( | const char * | encoding | ) |
Definition at line 320 of file qfontdatabase_x11.cpp.
References XlfdEncoding::hash1, XlfdEncoding::hash2, XlfdEncoding::id, len, make_tag, n, XlfdEncoding::name, and xlfd_encoding.
Referenced by loadXlfds(), and qt_mib_for_xlfd_encoding().
00321 { 00322 // qDebug("looking for encoding id for '%s'", encoding); 00323 int len = strlen(encoding); 00324 if (len < 4) 00325 return -1; 00326 unsigned int hash1 = make_tag(encoding[0], encoding[1], encoding[2], encoding[3]); 00327 const char *ch = encoding + len - 4; 00328 unsigned int hash2 = make_tag(ch[0], ch[1], ch[2], ch[3]); 00329 00330 const XlfdEncoding *enc = xlfd_encoding; 00331 for (; enc->name; ++enc) { 00332 if ((enc->hash1 && enc->hash1 != hash1) || 00333 (enc->hash2 && enc->hash2 != hash2)) 00334 continue; 00335 // hashes match, do a compare if strings match 00336 // the enc->name can contain '*'s we have to interpret correctly 00337 const char *n = enc->name; 00338 const char *e = encoding; 00339 while (1) { 00340 // qDebug("bol: *e='%c', *n='%c'", *e, *n); 00341 if (*e == '\0') { 00342 if (*n) 00343 break; 00344 // qDebug("found encoding id %d", enc->id); 00345 return enc->id; 00346 } 00347 if (*e == *n) { 00348 ++e; 00349 ++n; 00350 continue; 00351 } 00352 if (*n != '*') 00353 break; 00354 ++n; 00355 // qDebug("skip: *e='%c', *n='%c'", *e, *n); 00356 while (*e && *e != *n) 00357 ++e; 00358 } 00359 } 00360 // qDebug("couldn't find encoding %s", encoding); 00361 return -1; 00362 }
const ushort char_table[] [static] |
Initial value:
{
40,
67,
70,
75,
86,
88,
89,
91,
102,
114,
124,
127,
205,
645,
884,
922,
1070,
12386
}
Definition at line 2165 of file qfontengine_x11.cpp.
const int char_table_entries = sizeof(char_table)/sizeof(ushort) [static] |
Definition at line 2186 of file qfontengine_x11.cpp.
QHash<QFontEngine::FaceId, QFreetypeFace *>* freetypeFaces = 0 [static] |
Definition at line 137 of file qfontengine_x11.cpp.
Referenced by QFreetypeFace::getFace(), and QFreetypeFace::release().
FT_Library library = 0 [static] |
Definition at line 130 of file qfontengine_x11.cpp.
Referenced by checkSymbolFont(), QFreetypeFace::getFace(), QFactoryLoader::instance(), QFontEngineFT::Font::loadGlyph(), processResourceFile(), QFactoryLoader::QFactoryLoader(), qt_getFreetype(), qt_unix_query(), QFreetypeFace::release(), and QLibrary::resolve().
QStringList* qt_fontpath = 0 [static] |
const uint subpixel_filter[3][3] [static] |
Initial value:
{
{ 180, 60, 16 },
{ 38, 180, 38 },
{ 16, 60, 180 }
}
Definition at line 1348 of file qfontengine_x11.cpp.
Referenced by QFontEngineFT::Font::loadGlyph().
1.5.1