Review Request 129281: [Konsole] Render text at primary font's baseline

Martin Tobias Holmedahl Sandsmark martin.sandsmark at kde.org
Sun Nov 6 13:52:05 UTC 2016



> On Nov. 6, 2016, 1:35 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> > src/TerminalDisplay.cpp, line 859
> > <https://git.reviewboard.kde.org/r/129281/diff/1/?file=483169#file483169line859>
> >
> >     Minor nitpick: is there any reason not to unconditionally add the LTR_OVERRIDE_CHAR?
> >     
> >     I don't like the ? : stuff, and the line gets overly long.

otherwise it looks good, so +1 from me.


- Martin Tobias Holmedahl


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129281/#review100648
-----------------------------------------------------------


On Oct. 29, 2016, 12:27 a.m., Christoph Feck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129281/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2016, 12:27 a.m.)
> 
> 
> Review request for KDE Frameworks and Konsole.
> 
> 
> Bugs: 371687
>     http://bugs.kde.org/show_bug.cgi?id=371687
> 
> 
> Repository: konsole
> 
> 
> Description
> -------
> 
> When Konsole draws a line of text, it first computes the rectangle of the line that the text covers (taking into account cells width and height), then passes this rectangle to the drawText(QRect, flags, text) call.
> 
> Qt detects if the selected font does not offer all characters in the text, and substitutes individual characters with a different font. Due to designer choices, the same font point size does not lead to same pixel height (or ascent size) in all fonts, so the substituted characters might be larger than the characters from the primary font.
> 
> Using a rectangle causes Qt to position glyphs relative to the bounding box of the text, instead of anchored to the baseline.
> 
> This patch uses a pixel position instead of a rectangle to draw the text, taking into account only the baseline of the primary font.
> 
> I have added all "frameworks" developers to increase possible test coverage.
> 
> 
> Diffs
> -----
> 
>   src/TerminalDisplay.cpp 39a8b84 
> 
> Diff: https://git.reviewboard.kde.org/r/129281/diff/
> 
> 
> Testing
> -------
> 
> On my system, lines with substituted Unicode characters are no longer shifted away from the baseline, and therefore do not appear cropped.
> 
> Further testing is needed, as there are many (equivalent, similar, or different) bug reports about font rendering on different systems, see https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&component=font&product=konsole
> 
> 
> Thanks,
> 
> Christoph Feck
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20161106/25c29f27/attachment.html>


More information about the konsole-devel mailing list