Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindowsfontengine.cpp File Reference

(1593b1f6d610ce9bdb9dff4104f7f447e03a9585)

#include "qwindowsfontengine_p.h"
#include "qwindowsnativeimage_p.h"
#include "qwindowsfontdatabase_p.h"
#include <QtCore/qt_windows.h>
#include <QtGui/qpa/qplatformintegration.h>
#include <QtGui/private/qtextengine_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/QPaintDevice>
#include <QtGui/QBitmap>
#include <QtGui/QPainter>
#include <QtGui/private/qpainter_p.h>
#include <QtGui/QPaintEngine>
#include <QtGui/private/qpaintengine_raster_p.h>
#include <QtGui/private/qtgui-config_p.h>
#include <QtCore/QtEndian>
#include <QtCore/QFile>
#include <QtCore/qmath.h>
#include <QtCore/QTextStream>
#include <QtCore/QThreadStorage>
#include <QtCore/private/qsystemlibrary_p.h>
#include <QtCore/private/qstringiterator_p.h>
#include <QtCore/QDebug>
#include <limits.h>
#include <qdebug.h>
+ Include dependency graph for qwindowsfontengine.cpp:

Go to the source code of this file.

Macros

#define TT_PRIM_CSPLINE   3
 
#define MAKE_LITTLE_ENDIAN_TAG(ch1, ch2, ch3, ch4)
 
#define GGO_UNHINTED   0x0100
 
#define CLEARTYPE_QUALITY   5
 
#define SPI_GETFONTSMOOTHINGCONTRAST   0x200C
 
#define SPI_SETFONTSMOOTHINGCONTRAST   0x200D
 

Enumerations

enum  { max_font_count = 256 }
 

Functions

static OUTLINETEXTMETRIC * getOutlineTextMetric (HDC hdc)
 
static QString stringFromOutLineTextMetric (const OUTLINETEXTMETRIC *otm, PSTR offset)
 
void calculateTTFGlyphWidth (HDC hdc, UINT glyph, int &width)
 
static double qt_fixed_to_double (const FIXED &p)
 
static QPointF qt_to_qpointf (const POINTFX &pt, qreal scale, qreal stretch)
 
static bool addGlyphToPath (glyph_t glyph, const QFixedPoint &position, HDC hdc, QPainterPath *path, bool ttf, glyph_metrics_t *metric=nullptr, qreal scale=1.0, qreal stretch=1.0)
 

Variables

static const ushort char_table []
 
static const int char_table_entries = sizeof(char_table)/sizeof(ushort)
 

Macro Definition Documentation

◆ CLEARTYPE_QUALITY

#define CLEARTYPE_QUALITY   5

Definition at line 896 of file qwindowsfontengine.cpp.

◆ GGO_UNHINTED

#define GGO_UNHINTED   0x0100

Definition at line 645 of file qwindowsfontengine.cpp.

◆ MAKE_LITTLE_ENDIAN_TAG

#define MAKE_LITTLE_ENDIAN_TAG ( ch1,
ch2,
ch3,
ch4 )
Value:
(\
(((quint32)(ch4)) << 24) | \
(((quint32)(ch3)) << 16) | \
(((quint32)(ch2)) << 8) | \
((quint32)(ch1)) \
)
unsigned int quint32
Definition qtypes.h:50
out<< "Qt"<< "rocks!";----Qt------rocks!--QTextStream in(file);QChar ch1, ch2, ch3;in > ch1 ch2 ch3

Definition at line 50 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::synthesized().

◆ SPI_GETFONTSMOOTHINGCONTRAST

#define SPI_GETFONTSMOOTHINGCONTRAST   0x200C

Definition at line 1058 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::alphaRGBMapForGlyph().

◆ SPI_SETFONTSMOOTHINGCONTRAST

#define SPI_SETFONTSMOOTHINGCONTRAST   0x200D

Definition at line 1059 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::alphaRGBMapForGlyph().

◆ TT_PRIM_CSPLINE

#define TT_PRIM_CSPLINE   3

Definition at line 46 of file qwindowsfontengine.cpp.

Referenced by addGlyphToPath().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
max_font_count 

Definition at line 511 of file qwindowsfontengine.cpp.

Function Documentation

◆ addGlyphToPath()

static bool addGlyphToPath ( glyph_t glyph,
const QFixedPoint & position,
HDC hdc,
QPainterPath * path,
bool ttf,
glyph_metrics_t * metric = nullptr,
qreal scale = 1.0,
qreal stretch = 1.0 )
static

Definition at line 648 of file qwindowsfontengine.cpp.

References cb, i, p1, p2, position(), qt_to_qpointf(), qWarning, ret, and TT_PRIM_CSPLINE.

Referenced by QWindowsFontEngine::addGlyphsToPath(), and QWindowsFontEngine::getUnscaledGlyph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateTTFGlyphWidth()

void calculateTTFGlyphWidth ( HDC hdc,
UINT glyph,
int & width )
inline

Definition at line 287 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::recalcAdvances().

+ Here is the caller graph for this function:

◆ getOutlineTextMetric()

static OUTLINETEXTMETRIC * getOutlineTextMetric ( HDC hdc)
static

Definition at line 69 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::getCMap(), and QWindowsFontEngine::properties().

+ Here is the caller graph for this function:

◆ qt_fixed_to_double()

static double qt_fixed_to_double ( const FIXED & p)
inlinestatic

Definition at line 636 of file qwindowsfontengine.cpp.

Referenced by qt_to_qpointf().

+ Here is the caller graph for this function:

◆ qt_to_qpointf()

static QPointF qt_to_qpointf ( const POINTFX & pt,
qreal scale,
qreal stretch )
inlinestatic

Definition at line 640 of file qwindowsfontengine.cpp.

References qt_fixed_to_double().

Referenced by addGlyphToPath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stringFromOutLineTextMetric()

static QString stringFromOutLineTextMetric ( const OUTLINETEXTMETRIC * otm,
PSTR offset )
inlinestatic

Definition at line 91 of file qwindowsfontengine.cpp.

References QString::fromWCharArray().

Referenced by QWindowsFontEngine::getCMap(), and QWindowsFontEngine::properties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ char_table

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,
0
}

Definition at line 512 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::minRightBearing().

◆ char_table_entries

const int char_table_entries = sizeof(char_table)/sizeof(ushort)
static

Definition at line 534 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::minRightBearing().