pub(crate) mod error;
pub mod gl;
mod mat4;
mod position;
mod url;
pub use ::beamterm_data::{
CellSize, DebugSpacePattern, FontAtlasData, GlyphEffect, SerializationError, TerminalSize,
};
pub use beamterm_data::FontStyle;
pub use beamterm_unicode::{is_double_width, is_emoji};
pub use compact_str;
pub use error::Error;
pub use gl::{
Atlas, CellData, CellDynamic, CellIterator, CellQuery, Drawable, FontAtlas, GlState, GlyphSlot,
GlyphTracker, RenderContext, SelectionMode, SelectionTracker, StaticFontAtlas, TerminalGrid,
select,
};
#[cfg(feature = "native-dynamic-atlas")]
pub use gl::{NativeDynamicAtlas, NativeGlyphRasterizer};
pub use glow;
pub use position::CursorPosition;
pub use url::{UrlMatch, find_url_at_cursor};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum GlslVersion {
Es300,
Gl330,
}
impl GlslVersion {
#[must_use]
pub fn vertex_preamble(&self) -> &'static str {
match self {
Self::Es300 => "#version 300 es\nprecision highp float;\n",
Self::Gl330 => "#version 330 core\n",
}
}
#[must_use]
pub fn fragment_preamble(&self) -> &'static str {
match self {
Self::Es300 => "#version 300 es\nprecision mediump float;\nprecision highp int;\n",
Self::Gl330 => "#version 330 core\n",
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_font_atlas_config_deserialization() {
let _ = FontAtlasData::default();
}
}