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.

-- 
-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/YVOZSpByuTpvuxWJ%40ryzen.me.

Attachment: signature.asc
Description: PGP signature

Raspunde prin e-mail lui