Update example to show emojis and clipping

This commit is contained in:
grovesNL 2023-01-26 00:44:29 -03:30 committed by Josh Groves
parent 8c8cfba093
commit 07b04f511a
6 changed files with 21 additions and 3786 deletions

View file

@ -252,8 +252,8 @@ impl TextRenderer {
let details = atlas.glyph(&glyph.cache_key).unwrap();
let mut x = glyph.x_int + details.left as i32;
let mut y = line_y + glyph.y_int - details.top as i32;
let mut x = glyph.x_int + details.left as i32 + text_area.left;
let mut y = line_y + glyph.y_int - details.top as i32 + text_area.top;
let (mut atlas_x, mut atlas_y, content_type) = match details.gpu_cache {
GpuCacheStatus::InAtlas { x, y, content_type } => (x, y, content_type),