Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwindowsfontengine.cpp File Reference
#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 888 of file qwindowsfontengine.cpp.

◆ GGO_UNHINTED

#define GGO_UNHINTED   0x0100

Definition at line 637 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:45
out<< "Qt"<< "rocks!";----Qt------rocks!--QTextStream in(file);QChar ch1, ch2, ch3;in > ch1 ch2 ch3

Definition at line 50 of file qwindowsfontengine.cpp.

◆ SPI_GETFONTSMOOTHINGCONTRAST

#define SPI_GETFONTSMOOTHINGCONTRAST   0x200C

Definition at line 1050 of file qwindowsfontengine.cpp.

◆ SPI_SETFONTSMOOTHINGCONTRAST

#define SPI_SETFONTSMOOTHINGCONTRAST   0x200D

Definition at line 1051 of file qwindowsfontengine.cpp.

◆ TT_PRIM_CSPLINE

#define TT_PRIM_CSPLINE   3

Definition at line 46 of file qwindowsfontengine.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
max_font_count 

Definition at line 503 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 640 of file qwindowsfontengine.cpp.

References cb, i, p1, p2, position(), qt_to_qpointf(), qWarning, ret, TT_PRIM_CSPLINE, QPainterPath::Element::x, and QPainterPath::Element::y.

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 279 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 628 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 632 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 504 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 526 of file qwindowsfontengine.cpp.

Referenced by QWindowsFontEngine::minRightBearing().