As it stands, as I understand it, the rendering code itself just needs an Iterator of glyphs and their info. However, the window management portion of the code relies on having a Term value connected, and the rendering isn't nearly as much use without the window management with it.
It would be extremely helpful if the rendering and window management could stand entirely on their own and that they could be hooked in to any sort of application that can provide an Iterator of glyphs. Having a "terminal like" ability without actually going through a shell would be very slick.
I don't think the code is far off from what you want. To render glyphs you need and instance of Renderer
. To create a renderer, you need config, and a rasterizer. The rasterizer deals with translating characters to renderable glyphs via the font settings.
The renderer is a bit tied to term in add_render_item
because of RenderableCell
being declared in the term module, but the struct itself is not hard tied to the terminal.
I'm not extremely familiar with the code myself, but based on a talk by jwilm, I figured it was possible. After a brief chat on the IRC channel I was asked to put this as an issue so that people could keep track of it.
My own use for it would just be for roguelikes or similar, but I'm sure people could use a fast glyph for any sort of thing.
I'm not sure how this issue maps to the current alacritty, since our rendering and terminal is separated right now. also all opengl/windowing stuff lives in its own crate. So if you still have some suggestions on improving actual Term API/more separation, then open a new issue.
Most helpful comment
I'm not sure how this issue maps to the current alacritty, since our rendering and terminal is separated right now. also all opengl/windowing stuff lives in its own crate. So if you still have some suggestions on improving actual Term API/more separation, then open a new issue.