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 "qfontengine_p.h"
|
||||
#include "qfontengine_mac_p.h"
|
||||
#include "qfontengine_coretext_p.h"
|
||||
#include "qfontinfo.h"
|
||||
#include "qfontmetrics.h"
|
||||
#include "qpaintdevice.h"
|
||||
@ -119,10 +120,10 @@ quint32 QFont::macFontID() const // ### need 64-bit version
|
||||
// Returns an ATSUFonFamilyRef
|
||||
Qt::HANDLE QFont::handle() const
|
||||
{
|
||||
#if 0
|
||||
#ifdef QT_MAC_USE_COCOA
|
||||
QFontEngine *fe = d->engineForScript(QUnicodeTables::Common);
|
||||
if (fe && fe->type() == QFontEngine::Mac)
|
||||
return (Qt::HANDLE)static_cast<QFontEngineMacMulti*>(fe)->fontFamilyRef();
|
||||
if (fe && fe->type() == QFontEngine::Multi)
|
||||
return (Qt::HANDLE)static_cast<QCoreTextFontEngineMulti*>(fe)->macFontID();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -124,6 +124,8 @@ public:
|
||||
QScriptItem *si) const;
|
||||
|
||||
virtual const char *name() const { return "CoreText"; }
|
||||
inline CTFontRef macFontID() const { return ctfont; }
|
||||
|
||||
protected:
|
||||
virtual void loadEngine(int at);
|
||||
|
||||
|
@ -1597,7 +1597,7 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
|
||||
FT_Face face = 0;
|
||||
bool design = (default_hint_style == HintNone ||
|
||||
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++) {
|
||||
Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
|
||||
if (g) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user