summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2011-06-12 13:36:36 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2011-06-12 13:36:36 +0800
commit934b93d4b4c2a39858b842a7ef8efc798f74de7f (patch)
treeec76cce9f5e814ecb70b3f5ebcebccab7d96ad8e
parent2ae030fa6069a659130a753ebf829532add62209 (diff)
Remove trailing spaces in sdl-font.c
-rw-r--r--src/sdl-font.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/sdl-font.c b/src/sdl-font.c
index 4c05f22..9545ef0 100644
--- a/src/sdl-font.c
+++ b/src/sdl-font.c
@@ -497,7 +497,7 @@ dump_mono_bitmap(FT_Bitmap * bm, int left, int top)
if (v & 0x80 )
printf(" *" );
else
- printf(" ");
+ printf(" ");
}
p++;
}
@@ -567,7 +567,7 @@ ft_render_target_bitmap (FT_Bitmap * target,
/* convert mono to ARGB32 values */
for (h = height; h > 0; h--, srcline += src_pitch, dstline += pitch) {
int x;
-
+
for (x = 0; x < width; x++) {
if (srcline[(x >> 3)] & (0x80 >> (x & 7)))
((unsigned int*)dstline)[x] = 0xffffffffU;
@@ -589,7 +589,7 @@ ft_render_target_bitmap (FT_Bitmap * target,
} else {
/* copy mono to mono */
int bytes = (width + 7) >> 3;
-
+
for (h = height; h > 0; h--, srcline += src_pitch, dstline += pitch)
memcpy(dstline, srcline, bytes);
}
@@ -646,13 +646,13 @@ ft_render_target_bitmap (FT_Bitmap * target,
for (x = 0; x < width; x++, src += 3) {
unsigned int pix;
-
+
pix =
((unsigned int)src[2] << 16) |
((unsigned int)src[1] << 8) |
((unsigned int)src[0] ) |
((unsigned int)src[1] << 24);
-
+
dst[x] = pix;
}
}
@@ -692,7 +692,7 @@ ft_render_target_bitmap (FT_Bitmap * target,
for (x = 0; x < width; x++, src += 1) {
unsigned int pix;
-
+
pix =
((unsigned int)src[src_pitch * 2] << 16) |
((unsigned int)src[src_pitch] << 8) |
@@ -709,7 +709,7 @@ ft_render_target_bitmap (FT_Bitmap * target,
static int
sdl_freetype_font_glyph_info_render_glyph (sdl_freetype_font_t * font,
sdl_freetype_glyph_info_t * glyph_info,
- FT_Face face, FT_UInt index,
+ FT_Face face, FT_UInt index,
FT_Bitmap * bitmap,
int bitmap_left, int bitmap_top)
{
@@ -797,13 +797,13 @@ sdl_freetype_font_glyph_entry_info_load (sdl_freetype_font_t * font,
if (!font->options.vertical_layout) {
glyph_info->metrics.x_bearing = FIXED_FROM_26_6 (metrics->horiBearingX);
glyph_info->metrics.y_bearing = FIXED_FROM_26_6 (-metrics->horiBearingY);
-
+
glyph_info->metrics.x_advance = FIXED_FROM_26_6 (metrics->horiAdvance);
glyph_info->metrics.y_advance = 0;
} else {
glyph_info->metrics.x_bearing = FIXED_FROM_26_6 (metrics->vertBearingX);
glyph_info->metrics.y_bearing = FIXED_FROM_26_6 (metrics->vertBearingY);
-
+
glyph_info->metrics.x_advance = 0;
glyph_info->metrics.y_advance = FIXED_FROM_26_6 (metrics->vertAdvance);
}
@@ -811,16 +811,16 @@ sdl_freetype_font_glyph_entry_info_load (sdl_freetype_font_t * font,
if (glyph_info->metrics.width && glyph_info->metrics.height) {
glyph_info->bbox.x1 = glyph_info->metrics.x_bearing;
glyph_info->bbox.y1 = glyph_info->metrics.y_bearing;
- glyph_info->bbox.x2 =
+ glyph_info->bbox.x2 =
glyph_info->metrics.x_bearing + glyph_info->metrics.width;
- glyph_info->bbox.y2 =
+ glyph_info->bbox.y2 =
glyph_info->metrics.y_bearing + glyph_info->metrics.height;
} else {
glyph_info->bbox.x1 = glyph_info->metrics.x_bearing;
glyph_info->bbox.y1 = glyph_info->metrics.y_bearing;
- glyph_info->bbox.x2 =
+ glyph_info->bbox.x2 =
glyph_info->metrics.x_bearing + glyph_info->metrics.x_advance;
- glyph_info->bbox.y2 =
+ glyph_info->bbox.y2 =
glyph_info->metrics.y_bearing + glyph_info->metrics.y_advance;
}
@@ -855,10 +855,10 @@ sdl_freetype_font_glyph_entry_info_load (sdl_freetype_font_t * font,
goto errquit1;
}
bpglyph = (FT_BitmapGlyph)olglyph;
- ret =
+ ret =
sdl_freetype_font_glyph_info_render_glyph (font,
glyph_info,
- face, index,
+ face, index,
&bpglyph->bitmap,
bpglyph->left,
bpglyph->top);
@@ -877,7 +877,7 @@ sdl_freetype_font_glyph_entry_info_load (sdl_freetype_font_t * font,
}
if (error)
goto errquit1;
- ret =
+ ret =
sdl_freetype_font_glyph_info_render_glyph (font,
glyph_info,
face, index,
@@ -1474,8 +1474,8 @@ sdl_freetype_font_show_text (sdl_freetype_font_t * font,
unsigned char r,
unsigned char g,
unsigned char b,
- unsigned char a,
- int x, int y,
+ unsigned char a,
+ int x, int y,
const FT_Int32 * ucs4,
int num)
{
@@ -1500,7 +1500,7 @@ sdl_freetype_font_show_text (sdl_freetype_font_t * font,
for (i = 0; i < num; i++)
glyphs[i].index = FT_Get_Char_Index (face, ucs4[i]);
-
+
sdl_freetype_font_glyph_freeze (font);
x_offset = 0;
@@ -1542,8 +1542,8 @@ sdl_freetype_font_show_utf8 (sdl_freetype_font_t * font,
unsigned char r,
unsigned char g,
unsigned char b,
- unsigned char a,
- int x, int y,
+ unsigned char a,
+ int x, int y,
const char * utf8, int len)
{
FT_Int32 * ucs4;
@@ -1554,7 +1554,7 @@ sdl_freetype_font_show_utf8 (sdl_freetype_font_t * font,
return -1;
ret = sdl_freetype_font_show_text (font, dst,
- r, g, b, a,
+ r, g, b, a,
x, y, ucs4, ulen);
free (ucs4);