(c: char)
| 35 | /// Returns the raster of the given char or the raster of [`font_constants::BACKUP_CHAR`]. |
| 36 | fn get_char_raster(c: char) -> RasterizedChar { |
| 37 | fn get(c: char) -> Option<RasterizedChar> { |
| 38 | get_raster( |
| 39 | c, |
| 40 | font_constants::FONT_WEIGHT, |
| 41 | font_constants::CHAR_RASTER_HEIGHT, |
| 42 | ) |
| 43 | } |
| 44 | get(c).unwrap_or_else(|| get(BACKUP_CHAR).expect("Should get raster of backup char.")) |
| 45 | } |
| 46 |