<table><tr><td style="">pshinjo added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D25339">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D25339#563370" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D25339#563370</a>, <a href="https://phabricator.kde.org/p/xuetianweng/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@xuetianweng</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>And what I'd like to point is, for CJK users, it is uncommon for them to select a single font to cover all the characters, because such fonts are really rare. People usually select one latin only font and just let system (fontconfig) select the fallback for them.</p></div>
</blockquote>
<p>This statement is valid even for non-CJK users who only occasionally see the said characters.</p>
<p>For all screenshots, left hand side is git master+this patch, right hand side is Kate 19.12.3/Frameworks 5.68.0 on Ubuntu 20.04.</p>
<p>Test 1 - Hack + Noto Sans Mono CJK KR 9pt (Hack does not contain CJK glyphs, so for missing glyphs the latter will be used). Notice that only in the left hand side the underline in my e-mail address is visible:</p>
<p><a href="https://phabricator.kde.org/F8284453" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F8284453: Screenshot_20200504_210144.png</a></p>
<p>Test 2 - Nanum Square 9pt (contains both Latin-1 and Korean glyphs):</p>
<p><a href="https://phabricator.kde.org/F8284455" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F8284455: Screenshot_20200504_210313.png</a></p>
<p>Test 3 - Ubuntu Mono + Noto Sans Mono CJK KR 9pt. For me the right hand side is a regression, since neither Cyrillic nor Korean scripts are clearly visible when both of them are in the same line. Also in this setup most of Korean texts are cut by half even when there are only Korean texts. Compare it with the other lines where only Cyrillic is visible:</p>
<p><a href="https://phabricator.kde.org/F8284485" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">F8284485: Screenshot_20200504_213506.png</a></p>
<p>I can also confirm about 6-7 lines of loss, but for me the right hand side has issues. Need to find some compromise.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D25339#inline-168406">View Inline</a><span style="color: #4b4d51; font-weight: bold;">katerenderer.cpp:1040</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; "> <span class="n">m_fontHeight</span> <span style="color: #aa2211">=</span> <span class="n">qMax</span><span class="p">(</span><span style="color: #601200">1</span><span class="p">,</span> <span class="n">qCeil</span><span class="p">(</span><span class="n">m_fontMetrics</span><span class="p">.</span><span class="n">ascent</span><span class="p">()</span> <span style="color: #aa2211">+</span> <span class="n">m_fontMetrics</span><span class="p">.</span><span class="n">descent</span><span class="p">()));</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// Try to use representitve character from English, Chinese, Japanese</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">// and Korean to calculate the line height.</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I think this causes the regression mentioned in</p>
<blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D25339#663322" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D25339#663322</a>, <a href="https://phabricator.kde.org/p/rjvbb/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@rjvbb</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p style="padding: 0; margin: 8px;">I can't speak for the special cases where this change would improve matters, but for me it introduces a clear regression (waste of vertical space: 12 lines less) in a basic ascii code editing context. Font used is Ubuntu Mono 10pt.</p></div>
</blockquote>
<p style="padding: 0; margin: 8px;">But this part is the raison d'etre for this patch: provide enough font height for non-latin-1 text. Also not considered is glyphs from other scripts, such as Cyrillic, Arabic, ... What could be another solution?</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D25339">https://phabricator.kde.org/D25339</a></div></div><br /><div><strong>To: </strong>xuetianweng, KTextEditor, cullmann, dhaumann, Frameworks, rjvbb<br /><strong>Cc: </strong>pshinjo, rjvbb, fakefred, anthonyfieroni, kde-frameworks-devel, kwrite-devel, rrosch, LeGast00n, cblack, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>