mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix truncated "l" in some cases on wide fonts
minimum width should not be truncated to 0 during layout!
This commit is contained in:
parent
ee5168254e
commit
dee4871f91
1 changed files with 2 additions and 2 deletions
|
|
@ -126,7 +126,7 @@ pub fn xor_glyph_large(fb: &mut FrBuf, p: &Point, gs: GlyphSprite, xor: bool, cr
|
|||
return;
|
||||
}
|
||||
let high = gs.high as i16 / 2;
|
||||
let wide = gs.wide as i16 / 2;
|
||||
let wide = (gs.wide as i16 / 2).max(1);
|
||||
if high > SPRITE_PX || wide > SPRITE_PX {
|
||||
// Fail silently if glyph height or width is out of spec
|
||||
// TODO: Maybe return an error?
|
||||
|
|
@ -206,7 +206,7 @@ pub fn xor_glyph_2x(fb: &mut FrBuf, p: &Point, gs: GlyphSprite, xor: bool, cr: C
|
|||
return;
|
||||
}
|
||||
let high = gs.high as i16 / 2;
|
||||
let wide = gs.wide as i16 / 2;
|
||||
let wide = (gs.wide as i16 / 2).max(1);
|
||||
if high > SPRITE_PX || wide > SPRITE_PX {
|
||||
// Fail silently if glyph height or width is out of spec
|
||||
// TODO: Maybe return an error?
|
||||
|
|
|
|||
Loading…
Reference in a new issue