New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color Emoji (DirectX support improvements) #2375

Closed
wants to merge 74 commits into
base: master
from

Conversation

Projects
None yet
6 participants
@koron

koron commented Nov 26, 2017

This patch introduces two big features and one small fix to Vim's
DirectX rendering.

  1. Support colored emoji (emoticon).
  2. Improve drawing speed extremely.
  3. 'taamode' option didn't work.

Emoji was started from Japan and now widely used in the World as you
know. It has became very important parts for the communication. Recent
Windows supports colored emoji with DirectX, but Vim couldn't use it.
This patch implements colored emoji for Vim.

Vim's DirectX support was not enough about drawing speed. It was caused
by wrong use of DirectX. Now Vim's DirectX rendering is equal or faster
than GDI.

The 'taamode' option didn't work entirely because of incorrect use of
DirectX. This patch fixes it.

And last, this patch is written by collaborating mattn, k-takata and me.
Please enjoy colored 馃崳 emoji with this patch. 馃槃馃槃馃槃

capture

koron and others added some commits Nov 20, 2017

backward compatibility
keep `type:directx` use old renderer.
`type:directx2` for new renderer.
disable regexp logs temporarily
ignore lib files for debug executables
can't see any glyphs
BindDC is not called when turn on DirectX(3)
because of IS_ENABLE_DIRECTX() guard in directx_binddc().
The flag which be checked in the macro is not set at where called it.

fix #3
new "type:directx4" with adjusted glpyrun
* high speed
* without color emoji
* with some bugs

related #4
Fix cursor behavior, etc.
* Character on cursor was not shown.
* Hollow cursor was not shown.
* Flush before using GDI functions.
@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Nov 26, 2017

Codecov Report

Merging #2375 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2375      +/-   ##
==========================================
+ Coverage   74.52%   74.54%   +0.01%     
==========================================
  Files          91       91              
  Lines      132413   132412       -1     
  Branches    29082    29083       +1     
==========================================
+ Hits        98682    98701      +19     
- Misses      33706    33707       +1     
+ Partials       25        4      -21
Impacted Files Coverage 螖
src/if_xcmdsrv.c 84.53% <0%> (-0.18%) 猬囷笍
src/if_py_both.h 76.45% <0%> (-0.15%) 猬囷笍
src/gui.c 47.4% <0%> (-0.11%) 猬囷笍
src/channel.c 82.48% <0%> (-0.05%) 猬囷笍
src/gui_gtk_x11.c 47.65% <0%> (酶) 猬嗭笍
src/window.c 81.78% <0%> (+0.03%) 猬嗭笍
src/libvterm/src/screen.c 73.3% <0%> (+0.51%) 猬嗭笍
src/gui_beval.c 63.09% <0%> (+0.85%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update fb1db0e...b98eab5. Read the comment docs.

codecov-io commented Nov 26, 2017

Codecov Report

Merging #2375 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2375      +/-   ##
==========================================
+ Coverage   74.52%   74.54%   +0.01%     
==========================================
  Files          91       91              
  Lines      132413   132412       -1     
  Branches    29082    29083       +1     
==========================================
+ Hits        98682    98701      +19     
- Misses      33706    33707       +1     
+ Partials       25        4      -21
Impacted Files Coverage 螖
src/if_xcmdsrv.c 84.53% <0%> (-0.18%) 猬囷笍
src/if_py_both.h 76.45% <0%> (-0.15%) 猬囷笍
src/gui.c 47.4% <0%> (-0.11%) 猬囷笍
src/channel.c 82.48% <0%> (-0.05%) 猬囷笍
src/gui_gtk_x11.c 47.65% <0%> (酶) 猬嗭笍
src/window.c 81.78% <0%> (+0.03%) 猬嗭笍
src/libvterm/src/screen.c 73.3% <0%> (+0.51%) 猬嗭笍
src/gui_beval.c 63.09% <0%> (+0.85%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update fb1db0e...b98eab5. Read the comment docs.

@koron koron referenced this pull request Nov 26, 2017

Closed

WIP: color emoji! #1

@brammool brammool closed this in d7ccc4d Nov 26, 2017

@chrisbra

This comment has been minimized.

Show comment
Hide comment
@chrisbra

chrisbra Nov 26, 2017

Member

From your example it looks like some emojis are cut-off? Does the change in directx rendering fix #1520 perhaps?

Member

chrisbra commented Nov 26, 2017

From your example it looks like some emojis are cut-off? Does the change in directx rendering fix #1520 perhaps?

@mattn

This comment has been minimized.

Show comment
Hide comment
@mattn

mattn Nov 26, 2017

As we wrote in :help renderoptions, if alternative font doesn't have fixed width glyph for the emoji, it will be cut-off.

		  - When this alternative font didn't have fixed width glyph,
		    emoji might be rendered beyond the bounding box of drawing
		    cell.

mattn commented Nov 26, 2017

As we wrote in :help renderoptions, if alternative font doesn't have fixed width glyph for the emoji, it will be cut-off.

		  - When this alternative font didn't have fixed width glyph,
		    emoji might be rendered beyond the bounding box of drawing
		    cell.

@k-takata k-takata referenced this pull request Dec 2, 2017

Closed

Improve color emoji #2401

@axbender

This comment has been minimized.

Show comment
Hide comment
@axbender

axbender Dec 8, 2017

Where would I get the current test font (Segoe UI Mono)?

axbender commented Dec 8, 2017

Where would I get the current test font (Segoe UI Mono)?

adizero pushed a commit to adizero/vim that referenced this pull request May 19, 2018

patch 8.0.1343: MS-Windows: does not show colored emojis
Problem:    MS-Windows: does not show colored emojis.
Solution:   Implement colored emojis. Improve drawing speed. Make 'taamode'
            work. (Taro Muraoka, Yasuhiro Matsumoto, Ken Takata, close vim#2375)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment