Switch to use floating point pixelSize in QRawFont completely
Reviewed-by: Eskil (cherry picked from commit 500f8a4368be85a0ae8b7c46012deb0ab0c844ad) Change-Id: I6cfebcbb68697c9bf7a5634e98a09a26928467d7 Reviewed-on: http://codereview.qt.nokia.com/2386 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
This commit is contained in:
parent
ddf444d31a
commit
23bf50432b
@ -139,7 +139,7 @@ QRawFont::QRawFont()
|
||||
\note The referenced file must contain a TrueType or OpenType font.
|
||||
*/
|
||||
QRawFont::QRawFont(const QString &fileName,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
: d(new QRawFontPrivate)
|
||||
{
|
||||
@ -154,7 +154,7 @@ QRawFont::QRawFont(const QString &fileName,
|
||||
\note The data must contain a TrueType or OpenType font.
|
||||
*/
|
||||
QRawFont::QRawFont(const QByteArray &fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
: d(new QRawFontPrivate)
|
||||
{
|
||||
@ -204,7 +204,7 @@ bool QRawFont::isValid() const
|
||||
\sa loadFromData()
|
||||
*/
|
||||
void QRawFont::loadFromFile(const QString &fileName,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
{
|
||||
QFile file(fileName);
|
||||
@ -222,7 +222,7 @@ void QRawFont::loadFromFile(const QString &fileName,
|
||||
\sa loadFromFile()
|
||||
*/
|
||||
void QRawFont::loadFromData(const QByteArray &fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
{
|
||||
detach();
|
||||
|
@ -70,10 +70,10 @@ public:
|
||||
|
||||
QRawFont();
|
||||
QRawFont(const QString &fileName,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference = QFont::PreferDefaultHinting);
|
||||
QRawFont(const QByteArray &fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference = QFont::PreferDefaultHinting);
|
||||
QRawFont(const QRawFont &other);
|
||||
~QRawFont();
|
||||
@ -117,11 +117,11 @@ public:
|
||||
qreal unitsPerEm() const;
|
||||
|
||||
void loadFromFile(const QString &fileName,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference);
|
||||
|
||||
void loadFromData(const QByteArray &fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference);
|
||||
|
||||
bool supportsCharacter(quint32 ucs4) const;
|
||||
|
@ -100,7 +100,7 @@ void QRawFontPrivate::platformCleanUp()
|
||||
// Font engine handles all resources
|
||||
}
|
||||
|
||||
void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData, int pixelSize,
|
||||
void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData, qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
{
|
||||
Q_ASSERT(fontEngine == 0);
|
||||
|
@ -55,7 +55,7 @@ void QRawFontPrivate::platformCleanUp()
|
||||
extern int qt_defaultDpi();
|
||||
|
||||
void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
{
|
||||
// Mac OS X ignores it
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
void cleanUp();
|
||||
void platformCleanUp();
|
||||
void platformLoadFromData(const QByteArray &fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference);
|
||||
|
||||
static QRawFontPrivate *get(const QRawFont &font) { return font.d.data(); }
|
||||
|
@ -53,7 +53,7 @@ void QRawFontPrivate::platformCleanUp()
|
||||
{
|
||||
}
|
||||
|
||||
void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData, int pixelSize,
|
||||
void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData, qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
{
|
||||
Q_ASSERT(fontEngine == 0);
|
||||
|
@ -546,7 +546,7 @@ void QRawFontPrivate::platformCleanUp()
|
||||
}
|
||||
|
||||
void QRawFontPrivate::platformLoadFromData(const QByteArray &_fontData,
|
||||
int pixelSize,
|
||||
qreal pixelSize,
|
||||
QFont::HintingPreference hintingPreference)
|
||||
{
|
||||
QByteArray fontData(_fontData);
|
||||
|
Loading…
Reference in New Issue
Block a user