Bug#858584: konsole: please backport font rendering fix for noto-sans

2017-04-28 Thread Boyuan Yang
Hello? Ping?

Are you still working on this issue to get the fix into Stretch? The fixed 
version is still stuck in unstable due to migration blocking.

Please file an unblock request against release.debian.org on konsole/
4:16.12.0-3 if you find that possible.

Thanks!

--
Sincerely,
Boyuan Yang

signature.asc
Description: This is a digitally signed message part.


Bug#858584: konsole: please backport font rendering fix for noto-sans

2017-03-27 Thread Maximiliano Curia

¡Hola Boyuan!

El 2017-03-24 a las 12:11 +0800, Boyuan Yang escribió:
Package: konsole 
Version: 4:16.12.0-1 
Severity: normal 
Tags: patch


Font rendering for Noto Sans CJK in konsole has long been broken. This made 
users of konsole + Noto Sans CJK painful.


Noto Sans is not a monospace font, you mean Hack right?


Upstream committed a fix in git HEAD recently:



   https://git.reviewboard.kde.org/r/129281/diff/2/



It would be great if konsole in Stretch would include this fix.



A raw diff file will be sent as well as attachment.


diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp 
index 39a8b84..dc991ef 100644 
--- a/src/TerminalDisplay.cpp 
+++ b/src/TerminalDisplay.cpp 
@@ -856,18 +856,10 @@ void TerminalDisplay::drawCharacters(QPainter& painter, 
// This still allows RTL characters to be rendered in the RTL way. 
painter.setLayoutDirection(Qt::LeftToRight);


-// the drawText(rect,flags,string) overload is used here with null flags 
-// instead of drawText(rect,string) because the (rect,string) overload causes 
-// the application's default layout direction to be used instead of 
-// the widget-specific layout direction, which should always be 
-// Qt::LeftToRight for this widget 
-// 
-// This was discussed in: http://lists.kde.org/?t=12055222362&r=1&w=2 
if (_bidiEnabled) { 
-painter.drawText(rect, 0, text); 
+painter.drawText(rect.x(), rect.y() + QFontMetrics(font).ascent(), text); 
} else { 
-// See bug 280896 for more info 
-painter.drawText(rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + text); 
+painter.drawText(rect.x(), rect.y() + QFontMetrics(font).ascent(), LTR_OVERRIDE_CHAR + text); 
} 
} 
}


There are two more patches that are needed in this line, this is 
7e2f9d839f5af447a0fc7fd178dd5d8f58e489bb "Render text at primary font's 
baseline", f5016a867ae4657b3efeb2e8946b07de7217d9d1 replaces the 
QFontMetrics(font).ascent() by _fontAscent which is already being cached, and  
bb5ef879586c6a0c7739342f475e8584d61e adds back the _lineSpacing setting 
(set by the user in the Advanced preferences tab).


I've uploaded 4:16.12.0-2 to experimental with this fixes and others that I'm 
currently testing. It would be nice to have feedback on that build, so if you 
can, please test it.


Happy hacking,
--
"There are two ways of constructing a software design.  One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies."
-- C.A.R. Hoare
Saludos /\/\ /\ >< `/


signature.asc
Description: PGP signature


Bug#858584: konsole: please backport font rendering fix for noto-sans

2017-03-23 Thread Boyuan Yang
Package: konsole
Version: 4:16.12.0-1
Severity: normal
Tags: patch

Font rendering for Noto Sans CJK in konsole has long been broken. This made
users of konsole + Noto Sans CJK painful.

Upstream committed a fix in git HEAD recently:

https://git.reviewboard.kde.org/r/129281/diff/2/

It would be great if konsole in Stretch would include this fix.

A raw diff file will be sent as well as attachment.



-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages konsole depends on:
ii  kio   5.28.0-1
ii  konsole-kpart 4:16.12.0-1
ii  libc6 2.24-9
ii  libkf5completion5 5.28.0-1
ii  libkf5configcore5 5.28.0-1+b2
ii  libkf5configgui5  5.28.0-1+b2
ii  libkf5configwidgets5  5.28.0-1
ii  libkf5coreaddons5 5.28.0-1+b2
ii  libkf5crash5  5.28.0-1
ii  libkf5dbusaddons5 5.28.0-1
ii  libkf5i18n5   5.28.0-1+b2
ii  libkf5iconthemes5 5.28.0-1
ii  libkf5kiowidgets5 5.28.0-1
ii  libkf5notifyconfig5   5.28.0-1
ii  libkf5widgetsaddons5  5.28.0-1
ii  libkf5windowsystem5   5.28.0-1
ii  libkf5xmlgui5 5.28.0-1
ii  libqt5core5a  5.7.1+dfsg-3+b1
ii  libqt5gui55.7.1+dfsg-3+b1
ii  libqt5widgets55.7.1+dfsg-3+b1
ii  libstdc++66.3.0-6

konsole recommends no packages.

konsole suggests no packages.

-- no debconf information
diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
index 39a8b84..dc991ef 100644
--- a/src/TerminalDisplay.cpp
+++ b/src/TerminalDisplay.cpp
@@ -856,18 +856,10 @@ void TerminalDisplay::drawCharacters(QPainter& painter,
 // This still allows RTL characters to be rendered in the RTL way.
 painter.setLayoutDirection(Qt::LeftToRight);
 
-// the drawText(rect,flags,string) overload is used here with null 
flags
-// instead of drawText(rect,string) because the (rect,string) overload 
causes
-// the application's default layout direction to be used instead of
-// the widget-specific layout direction, which should always be
-// Qt::LeftToRight for this widget
-//
-// This was discussed in: 
http://lists.kde.org/?t=12055222362&r=1&w=2
 if (_bidiEnabled) {
-painter.drawText(rect, 0, text);
+painter.drawText(rect.x(), rect.y() + QFontMetrics(font).ascent(), 
text);
 } else {
-// See bug 280896 for more info
-painter.drawText(rect, Qt::AlignBottom, LTR_OVERRIDE_CHAR + text);
+painter.drawText(rect.x(), rect.y() + QFontMetrics(font).ascent(), 
LTR_OVERRIDE_CHAR + text);
 }
 }
 }