diff options
author | Joe Wilm <joe@jwilm.com> | 2016-04-11 08:05:19 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-04-11 08:05:19 -0700 |
commit | e794bc11b962adef4d6fbbaeb85344cb138376da (patch) | |
tree | 71d0442ca31a24fcb3c8e64f7887d35688f2109b /src/grid.rs | |
parent | b84eb9e921c040c4eadaabd8f3087690efa267b6 (diff) | |
download | alacritty-e794bc11b962adef4d6fbbaeb85344cb138376da.tar.gz alacritty-e794bc11b962adef4d6fbbaeb85344cb138376da.zip |
Use subpixel font rendering
OpenGL only supports shared alpha blending. Subpixel font rendering
requires using the font RGB values as alpha masks for the corresponding
RGB channels. To support this, blending is implemented in the fragment
shader.
Diffstat (limited to 'src/grid.rs')
-rw-r--r-- | src/grid.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/grid.rs b/src/grid.rs index 93d9cd28..0418ed53 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -26,7 +26,7 @@ pub struct Grid { raw: Vec<Row>, /// Number of columns - _cols: usize, + cols: usize, /// Number of rows. /// @@ -43,7 +43,7 @@ impl Grid { Grid { raw: raw, - _cols: cols, + cols: cols, rows: rows, } } @@ -51,6 +51,10 @@ impl Grid { pub fn rows(&self) -> usize { self.rows } + + pub fn cols(&self) -> usize { + self.cols + } } impl Index<usize> for Grid { |