summaryrefslogtreecommitdiff
path: root/atari/plot/font_freetype.c
diff options
context:
space:
mode:
Diffstat (limited to 'atari/plot/font_freetype.c')
-rwxr-xr-xatari/plot/font_freetype.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index c328a47fa..3bf8e3428 100755
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -386,8 +386,8 @@ static void draw_glyph8(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p
clip.g_x = self->plotter->clipping.x0;
clip.g_y = self->plotter->clipping.y0;
- clip.g_w = self->plotter->clipping.x1 - self->plotter->clipping.x0;
- clip.g_h = self->plotter->clipping.y1 - self->plotter->clipping.y0;
+ clip.g_w = (self->plotter->clipping.x1 - self->plotter->clipping.x0)+1;
+ clip.g_h = (self->plotter->clipping.y1 - self->plotter->clipping.y0)+1;
if( !rc_intersect( &clip, loc ) ){
return;
@@ -434,8 +434,8 @@ static void draw_glyph1(FONT_PLOTTER self, GRECT * loc, uint8_t * pixdata, int p
clip.g_x = self->plotter->clipping.x0;
clip.g_y = self->plotter->clipping.y0;
- clip.g_w = self->plotter->clipping.x1 - self->plotter->clipping.x0;
- clip.g_h = self->plotter->clipping.y1 - self->plotter->clipping.y0;
+ clip.g_w = (self->plotter->clipping.x1 - self->plotter->clipping.x0)+1;
+ clip.g_h = (self->plotter->clipping.y1 - self->plotter->clipping.y0)+1;
if( !rc_intersect( &clip, loc ) ){
return;
@@ -503,7 +503,8 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
uint32_t c = fstyle->foreground ;
/* in -> BGR */
/* out -> ARGB */
- c = ABGR_TO_RGB(c);
+ if( app.nplanes > 8 )
+ c = ABGR_TO_RGB(c);
while (nxtchr < length) {
ucs4 = utf8_to_ucs4(text + nxtchr, length - nxtchr);
@@ -526,7 +527,7 @@ static int text( FONT_PLOTTER self, int x, int y, const char *text, size_t leng
&loc,
bglyph->bitmap.buffer,
bglyph->bitmap.pitch,
- fstyle->foreground
+ c
);
}
}