D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-06 Thread Xuetian Weng
xuetianweng added a comment. I'm not sure if this is the right way to do it or it might cause any glitch, but here we go. Upon line rendering, update the maximum height we've ever seen. Though line height won't shrink during the edit phase, it will back to the actual value upon save.

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-06 Thread Xuetian Weng
xuetianweng updated this revision to Diff 82170. xuetianweng added a comment. Use actual line height instead of representitive character. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25339?vs=80607=82170 BRANCH arcpatch-D25339 REVISION DETAIL

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-06 Thread Frederick Yin
fakefred added a comment. In D25339#665351 , @xuetianweng wrote: > ... or you could give me some hint on that? Too bad I can't; it's been no more than a month since I began my study into KDE applications. I'd love to test out if someone

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-06 Thread Xuetian Weng
xuetianweng added a comment. In D25339#663915 , @fakefred wrote: > I second the as-an-option proposal. Hey, why not automatically increase the line height when CJK characters are detected? So the thing is we need to maintain a such

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-05 Thread Sven Brauch
brauch added a comment. In D25339#663915 , @fakefred wrote: > I second the as-an-option proposal. Hey, why not automatically increase the line height when CJK characters are detected? This issue has been around for years and actually

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-05 Thread Frederick Yin
fakefred added a comment. I second the as-an-option proposal. Hey, why not automatically increase the line height when CJK characters are detected? REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D25339 To: xuetianweng, #ktexteditor, cullmann, dhaumann,

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-05 Thread Shinjo Park
pshinjo added a comment. In D25339#663833 , @rjvbb wrote: > doesn't it give you US-ASCII canonical representations of every possible glyph? Whether it is possible or not, no CJK users will write TeX document using US-ASCII

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-05 Thread René J . V . Bertin
rjvbb added a comment. > It's "KTextEditor", not "KCodeEditor". Yes, but look at the traditional meaning of a text editor, which typically means "plain text" editor. KTextEditor's design decision to use a single lineheight puts it squarely in that domain - to reply in style: `It's

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread Kåre Särs
sars added a comment. I'm starting to think that we need an option for enabling/disabling this change/feature. I would not want to have the extra space between the lines, but at the same time I can see that actually not seeing the whole character is not an acceptable situation...

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread Frederick Yin
fakefred added a comment. In D25339#663322 , @rjvbb wrote: > but that's hardly the domain of application for a text editing framework. It's "KTextEditor", not "KCodeEditor". This rendering issue, though not from an "intended purpose",

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread Shinjo Park
pshinjo added a comment. In D25339#663462 , @rjvbb wrote: > This patch is only needed when mixing a main Latin1 (like) alphanumeric font with occasional glyphs from a font that have a different, taller height? Yes, though the "occasion"

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread René J . V . Bertin
rjvbb added a comment. This patch is only needed when mixing a main Latin1 (like) alphanumeric font with occasional glyphs from a font that have a different, taller height? Am I right that any text that uses only a single font will see some form of significant loss of the number of

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread Shinjo Park
pshinjo added a comment. In D25339#563370 , @xuetianweng wrote: > 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

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread René J . V . Bertin
rjvbb requested changes to this revision. rjvbb added a comment. This revision now requires changes to proceed. 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

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-05-04 Thread Frederick Yin
fakefred added a comment. So I tested this, great improvements regarding line height can be seen: F8283136: kate_1.png 在使用本身就是 CJK 的字体时,显示仍然正常。 F8283141: kate_2.png REPOSITORY R39 KTextEditor REVISION

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-26 Thread Christoph Cullmann
cullmann added a reviewer: Frameworks. cullmann added a comment. I tried the current version. For me this looks OK now. Thought I would like to have more people trying this out before we merge. Some volunteers? Beside this: Thanks for working on this issue. REPOSITORY R39

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-19 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80607. xuetianweng added a comment. Fix the blank text issue by alway setLineWidth. For QTextLine, the layout information is not filled until certain function is called. If dynamic wrap is not enabled, the line width is -1 so at the point we do

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-19 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80606. xuetianweng added a comment. Clean up the code a little bit and adding comments. Also fix a small bug if m_fontHeight has big difference with m_fontMetrics's height. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-19 Thread Xuetian Weng
xuetianweng added a comment. In D25339#651701 , @cullmann wrote: > Hmm, after applying this patch, for me, no text is visible at all. > By selecting a bit stuff, one at least sees an outline (CMakeLists.txt of ktexteditor toplevel dir). >

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-19 Thread Xuetian Weng
xuetianweng added a comment. In D25339#651701 , @cullmann wrote: > Hmm, after applying this patch, for me, no text is visible at all. > By selecting a bit stuff, one at least sees an outline (CMakeLists.txt of ktexteditor toplevel dir). >

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-19 Thread Christoph Cullmann
cullmann added a comment. Hmm, after applying this patch, for me, no text is visible at all. By selecting a bit stuff, one at least sees an outline (CMakeLists.txt of ktexteditor toplevel dir). F8246692: kwrite_no_text.png REPOSITORY R39

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-18 Thread Christoph Cullmann
cullmann added a comment. I appreciate work on this issue. I am not sure about how well this "hack" will solve the issue, thought. I will give it a try here in any case. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D25339 To: xuetianweng, #ktexteditor,

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-18 Thread Anthony Fieroni
anthonyfieroni added a comment. +1, looks great. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D25339 To: xuetianweng, #ktexteditor, cullmann, dhaumann Cc: anthonyfieroni, kde-frameworks-devel, kwrite-devel, rrosch, LeGast00n, cblack, domson, michaelh, ngraham,

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-17 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80444. xuetianweng added a comment. Fix the handling when layout formats has background. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25339?vs=80438=80444 BRANCH arcpatch-D25339 REVISION DETAIL

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-17 Thread Xuetian Weng
xuetianweng added a comment. F8244684: Screenshot_20200417_222110.png Add a screenshot to demostrate the change. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D25339 To: xuetianweng, #ktexteditor, cullmann, dhaumann

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-17 Thread Xuetian Weng
xuetianweng added a comment. In D25339#563937 , @cullmann wrote: > Actually, I could live with: > > 1. All lines are a bit higher, for me that makes reading even easier. But the rendering shall have no glitches. > 2. Some lines have

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-17 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80438. xuetianweng added a comment. handle the range with multiple lines. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25339?vs=80433=80438 BRANCH arcpatch-D25339 REVISION DETAIL

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2020-04-17 Thread Xuetian Weng
xuetianweng updated this revision to Diff 80433. xuetianweng added a comment. Try to fill the gap if we increase the line height with representitive char. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25339?vs=69848=80433 BRANCH arcpatch-D25339

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-17 Thread Christoph Cullmann
cullmann added a comment. Actually, I could live with: 1. All lines are a bit higher, for me that makes reading even easier. But the rendering shall have no glitches. 2. Some lines have different heights. But I assume this is hard to implement at the moment. REPOSITORY R39

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-17 Thread Anthony Fieroni
anthonyfieroni added a comment. In D25339#563822 , @xuetianweng wrote: > Having different font height for every line? 1. We don't want a bigger lines 2. We don't want a lines that are bigger that other in a view. 3. We don't

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-17 Thread Xuetian Weng
xuetianweng added a comment. Any idea about how konsole derive In D25339#563656 , @cullmann wrote: > The issue with this approach is, that you get "too high" lines for the case that none of this characters ever appear. > Beside that,

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-17 Thread Christoph Cullmann
cullmann added a comment. The issue with this approach is, that you get "too high" lines for the case that none of this characters ever appear. Beside that, unfortunately, you get rendering artifacts in addition, as Qt will not paint e.g. selection high enough for lines without such chars.

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-16 Thread Xuetian Weng
xuetianweng added reviewers: cullmann, dhaumann. REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D25339 To: xuetianweng, #ktexteditor, cullmann, dhaumann Cc: kde-frameworks-devel, kwrite-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann,

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-16 Thread Xuetian Weng
xuetianweng added a comment. F7766842: Screenshot_20191116_092819.png Add screenshot to demonstrate the problem. 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

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-16 Thread Xuetian Weng
xuetianweng updated this revision to Diff 69848. xuetianweng added a comment. Add comment about the actual characters. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25339?vs=69847=69848 BRANCH master REVISION DETAIL

D25339: KateRenderer: Use representitive character in CJK to estimate the fontHeight.

2019-11-16 Thread Xuetian Weng
xuetianweng created this revision. xuetianweng added a reviewer: KTextEditor. xuetianweng added projects: Kate, Frameworks. xuetianweng requested review of this revision. REVISION SUMMARY When a font has fallback, the fontHeight is broken can may cut the string in the middle in the line. Try