Kaydet (Commit) e8526657 authored tarafından Thorsten Behrens's avatar Thorsten Behrens

QT5 fixup non-qt5 build

Change-Id: Ifea73d81ba3863fd6a99453cb38303eb729f6ff4
üst efb96db1
...@@ -70,8 +70,8 @@ hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData ...@@ -70,8 +70,8 @@ hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData
} }
#else #else
const char* pBuffer = nullptr; const char* pBuffer = nullptr;
CommonSalLayout *pLayout = static_cast<CommonSalLayout*>( pUserData );
#if ENABLE_QT5 #if ENABLE_QT5
CommonSalLayout *pLayout = static_cast<CommonSalLayout*>( pUserData );
QByteArray aTable; QByteArray aTable;
if ( pLayout->mbUseQt5 ) if ( pLayout->mbUseQt5 )
{ {
...@@ -83,8 +83,9 @@ hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData ...@@ -83,8 +83,9 @@ hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData
else else
#endif #endif
{ {
FreetypeFont* pFont = static_cast<FreetypeFont*>(pUserData);
pBuffer = reinterpret_cast<const char*>( pBuffer = reinterpret_cast<const char*>(
pLayout->mpFreetypeFont->GetTable(pTagName, &nLength) ); pFont->GetTable(pTagName, &nLength) );
} }
#endif #endif
...@@ -256,41 +257,44 @@ CommonSalLayout::CommonSalLayout(const CoreTextStyle& rCoreTextStyle) ...@@ -256,41 +257,44 @@ CommonSalLayout::CommonSalLayout(const CoreTextStyle& rCoreTextStyle)
#else #else
#if ENABLE_QT5
CommonSalLayout::CommonSalLayout(const FontSelectPattern &rFSP, CommonSalLayout::CommonSalLayout(const FontSelectPattern &rFSP,
FreetypeFont *pFreetypeFont, FreetypeFont *pFreetypeFont,
Qt5Font *pQt5Font, bool bUseQt5) Qt5Font *pQt5Font, bool bUseQt5)
: mrFontSelData(rFSP) : mrFontSelData(rFSP)
, mpFreetypeFont(pFreetypeFont) , mpFreetypeFont(pFreetypeFont)
#if ENABLE_QT5
, mbUseQt5(bUseQt5) , mbUseQt5(bUseQt5)
, mpQFont(pQt5Font) , mpQFont(pQt5Font)
#endif
, mpVertGlyphs(nullptr) , mpVertGlyphs(nullptr)
{ {
#if ENABLE_QT5
if (mbUseQt5) if (mbUseQt5)
mpHbFont = mpQFont->GetHbFont(); mpHbFont = mpQFont->GetHbFont();
else else
#endif
mpHbFont = mpFreetypeFont->GetHbFont(); mpHbFont = mpFreetypeFont->GetHbFont();
if (!mpHbFont) if (!mpHbFont)
{ {
hb_face_t* pHbFace = hb_face_create_for_tables(getFontTable, this, nullptr); hb_face_t* pHbFace = hb_face_create_for_tables(getFontTable, this, nullptr);
mpHbFont = createHbFont(pHbFace); mpHbFont = createHbFont(pHbFace);
#if ENABLE_QT5
if (mbUseQt5) if (mbUseQt5)
mpQFont->SetHbFont(mpHbFont); mpQFont->SetHbFont(mpHbFont);
else else
#endif
mpFreetypeFont->SetHbFont(mpHbFont); mpFreetypeFont->SetHbFont(mpHbFont);
} }
} }
#endif
CommonSalLayout::CommonSalLayout(FreetypeFont& rFreetypeFont) CommonSalLayout::CommonSalLayout(FreetypeFont& rFreetypeFont) :
: CommonSalLayout(rFreetypeFont.GetFontSelData(), mrFontSelData(rFreetypeFont.GetFontSelData())
&rFreetypeFont, nullptr, false) , mpFreetypeFont(&rFreetypeFont)
, mpVertGlyphs(nullptr)
{ {
mpHbFont = rFreetypeFont.GetHbFont();
if (!mpHbFont)
{
hb_face_t* pHbFace = hb_face_create_for_tables(getFontTable, &rFreetypeFont, nullptr);
mpHbFont = createHbFont(pHbFace);
}
} }
#if ENABLE_QT5 #if ENABLE_QT5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment