From 8945e314c895cadf892bb3fcb27c27ec42c0aa85 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 1 Aug 2014 14:33:40 +0100 Subject: Simplify glyph scaling slightly. --- framebuffer/font_internal.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/framebuffer/font_internal.c b/framebuffer/font_internal.c index bc17ea595..492e37790 100644 --- a/framebuffer/font_internal.c +++ b/framebuffer/font_internal.c @@ -244,21 +244,9 @@ glyph_scale_2(const uint8_t *glyph_data) } } pos++; - *pos = 0; - for (x = 0; x < 4; x++) { - if (glyph_data[y] & (1 << (7 - x))) { - *pos |= 1 << ((3 - x) * 2); - *pos |= 1 << ((3 - x) * 2 + 1); - } - } + *pos = *(pos - 2); pos++; - *pos = 0; - for (x = 4; x < 8; x++) { - if (glyph_data[y] & (1 << (7 - x))) { - *pos |= 1 << ((7 - x) * 2); - *pos |= 1 << ((7 - x) * 2 + 1); - } - } + *pos = *(pos - 2); pos++; } -- cgit v1.2.3