summaryrefslogtreecommitdiff
path: root/src/grid.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-04-11 08:05:19 -0700
committerJoe Wilm <joe@jwilm.com>2016-04-11 08:05:19 -0700
commite794bc11b962adef4d6fbbaeb85344cb138376da (patch)
tree71d0442ca31a24fcb3c8e64f7887d35688f2109b /src/grid.rs
parentb84eb9e921c040c4eadaabd8f3087690efa267b6 (diff)
downloadalacritty-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.rs8
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 {