Open sev- opened 7 years ago
Try Menlo 11 font. There very few fonts really mono-spaced on macos.
No luck. Here is my screenshot with Menlo 11
I had the same issue, until I set PT Mono/20pt font. After that, border lines became proper. Try to experiment with different fonts and sizes, it could help
PT Mono/20 worked, though it's ugly.
There must be some simple bug with determining the glyph width, so this glitch is triggered.
Does not help for me both with PT Mono/20 and Menlo/11. osx Sierra 10.12.3 (16D32) / MacBook Pro (Retina, 15-inch, Mid 2014)
wxWidgets uses standard CTLineDraw function to draw text. It cannot be used anyway because it's very slow, far already have hacks to avoid that, but still not usable. Editor pages scrolled as slide-show and macbook heats and drains battery. We must use completely different method to draw text: get glyphs and draw them manually. This way used by most terminal emulators for macos.
about perfomance - can you play with these: https://developer.apple.com/reference/coregraphics/1455656-cgcontextsetinterpolationquality?language=objc https://developer.apple.com/reference/coregraphics/1454253-cgcontextsettextdrawingmode?language=objc https://developer.apple.com/reference/coregraphics/1455178-cgcontextsetshouldantialias ..or in wx: http://docs.wxwidgets.org/3.1/classwx_graphics_context.html#a51e968476c72d3d77424cb8e11a14d65 http://docs.wxwidgets.org/3.1/classwx_graphics_context.html#af6ecb449cb732632a8d9b5c285d01b91
..also these looks very useful: https://developer.apple.com/reference/coregraphics/1454767-cgcontextsetallowsfontsmoothing https://developer.apple.com/reference/coregraphics/1455816-cgcontextsetshouldsmoothfonts while not used in wx directly, default settings may be slow.. context should be accessible with wxMacCoreGraphicsContext::GetNativeContext()
There some sample code for fast drawing https://github.com/gnachman/iTerm2/blob/master/sources/iTermTextDrawingHelper.m But it's too big and complex, my primary idea for now is to use nanovg for macos and web version.
Try to tweak CTLineDraw too, but in any case it will be slower, supporting functions like CTLineCreateWithAttributedString already eats too much.
Since gnome not hurrying to accept performance changes in broadway I'm ok about nanovg web backend experiment. But I also want to try to hack wx on hackintosh:) About changing backend - its not hard, the keypoint is to implement ConsoleOutputListener, then just remove everything in UI directory. Another big part is clipboard: APIClipboard.cpp should be rewritten almost completely for different backend (and ideally should talk to host clipboard, not sure if its possible without annoying popups).
hm, I installed hackintosh on Windows-hosted vmware 12, guest OSX version =10.11.6 build everything according to your instructions (including wxwidgets v3.1) and.. performance looks not bad at all. Not so smooth as on host but approximately as UI of other applications there. At least with PT Mono 20.
This particular ticket originally was about the broken border display, not about the performance. I do recommend to move performance issue to the separate ticket.
Lucky you, you only have lines skewed. For me, all the words are drawn shorter than they are. The longer the word, the more is trimmed, note the longest file name.
OS X 10.12, current git far2l version. I run far2l on a secondary non-HiDPI monitor where primary display is Retina, maybe it has something to do with it?..
PT Mono didn't help, as well as, say, Go Mono or any other one I tried.
According to my inverstigation in far2l on osx monospaced fonts work correct only with sizes that are multiple of 5. Thats a 5, 10, 15, 20... Very strange, also not sure that on real MAC HW the multiplier will be same.
Indeed, it helped on a real Mac, thanks! Now I can get picky and note that now there's (still) a VERTICAL trimming.
This setting is works for me
1;10;70;90;90;0;0;Andale Mono;50
Related topics https://forums.wxwidgets.org/viewtopic.php?t=36908 http://trac.wxwidgets.org/ticket/13018
@elfmz does it make sense to write about this issue in a docs with some basic configuration that is more or less working for all? wxwidgets ticket doesn't looks like that we can do something with it?
From this list Monaco, Menlo, Courier, Courier New, Andale Mono
only Andale Mono
has no vertical or horizontal issues
This also has no gaps: 1;20;76;90;90;0;0;PT Mono;56 as well as 1;15;76;90;90;0;0;PT Mono;56
Yes, I confirm that.
BTW what this numbers means?
Dont know (except 2nd obviously is font size). This string is created and parsed by wxwidgets wxFont::GetNativeFontInfoDesc() and its platform-dependent, so in Linux its completely different.
BTW the nobuffering
file helps.
Спасибо за nobuffering, и правда помогло создать нулевой файл ~/.config/far2l/nobuffering Шрифт размером 12 стал отображаться без проблем!
With majority of fonts I select on the far2l start, I am getting display problem with borders.
Courier New:
Pragmata Pro: