Dusan Popovic wrote:

> On 28/09/21, Bram Moolenaar wrote:
> > If you now also use the special handling for some ASCII characters,
> > perhaps the special casing can just be skipped?
> 
> Current state of affairs in gvim:
> 
> - glyphs are prerendered at ascii_glyph_table_init
> - non-bold non-italic ascii < 128 is rendered with glyphs
> - bold, italic, string with single >128 char, all falls down to Pango
> - big string ready to use glyphs but having single complex utf-8 char
>   will fall trough to be rendered with Pango.
> 
> Pango is not optimal:
> 
> - Not measured but very visible: In my c++ projects at work color scheme
>   renders renders function names in bold, which fall down to Pango. When
>   I quickly scroll trough region with 'more' bold content, scroll
>   becomes erratic, with more normal text it becomes smoother.
> 
> Current patch I am working on
> (https://github.com/dusanx/vim/commit/a00791cd3c0df7d921bb4188df1c165de04961d3)
> additionally splits strings into clear ascii/everything else parts,
> which then go trough glyphs or Pango. Result is rendering with Pango
> only what we can't avoid and using glyphs for everything else. Almost a
> side effect is proper ligatures support.
> 
> When that is done, in next PR, I intend to introduce cache for bold and
> italic glyphs, same as we do for normal text. There is no need to treat
> bold differently and use Pango for that.
> 
> In short using Pango as little as possible should be valid gvim
> optimization. Using Pango for everything because of few ligatures and
> emojis should be avoided because of the visible speed penalty. However
> if you see some obstacle for this plan please let me know.

Sounds good.

I would think that italic isn't used much, but if it's just another
entry with the same code we might as well cache that too.

-- 
hundred-and-one symptoms of being an internet addict:
89. In addition to your e-mail address being on your business
    cards you even have your own domain.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20210930134850.C4E99C80054%40pakwach.

Raspunde prin e-mail lui