From aff888a3e7f3d9ee2c5611c2dd5c0ff1693752c6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 2 Aug 2010 17:04:14 +0200 Subject: configure: don't symlink the mkspecs/features directory In shadow builds, the directory QT_BUILD_TREE/mkspecs/features isn't a mere symlink anymore. The directories below mkspecs/features are copied and every single file is symlinked. This makes it possible to place .prf files into a shadow build's mkspecs/features directory, like Qt Mobility does with its mobility.prf, without polluting the source directory. Task-number: QTBUG-12545 Reviewed-by: ossi --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index c61250b..52a4063 100755 --- a/configure +++ b/configure @@ -2397,6 +2397,14 @@ if [ "$OPT_SHADOW" = "yes" ]; then ln -s "$relpath"/mkspecs/* "$outpath/mkspecs" rm -f "$outpath/mkspecs/default" + # Special case for mkspecs/features directory. + # To be able to place .prf files into a shadow build directory, + # we're creating links for files only. The directory structure is reproduced. + # A simple "cp -rs" doesn't work on Mac. :( + rm -rf "$outpath/mkspecs/features" + find "$relpath/mkspecs/features" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p + find "$relpath/mkspecs/features" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" + # symlink the doc directory rm -rf "$outpath/doc" ln -s "$relpath/doc" "$outpath/doc" -- cgit v0.12 From 00fb79714162ea3e434cf66a87a70a4fc26b2b86 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 2 Aug 2010 17:17:49 +0200 Subject: Fix Japanese characters not displayed in webkit on Mac Cocoa 64 (Regression) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our stringToCMap implementation for CoreText that bypasses the shaping needs to have basic support for font cascading / glyph substitution. We now use CTFontCreateForString to determine the substitute font for missing glyphs. Task-number: QTBUG-12411 Reviewed-by: Tor Arne Vestbø --- src/gui/text/qfontengine_mac.mm | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index deaad57..91b6082 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -349,11 +349,32 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay int *nglyphs, QTextEngine::ShaperFlags flags) const { *nglyphs = len; + QCFType cfstring; + QVarLengthArray cgGlyphs(len); CTFontGetGlyphsForCharacters(ctfont, (const UniChar*)str, cgGlyphs.data(), len); - for (int i = 0; i < len; ++i) - glyphs->glyphs[i] = cgGlyphs[i]; + for (int i = 0; i < len; ++i) { + if (cgGlyphs[i]) { + glyphs->glyphs[i] = cgGlyphs[i]; + } else { + if (!cfstring) + cfstring = CFStringCreateWithCharactersNoCopy(0, reinterpret_cast(str), len, kCFAllocatorNull); + QCFType substituteFont = CTFontCreateForString(ctfont, cfstring, CFRangeMake(i, 1)); + CGGlyph substituteGlyph = 0; + CTFontGetGlyphsForCharacters(substituteFont, (const UniChar*)str + i, &substituteGlyph, 1); + if (substituteGlyph) { + const uint fontIndex = (fontIndexForFont(substituteFont) << 24); + glyphs->glyphs[i] = substituteGlyph | fontIndex; + if (!(flags & QTextEngine::GlyphIndicesOnly)) { + CGSize advance; + CTFontGetAdvancesForGlyphs(substituteFont, kCTFontHorizontalOrientation, &substituteGlyph, &advance, 1); + glyphs->advances_x[i] = QFixed::fromReal(advance.width); + glyphs->advances_y[i] = QFixed::fromReal(advance.height); + } + } + } + } if (flags & QTextEngine::GlyphIndicesOnly) return true; @@ -362,9 +383,14 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay CTFontGetAdvancesForGlyphs(ctfont, kCTFontHorizontalOrientation, cgGlyphs.data(), advances.data(), len); for (int i = 0; i < len; ++i) { + if (glyphs->glyphs[i] & 0xff000000) + continue; glyphs->advances_x[i] = QFixed::fromReal(advances[i].width); glyphs->advances_y[i] = QFixed::fromReal(advances[i].height); - if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { + } + + if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) { + for (int i = 0; i < len; ++i) { glyphs->advances_x[i] = glyphs->advances_x[i].round(); glyphs->advances_y[i] = glyphs->advances_y[i].round(); } -- cgit v0.12 From e55fd8c9790863f2d6001bda617a9d87be61f29b Mon Sep 17 00:00:00 2001 From: Kevin Wright Date: Mon, 2 Aug 2010 17:43:42 +0200 Subject: Modified qtdemo so error does not appear when there is no demo/example description availablei (QTBUG-12522). There is already output when building Qt that a description is missing -- the user does not need to witness an error about ensuring the documentation has been built just because a description has not been contributed. --- demos/qtdemo/examplecontent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp index 19be3e0..65c078d 100644 --- a/demos/qtdemo/examplecontent.cpp +++ b/demos/qtdemo/examplecontent.cpp @@ -91,8 +91,8 @@ QString ExampleContent::loadDescription() if (paragraphs.length() < 1 && Colors::verbose) qDebug() << "- ExampleContent::loadDescription(): Could not load description:" << MenuManager::instance()->info[this->name]["docfile"]; - QString description = Colors::contentColor + - QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); + QString description = Colors::contentColor + QLatin1String(""); + //QLatin1String("Could not load description. Ensure that the documentation for Qt is built."); // QTBUG-12522: If there is no description why show an error to the user when qDebug above communications the issue (if it is indeed an issue at all) when demos are built? for (int p = 0; p < int(paragraphs.length()); ++p) { description = this->extractTextFromParagraph(paragraphs.item(p)); if (this->isSummary(description)) { -- cgit v0.12 From 41ae34d84a2d5024b5d42a25a2bf97b6a6dd8412 Mon Sep 17 00:00:00 2001 From: Kevin Wright Date: Mon, 2 Aug 2010 18:04:35 +0200 Subject: Added notice that some links are online documents. --- doc/src/index.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 4acf212..9df7641 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -94,12 +94,12 @@
-- cgit v0.12