Created
March 8, 2018 17:21
-
-
Save pixaline/184ebe8ef1381580095a9aac7f8e8f77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libs/flake/text/KoSvgTextShape.cpp b/libs/flake/text/KoSvgTextShape.cpp | |
index c829e57f2a..735874f43e 100644 | |
--- a/libs/flake/text/KoSvgTextShape.cpp | |
+++ b/libs/flake/text/KoSvgTextShape.cpp | |
@@ -127,9 +127,16 @@ void KoSvgTextShape::paintComponent(QPainter &painter, const KoViewConverter &co | |
} | |
applyConversion(painter, converter); | |
+ | |
+ // Disable anti-aliasing for scaled (large font) text | |
+ painter.save(); | |
+ painter.setRenderHint(QPainter::Antialiasing, false); | |
+ painter.setRenderHint(QPainter::TextAntialiasing, false); | |
+ | |
for (int i = 0; i < (int)d->cachedLayouts.size(); i++) { | |
d->cachedLayouts[i]->draw(&painter, d->cachedLayoutsOffsets[i]); | |
} | |
+ painter.restore(); | |
} | |
void KoSvgTextShape::paintStroke(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext) | |
@@ -208,6 +215,12 @@ QVector<TextChunk> mergeIntoChunks(const QVector<KoSvgTextChunkShapeLayoutInterf | |
formatRange.length = it->text.size(); | |
formatRange.format = it->format; | |
+ // Disable anti-aliasing at normal size | |
+ int strategy = formatRange.format.intProperty(QTextFormat::FontStyleStrategy); | |
+ strategy |= QFont::NoAntialias; | |
+ strategy |= QFont::NoSubpixelAntialias; | |
+ formatRange.format.setProperty(QTextFormat::FontStyleStrategy, strategy); | |
+ | |
currentChunk.formats.append(formatRange); | |
currentChunk.text += it->text; | |
diff --git a/libs/ui/forms/wdgselectionoptions.ui b/libs/ui/forms/wdgselectionoptions.ui | |
index 4f5427e9c9..5774e1f0af 100644 | |
--- a/libs/ui/forms/wdgselectionoptions.ui | |
+++ b/libs/ui/forms/wdgselectionoptions.ui | |
@@ -177,7 +177,7 @@ | |
<string>Anti-aliasing</string> | |
</property> | |
<property name="checked"> | |
- <bool>true</bool> | |
+ <bool>false</bool> | |
</property> | |
</widget> | |
</item> | |
diff --git a/plugins/impex/jpeg/kis_jpeg_converter.cc b/plugins/impex/jpeg/kis_jpeg_converter.cc | |
index 6435bf0d4f..72f31829cb 100644 | |
--- a/plugins/impex/jpeg/kis_jpeg_converter.cc | |
+++ b/plugins/impex/jpeg/kis_jpeg_converter.cc | |
@@ -28,9 +28,6 @@ | |
# include <lcms.h> | |
#endif | |
-extern "C" { | |
-#include <iccjpeg.h> | |
-} | |
#include <exiv2/jpgimage.hpp> | |
@@ -65,6 +62,9 @@ extern "C" { | |
#include <kis_jpeg_destination.h> | |
#include "kis_iterator_ng.h" | |
+extern "C" { | |
+#include <iccjpeg.h> | |
+} | |
#include <KoColorModelStandardIds.h> | |
#define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ | |
diff --git a/plugins/impex/jpeg/kis_jpeg_converter.h b/plugins/impex/jpeg/kis_jpeg_converter.h | |
index fdd095fcae..be1f29cba8 100644 | |
--- a/plugins/impex/jpeg/kis_jpeg_converter.h | |
+++ b/plugins/impex/jpeg/kis_jpeg_converter.h | |
@@ -22,9 +22,6 @@ | |
#include <stdio.h> | |
-extern "C" { | |
-#include <jpeglib.h> | |
-} | |
#include <QColor> | |
#include <QVector> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment