Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: Only enable design metrics for scalable fonts Add a way to retrieve CTFontRef from QFont
This commit is contained in:
commit
948d5f22c3
@ -43,6 +43,7 @@
|
|||||||
#include "qfont_p.h"
|
#include "qfont_p.h"
|
||||||
#include "qfontengine_p.h"
|
#include "qfontengine_p.h"
|
||||||
#include "qfontengine_mac_p.h"
|
#include "qfontengine_mac_p.h"
|
||||||
|
#include "qfontengine_coretext_p.h"
|
||||||
#include "qfontinfo.h"
|
#include "qfontinfo.h"
|
||||||
#include "qfontmetrics.h"
|
#include "qfontmetrics.h"
|
||||||
#include "qpaintdevice.h"
|
#include "qpaintdevice.h"
|
||||||
@ -119,10 +120,10 @@ quint32 QFont::macFontID() const // ### need 64-bit version
|
|||||||
// Returns an ATSUFonFamilyRef
|
// Returns an ATSUFonFamilyRef
|
||||||
Qt::HANDLE QFont::handle() const
|
Qt::HANDLE QFont::handle() const
|
||||||
{
|
{
|
||||||
#if 0
|
#ifdef QT_MAC_USE_COCOA
|
||||||
QFontEngine *fe = d->engineForScript(QUnicodeTables::Common);
|
QFontEngine *fe = d->engineForScript(QUnicodeTables::Common);
|
||||||
if (fe && fe->type() == QFontEngine::Mac)
|
if (fe && fe->type() == QFontEngine::Multi)
|
||||||
return (Qt::HANDLE)static_cast<QFontEngineMacMulti*>(fe)->fontFamilyRef();
|
return (Qt::HANDLE)static_cast<QCoreTextFontEngineMulti*>(fe)->macFontID();
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -124,6 +124,8 @@ public:
|
|||||||
QScriptItem *si) const;
|
QScriptItem *si) const;
|
||||||
|
|
||||||
virtual const char *name() const { return "CoreText"; }
|
virtual const char *name() const { return "CoreText"; }
|
||||||
|
inline CTFontRef macFontID() const { return ctfont; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void loadEngine(int at);
|
virtual void loadEngine(int at);
|
||||||
|
|
||||||
|
@ -1597,7 +1597,7 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
|
|||||||
FT_Face face = 0;
|
FT_Face face = 0;
|
||||||
bool design = (default_hint_style == HintNone ||
|
bool design = (default_hint_style == HintNone ||
|
||||||
default_hint_style == HintLight ||
|
default_hint_style == HintLight ||
|
||||||
(flags & HB_ShaperFlag_UseDesignMetrics));
|
(flags & HB_ShaperFlag_UseDesignMetrics)) && FT_IS_SCALABLE(freetype->face);
|
||||||
for (int i = 0; i < glyphs->numGlyphs; i++) {
|
for (int i = 0; i < glyphs->numGlyphs; i++) {
|
||||||
Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
|
Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
|
||||||
if (g) {
|
if (g) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user