Commit Graph

1177 Commits

Author SHA1 Message Date
Joe Wilm 78414b5ae1
Implement tty::new()
Opens a pty, forks a child process, and execs the shell defined in
user's /etc/passwd file. Bytes from the pty are currently just written
to Alacritty's stdout as a sanity check that things are hooked up.

Thanks to `st` for some guidance on setting this up.
2016-05-24 21:06:19 -07:00
Joe Wilm 855ae75697
Add render time meter
Optimization is impossible without measurement!
2016-05-21 11:08:50 -07:00
Joe Wilm c70acbac0b
Correct sub-pixel font rendering with OpenGL
Uses the GL_ARB_blend_func_extended to get single-pass, per-channel
alpha blending. gl_generator is now used instead of gl to enable the
extension.

The background color is removed since that presumably needs to run in a
separate pass.
2016-05-20 21:36:28 -07:00
Joe Wilm e794bc11b9
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.
2016-04-11 08:05:19 -07:00
Joe Wilm b84eb9e921
Add a Grid
The grid holds the state of the terminal with row-major ordering.
Eventually, the grid::Cell type will hold other attributes such as
color, background color, decorations, and weight.

An initialization list is added for common ASCII symbols.
2016-04-10 16:25:05 -07:00
Joe Wilm 99474ef78a Start tracking some tasks
TASKS.md is a set of prioritized work for the project
2016-02-27 22:37:00 -08:00
Joe Wilm c8b69412b2 Rasterizer uses DPI from Glutin 2016-02-27 20:26:31 -08:00
Joe Wilm 1bf7bb8e12 Font no longer hardcoded in get_glyph 2016-02-27 14:45:38 -08:00
Joe Wilm 7a1ed7b46f Fix compiler warnings 2016-02-27 14:45:26 -08:00
Joe Wilm 7e9888b1f5 Add support for multiple font faces in rasterizer 2016-02-27 14:38:38 -08:00
Joe Wilm 97c1a17bf1 Cleanup PackedVertex initialization 2016-02-27 13:16:40 -08:00
Joe Wilm 77cfb7b5cd Implement per vertex struct 2016-02-27 13:08:39 -08:00
Joe Wilm eac2d01af4 Organize buffer data into struct 2016-02-26 22:30:42 -08:00
Joe Wilm ce96b5df6b Fix some compiler warnings 2016-02-25 21:02:18 -08:00
Joe Wilm 07640b392c Move rendering stuff into renderer mod 2016-02-25 21:02:01 -08:00
Joe Wilm eac9747a78 Abstract glyph rendering, poorly
Adds a QuadRenderer class that actually only works with glyphs for now.
Manually place a few glyphs to demonstrate that it works.
2016-02-24 21:02:21 -08:00
Joe Wilm cda4952145 Bit of cleanup
- Commend vertex slice
- Add helper for binding mask texture (and specify that it's a mask)
- Prefix uniform members of ShaderProgram with u_. This makes it easy to
  identify in the rest of code.
2016-02-24 20:37:17 -08:00
Joe Wilm 5226666690 Use indexed drawing to draw quads 2016-02-24 20:11:15 -08:00
Joe Wilm 24b4c3ba47 Fragment shader supplies color correctly 2016-02-24 19:09:21 -08:00
Joe Wilm 400e4c92a7 build rect describing glyph quad 2016-02-24 19:08:57 -08:00
Joe Wilm 9f8aa9c315 Add license 2016-02-23 20:59:31 -08:00
Joe Wilm 2b7caf95fd Render the letter J
This letter brought to you by OpenGL and freetype.
2016-02-23 20:42:58 -08:00
Joe Wilm e301843686 Add test font for travis 2016-02-21 19:56:31 -08:00
Joe Wilm 5040c44f67 Implement very basic glyph rasterization
There are several assumptions made at this point and very little (no)
error handling done.
2016-02-21 19:45:35 -08:00
Joe Wilm 32bac94343 implement list_fonts::list_families
A list of families is returned. Each variant contains the variant's
style, the filepath for the variant, and the index of the variant in the
file. This info should be enough to get freetype to actually load a
font.
2016-02-21 17:49:13 -08:00
Joe Wilm 2a7dc1deb8 Add function for listing font names on linux
This function isn't exactly useful, but it's working ffi with the
fontconfig library. Woo! Next step will be returning some objects with
more information (like font path so we can start rendering glyphs!).
2016-02-21 15:20:03 -08:00
Joe Wilm 621776cd94 Initialize new cargo binary project 2016-02-21 08:15:41 -08:00