Lines 2297-2302
static QPainterPath path_for_glyphs(cons
Link Here
|
2297 |
path.setFillRule(Qt::WindingFill); |
2297 |
path.setFillRule(Qt::WindingFill); |
2298 |
ft->lockFace(); |
2298 |
ft->lockFace(); |
2299 |
int i = 0; |
2299 |
int i = 0; |
|
|
2300 |
const QFixed offs = QFixed::fromReal(aliasedCoordinateDelta); |
2300 |
while (i < glyphs.size()) { |
2301 |
while (i < glyphs.size()) { |
2301 |
QFontEngineFT::Glyph *glyph = ft->loadGlyph(glyphs[i], QFontEngineFT::Format_Mono); |
2302 |
QFontEngineFT::Glyph *glyph = ft->loadGlyph(glyphs[i], QFontEngineFT::Format_Mono); |
2302 |
// #### fix case where we don't get a glyph |
2303 |
// #### fix case where we don't get a glyph |
Lines 2306-2320
static QPainterPath path_for_glyphs(cons
Link Here
|
2306 |
Q_ASSERT(glyph->format == QFontEngineFT::Format_Mono); |
2307 |
Q_ASSERT(glyph->format == QFontEngineFT::Format_Mono); |
2307 |
int n = 0; |
2308 |
int n = 0; |
2308 |
int h = glyph->height; |
2309 |
int h = glyph->height; |
2309 |
int xp = qRound(positions[i].x); |
2310 |
int xp = qRound(positions[i].x + offs); |
2310 |
int yp = qRound(positions[i].y); |
2311 |
int yp = qRound(positions[i].y + offs); |
2311 |
|
2312 |
|
2312 |
xp += glyph->x; |
2313 |
xp += glyph->x; |
2313 |
yp += -glyph->y + glyph->height; |
2314 |
yp += -glyph->y + glyph->height; |
2314 |
int pitch = ((glyph->width + 31) & ~31) >> 3; |
2315 |
int pitch = ((glyph->width + 31) & ~31) >> 3; |
2315 |
|
2316 |
|
2316 |
uchar *src = glyph->data; |
2317 |
uchar *src = glyph->data; |
2317 |
while (h--) { |
2318 |
for (;h > 0;h--) { |
2318 |
for (int x = 0; x < glyph->width; ++x) { |
2319 |
for (int x = 0; x < glyph->width; ++x) { |
2319 |
bool set = src[x >> 3] & (0x80 >> (x & 7)); |
2320 |
bool set = src[x >> 3] & (0x80 >> (x & 7)); |
2320 |
if (set) { |
2321 |
if (set) { |
Lines 2349-2355
void QX11PaintEngine::drawFreetype(const
Link Here
|
2349 |
return; |
2350 |
return; |
2350 |
} |
2351 |
} |
2351 |
|
2352 |
|
2352 |
const bool xrenderPath = (X11->use_xrender |
2353 |
const bool xrenderPath = (X11->use_xrender && !ft->isBitmapFont() |
2353 |
&& !(d->pdev->devType() == QInternal::Pixmap |
2354 |
&& !(d->pdev->devType() == QInternal::Pixmap |
2354 |
&& static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPixmapData::BitmapType)); |
2355 |
&& static_cast<const QPixmap *>(d->pdev)->data->pixelType() == QPixmapData::BitmapType)); |
2355 |
|
2356 |
|