ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.h
Revision 1.46 - (view) (download) (annotate) - [select for diffs]
Thu Jun 17 19:37:28 2021 UTC (2 years, 10 months ago) by root
Branch: MAIN
CVS Tags: HEAD, rxvt-unicode-rel-9_29, rxvt-unicode-rel-9_30
Changes since 1.45: +0 -1 lines
Diff to previous 1.45
sanctified by exg

Revision 1.45 - (view) (download) (annotate) - [select for diffs]
Thu Jun 17 11:01:57 2021 UTC (2 years, 10 months ago) by root
Branch: MAIN
Changes since 1.44: +9 -0 lines
Diff to previous 1.44
 a rare codesize + time optimisation

Revision 1.44 - (view) (download) (annotate) - [select for diffs]
Thu Jun 17 00:49:20 2021 UTC (2 years, 10 months ago) by root
Branch: MAIN
Changes since 1.43: +1 -0 lines
Diff to previous 1.43
add can_compose flag tor xvt_font, to indicate whether the font handles
glyph composiiton (might go away)
allow rxvt_composite.expand to work with whcar_t and text_t as output,
will likely change.

Revision 1.43 - (view) (download) (annotate) - [select for diffs]
Tue Jun 21 12:03:56 2016 UTC (7 years, 10 months ago) by sf-exg
Branch: MAIN
CVS Tags: rxvt-unicode-rel-9_25, rxvt-unicode-rel-9_26
Changes since 1.42: +2 -2 lines
Diff to previous 1.42
24-bit direct color support (patch by Fengguang Wu)

Support directly setting RGB fg/bg colors via ISO-8613-3 24-bit
ANSI color escapes:

  ESC[38;2;<r>;<g>;<b>m Select RGB foreground color
  ESC[48;2;<r>;<g>;<b>m Select RGB background color

The killer applications for me are vim in tmux. It'll not only modernize
their look and feeling, but also bring more eye friendly color schemes.
Very helpful for long time programmers.

To avoid memory overheads and keep the patch non-intrusive, it takes the
approach to adapt the nearest color in an hidden 6x6x4 (88-color mode)
or 7x7x5 (256-color mode) color cube to the new 24-bit RGB color.

The pros/cons are:

+) least memory footprint (close to 0)
   comparing to konsole, gnome-terminal etc. real 24-bit arrays

+) exact colors and excellent user feelings
   comparing to xterm, mlterm, etc. approximating to 256 palette

+) usable in both the existing 88/256-color modes

   Most vim GUI color schemes show up the same as gvim in rxvt-unicode's
   88-color mode, not to mention the 256-color mode. Typical applications
   only use one or two dozens of colors at the same time.

-) may not be able to show 2+ close 24-bit colors

   RGB colors close to each other will likely fall into the same slot in
   the 6x6x4 or 7x7x5 color cube. If necessary, it could be improved
   effectively by implementing some collision avoidance logic, trying to
   find empty/eldest slot in the +1/-1 r/g/b indices (ie. 3-8 neighbors).

The CPU overheads of map_rgb24_color() look ignorable: I feel no
perceptible slow down when doing vim operations in 24-bit color mode.

A micro benchmark running a test script from [1]:

% time (for i in {1..100}; do 24-bit-color.sh; done)

vanilla rxvt-unicode
====================
  2.42s user 1.88s system 31% cpu 13.555 total
  2.59s user 1.74s system 31% cpu 13.615 total
  2.46s user 1.85s system 31% cpu 13.631 total

THIS PATCH (adapt hidden color cube to 24-bit)
==============================================
  2.33s user 1.97s system 31% cpu 13.598 total
  2.46s user 1.89s system 31% cpu 13.613 total
  2.51s user 1.82s system 31% cpu 13.556 total

https://github.com/spudowiar/rxvt-unicode (real 24-bit array)
=============================================================
  2.61s user 1.75s system 31% cpu 13.721 total
  2.48s user 1.82s system 31% cpu 13.566 total
  2.60s user 1.76s system 31% cpu 13.631 total

USE_256_COLORS is defined in all the above rxvt-unicode builds.

References:

[1] True Colour (16 million colours) support in various terminal
    applications and terminals
    https://gist.github.com/XVilka/8346728

[2] https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

Revision 1.42 - (view) (download) (annotate) - [select for diffs]
Fri May 18 16:11:27 2012 UTC (11 years, 11 months ago) by sf-exg
Branch: MAIN
CVS Tags: rxvt-unicode-rel-9_16, rxvt-unicode-rel-9_17, rxvt-unicode-rel-9_18, rxvt-unicode-rel-9_19, rxvt-unicode-rel-9_20, rxvt-unicode-rel-9_21, rxvt-unicode-rel-9_22
Changes since 1.41: +2 -2 lines
Diff to previous 1.41
Fix typos.

Revision 1.41 - (view) (download) (annotate) - [select for diffs]
Thu May 17 20:05:55 2012 UTC (11 years, 11 months ago) by root
Branch: MAIN
Changes since 1.40: +12 -1 lines
Diff to previous 1.40
*** empty log message ***

Revision 1.40 - (view) (download) (annotate) - [select for diffs]
Thu Jun 2 17:43:43 2011 UTC (12 years, 11 months ago) by sf-exg
Branch: MAIN
CVS Tags: rel-9_12, rel-9_14, rxvt-unicode-rel-9_15
Changes since 1.39: +0 -1 lines
Diff to previous 1.39
Remove unneeded includes.

Revision 1.39 - (view) (download) (annotate) - [select for diffs]
Sun May 23 00:12:02 2010 UTC (13 years, 11 months ago) by root
Branch: MAIN
CVS Tags: rel-9_09, rel-9_10, rel-9_11
Changes since 1.38: +9 -2 lines
Diff to previous 1.38
USE_256_COLORS ? 7 : 127 fonts

Revision 1.38 - (view) (download) (annotate) - [select for diffs]
Sun May 23 00:08:53 2010 UTC (13 years, 11 months ago) by root
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37
some constants

Revision 1.37 - (view) (download) (annotate) - [select for diffs]
Sat May 22 23:55:56 2010 UTC (13 years, 11 months ago) by root
Branch: MAIN
Changes since 1.36: +6 -2 lines
Diff to previous 1.36
cleanup

Revision 1.36 - (view) (download) (annotate) - [select for diffs]
Sat Apr 17 23:00:45 2010 UTC (14 years ago) by sf-exg
Branch: MAIN
Changes since 1.35: +1 -1 lines
Diff to previous 1.35
Disable colorRV resource.
Make OSC 17 apply to highlightColor.
Make highlightColor apply also to selected cells with reverse video.
Add highlightTextColor resource to change the foreground colour of
highlighted characters.

Revision 1.35 - (view) (download) (annotate) - [select for diffs]
Wed Mar 31 23:01:51 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34
*** empty log message ***

Revision 1.34 - (view) (download) (annotate) - [select for diffs]
Wed Mar 31 22:46:40 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
Changes since 1.33: +9 -3 lines
Diff to previous 1.33
*** empty log message ***

Revision 1.33 - (view) (download) (annotate) - [select for diffs]
Wed Mar 31 22:22:32 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
Changes since 1.32: +3 -3 lines
Diff to previous 1.32
*** empty log message ***

Revision 1.32 - (view) (download) (annotate) - [select for diffs]
Wed Mar 31 21:52:05 2010 UTC (14 years, 1 month ago) by sf-exg
Branch: MAIN
Changes since 1.31: +2 -0 lines
Diff to previous 1.31
First incomplete stab at changing font index logic.

Revision 1.31 - (view) (download) (annotate) - [select for diffs]
Wed Mar 31 13:14:50 2010 UTC (14 years, 1 month ago) by sf-exg
Branch: MAIN
Changes since 1.30: +1 -1 lines
Diff to previous 1.30
Fix typos.

Revision 1.30 - (view) (download) (annotate) - [select for diffs]
Tue Mar 30 23:54:30 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
Changes since 1.29: +3 -9 lines
Diff to previous 1.29
revert fontidx stupidity

Revision 1.29 - (view) (download) (annotate) - [select for diffs]
Tue Mar 30 23:36:14 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
CVS Tags: before_dynamic_fontidx, dynamic_fontidx
Changes since 1.28: +6 -3 lines
Diff to previous 1.28
*** empty log message ***

Revision 1.28 - (view) (download) (annotate) - [select for diffs]
Tue Mar 30 23:00:35 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
Changes since 1.27: +5 -2 lines
Diff to previous 1.27
*** empty log message ***

Revision 1.27 - (view) (download) (annotate) - [select for diffs]
Tue Mar 30 22:46:25 2010 UTC (14 years, 1 month ago) by root
Branch: MAIN
Changes since 1.26: +3 -1 lines
Diff to previous 1.26
*** empty log message ***

Revision 1.26 - (view) (download) (annotate) - [select for diffs]
Sun Mar 29 13:36:03 2009 UTC (15 years, 1 month ago) by root
Branch: MAIN
CVS Tags: rel-9_07
Changes since 1.25: +1 -1 lines
Diff to previous 1.25
*** empty log message ***

Revision 1.25 - (view) (download) (annotate) - [select for diffs]
Wed Nov 5 14:43:54 2008 UTC (15 years, 6 months ago) by root
Branch: MAIN
CVS Tags: rel-9_06
Changes since 1.24: +6 -3 lines
Diff to previous 1.24
minor overlay refactoring, syntax changes

Revision 1.24 - (view) (download) (annotate) - [select for diffs]
Thu Oct 18 09:11:43 2007 UTC (16 years, 6 months ago) by ayin
Branch: MAIN
CVS Tags: rel-8_4, rel-8_5a, rel-8_6, rel-8_7, rel-8_8, rel-8_9, rel-9_0, rel-9_01, rel-9_02, rel-9_05
Changes since 1.23: +0 -13 lines
Diff to previous 1.23
include cleanup.

Revision 1.23 - (view) (download) (annotate) - [select for diffs]
Mon Jun 25 13:50:41 2007 UTC (16 years, 10 months ago) by ayin
Branch: MAIN
CVS Tags: rel-8_3
Changes since 1.22: +1 -1 lines
Diff to previous 1.22
HAVE_XLOCALE is unused.

Revision 1.22 - (view) (download) (annotate) - [select for diffs]
Sun Aug 27 10:10:25 2006 UTC (17 years, 8 months ago) by root
Branch: MAIN
CVS Tags: rel-8_0, rel-8_1, rel-8_2
Changes since 1.21: +3 -2 lines
Diff to previous 1.21
*** empty log message ***

Revision 1.21 - (view) (download) (annotate) - [select for diffs]
Sat Feb 18 14:14:43 2006 UTC (18 years, 2 months ago) by root
Branch: MAIN
CVS Tags: rel-7_7, rel-7_8, rel-7_9
Changes since 1.20: +0 -23 lines
Diff to previous 1.20
*** empty log message ***

Revision 1.20 - (view) (download) (annotate) - [select for diffs]
Mon Jan 30 04:27:17 2006 UTC (18 years, 3 months ago) by root
Branch: MAIN
CVS Tags: rel-7_5, rel-7_6
Changes since 1.19: +1 -1 lines
Diff to previous 1.19
*** empty log message ***

Revision 1.19 - (view) (download) (annotate) - [select for diffs]
Wed Jan 25 21:03:04 2006 UTC (18 years, 3 months ago) by root
Branch: MAIN
CVS Tags: rel-7_3, rel-7_3a, rel-7_4
Changes since 1.18: +3 -3 lines
Diff to previous 1.18
*** empty log message ***

Revision 1.18 - (view) (download) (annotate) - [select for diffs]
Tue Jan 17 05:47:42 2006 UTC (18 years, 3 months ago) by root
Branch: MAIN
CVS Tags: rel-7_1, rel-7_2
Changes since 1.17: +6 -6 lines
Diff to previous 1.17
*** empty log message ***

Revision 1.17 - (view) (download) (annotate) - [select for diffs]
Tue Jan 3 23:40:58 2006 UTC (18 years, 4 months ago) by root
Branch: MAIN
CVS Tags: rel-6_3, rel-7_0
Changes since 1.16: +1 -1 lines
Diff to previous 1.16
*** empty log message ***

Revision 1.16 - (view) (download) (annotate) - [select for diffs]
Mon Nov 28 19:35:04 2005 UTC (18 years, 5 months ago) by root
Branch: MAIN
CVS Tags: rel-5_9, rel-6_0, rel-6_1, rel-6_2
Changes since 1.15: +1 -1 lines
Diff to previous 1.15
*** empty log message ***

Revision 1.15 - (view) (download) (annotate) - [select for diffs]
Sun Nov 21 20:19:24 2004 UTC (19 years, 5 months ago) by root
Branch: MAIN
CVS Tags: rel-4_1, rel-4_2, rel-4_3, rel-4_4, rel-4_6, rel-4_7, rel-4_8, rel-4_9, rel-5_0, rel-5_1, rel-5_2, rel-5_3, rel-5_4, rel-5_5, rel-5_7, rel-5_8
Changes since 1.13: +0 -0 lines
Diff to previous 1.13
*** empty log message ***

Revision 1.13 - (view) (download) (annotate) - [select for diffs]
Wed Aug 25 13:07:07 2004 UTC (19 years, 8 months ago) by root
Branch: MAIN
CVS Tags: rel-4_0
Changes since 1.12: +5 -5 lines
Diff to previous 1.12
*** empty log message ***

Revision 1.12 - (view) (download) (annotate) - [select for diffs]
Wed Aug 25 05:03:33 2004 UTC (19 years, 8 months ago) by root
Branch: MAIN
CVS Tags: rel-3_8
Changes since 1.1: +22 -29 lines
Diff to previous 1.1
*** empty log message ***

Revision 1.1 - (view) (download) (annotate) - [select for diffs]
Sun Aug 15 00:37:04 2004 UTC (19 years, 9 months ago) by root
Branch: MAIN
CVS Tags: rel-3_7
*** empty log message ***

Convenience Links

Links to HEAD: (view) (download) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a