annotate runtime/print/cidfont.ps @ 34232:47385c831d92 v9.1.0061

patch 9.1.0061: UX of visual highlighting can be improved Commit: https://github.com/vim/vim/commit/e6d8b4662ddf9356da53f56e363b67b524fd8825 Author: Christian Brabandt <cb@256bit.org> Date: Sun Jan 28 23:33:29 2024 +0100 patch 9.1.0061: UX of visual highlighting can be improved Problem: UX of visual highlighting can be improved Solution: Improve readibility of visual highlighting, by setting better foreground and background colors The default visual highlighting currently is nice in that it overlays the actual syntax highlighting by using a separate distinct background color. However, this can cause hard to read text, because the contrast between the actual syntax element and the background color is way too low. That is an issue, that has been bothering colorschemes authors for quite some time so much, that they are defining the Visual highlighting group to use a separate foreground and background color, so that the syntax highlighting vanishes, but the text remains readable (ref: vim/colorschemes#250) So this is an attempt to perform the same fix for the default Visual highlighting and just use a default foreground and background color instead of using reverse. I also removed the hard-coded changes to the Visual highlighting in init_highlight. It's not quite clear to me, why those were there and not added directly to the highlighting_init_<dark|light> struct. closes: #13663 related: vim/colorschemes#250 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Jan 2024 23:39:23 +0100
parents 631143ac4a01
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
1 %!PS-Adobe-3.0 Resource-ProcSet
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
2 %%Title: VIM-CIDFont
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
3 %%Version: 1.0 0
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
4 %%EndComments
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
5 % Editing of this file is NOT RECOMMENDED. You run a very good risk of causing
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
6 % all PostScript printing from VIM failing if you do. PostScript is not called
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
7 % a write-only language for nothing!
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
8 /CP currentpacking d T setpacking
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
9 /SB 256 string d
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
10 /CIDN? systemdict/composefont known d /GS? systemdict/.makeoperator known d
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
11 CIDN?{
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
12 GS?{/vim_findresource{2 copy resourcestatus not{1 index SB cvs runlibfile}{
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
13 pop pop}ifelse findresource}bd/vim_composefont{0 get/CIDFont vim_findresource
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
14 exch/CMap vim_findresource exch[exch]composefont pop}bd}{/vim_findresource
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
15 /findresource ld/vim_composefont{composefont pop}bd}ifelse
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
16 }{
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
17 /vim_fontname{0 get SB cvs length dup SB exch(-)putinterval 1 add dup SB exch
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
18 dup 256 exch sub getinterval 3 -1 roll exch cvs length add SB exch 0 exch
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
19 getinterval cvn}bd/vim_composefont{vim_fontname findfont d}bd
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
20 } ifelse
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
21 /cfs{exch scalefont d}bd
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
22 /sffs{findfont 3 1 roll 1 index mul exch 2 index/FontMatrix get matrix copy
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
23 scale makefont d}bd
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
24 CP setpacking
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
25 % vim:ff=unix:
631143ac4a01 updated for version 7.0007
vimboss
parents:
diff changeset
26 %%EOF