Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

BMFont: Different results with forcing zero offsets

$
0
0
Hello, I'm using BMfont to create a Bitmap font for my text Rendering. I noticed some strange behaviour when I use the option "force Offsets to Zero". If I use this option my rendering resultions looks ok, but without it, there is some missing space between some characters. I attached the BMFont configuration files and font that I used. In the rendering result with variable Offset you can see that there is missing space right next to the "r" letter. To get the source and destination of my render rectangles I basically to following: void getBakedQuad(const fontchar_t* f, int* x_cursor, int * y_cursor, SDL_Rect* src, SDL_Rect* dest) { dest->x = *x_cursor + f->xoffset; dest->y = *y_cursor + f->yoffset; dest->w = f->width; dest->h = f->height; src->x = f->x; src->y = f->y; src->w = f->width; src->h = f->height; *x_cursor += f->xadvance; } Has somebody noticed a similar behaviour? orbitron-bold.otf SIL Open Font License.txt variable_offset.bmfc variable_offset.fnt zero_offset.bmfc zero_offset.fnt

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>