aboutsummaryrefslogtreecommitdiff
path: root/host/bdf.c
diff options
context:
space:
mode:
authorjaseg <jaseg@jaseg.net>2014-03-07 01:08:04 +0100
committerjaseg <jaseg@jaseg.net>2014-03-07 01:08:04 +0100
commit15b7221813a039df3e0690b3e2ed59a0561f2926 (patch)
tree87a0e1d031f07731e37cb53c043afd3ba4820adc /host/bdf.c
parentd16223fd257ccc1d7060e372eb3d950cf68f8d37 (diff)
downloadmatelight-15b7221813a039df3e0690b3e2ed59a0561f2926.tar.gz
matelight-15b7221813a039df3e0690b3e2ed59a0561f2926.tar.bz2
matelight-15b7221813a039df3e0690b3e2ed59a0561f2926.zip
New, fancy schmancy scrolling working as intended
Diffstat (limited to 'host/bdf.c')
-rw-r--r--host/bdf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/bdf.c b/host/bdf.c
index e6ab827..a95ed8b 100644
--- a/host/bdf.c
+++ b/host/bdf.c
@@ -283,7 +283,7 @@ int framebuffer_render_text(char *s, glyphtable_t *glyph_table, color_t *gbuf, s
glyph_t *g = glyph_table->data[c];
/* Is the glyph within the buffer's bounds? */
- if(x+g->width > offx && x < offx+gbufwidth){
+ //if(x+g->width > offx && x < offx+gbufwidth){
/* x-offx might be negative down to -g->width+1, but that's ok */
render_glyph(g, gbuf, gbufwidth, x-offx, 0, fg, bg);
if(style.strikethrough || style.underline){
@@ -291,7 +291,7 @@ int framebuffer_render_text(char *s, glyphtable_t *glyph_table, color_t *gbuf, s
/* g->y usually is a negative index of the glyph's baseline measured from the glyph's bottom */
int uly = gbufheight + g->y;
for(int i=0; i<g->width; i++){
- if(x+i >= offx){ /* Stay within the frame buffer's bounds */
+ if(x+i >= offx && x+i-offx < gbufwidth){ /* Stay within the frame buffer's bounds */
if(style.strikethrough)
gbuf[sty*gbufwidth + x + i - offx] = fg;
if(style.underline)
@@ -299,7 +299,7 @@ int framebuffer_render_text(char *s, glyphtable_t *glyph_table, color_t *gbuf, s
}
}
}
- }
+ //}
x += g->width;
}
return 0;