From: Mark Calderbank Date: Sun, 8 Jan 2006 11:16:50 +0000 (+0000) Subject: Fix "wrapped" font (top two lines of glyph rendered at the bottom) X-Git-Url: https://git.vomp.tv/gitweb/?a=commitdiff_plain;h=ccfabbd7c091a2db379fd67af049e48fd897da16;p=vompclient-marten.git Fix "wrapped" font (top two lines of glyph rendered at the bottom) --- diff --git a/bogl.h b/bogl.h index be7a623..9dc98a3 100644 --- a/bogl.h +++ b/bogl.h @@ -9,6 +9,7 @@ typedef struct bogl_font { char *name; /* Font name. */ int height; /* Height in pixels. */ + int spacing; /* Vertical spacing in pixels. */ unsigned long *content; /* 32-bit right-padded bitmap array. */ short *offset; /* 256 offsets into content. */ unsigned char *width; /* 256 character widths. */ diff --git a/fonts/helvB18.cc b/fonts/helvB18.cc index 5da9b7f..f9b6684 100644 Binary files a/fonts/helvB18.cc and b/fonts/helvB18.cc differ diff --git a/fonts/helvB24.cc b/fonts/helvB24.cc index 8ed2c3b..047b585 100644 Binary files a/fonts/helvB24.cc and b/fonts/helvB24.cc differ diff --git a/surface.cc b/surface.cc index 6ba701d..3ba19cb 100644 --- a/surface.cc +++ b/surface.cc @@ -387,7 +387,7 @@ int Surface::getCharWidth(char c) int Surface::getFontHeight() { - return font->height; + return font->spacing; } void Surface::screenShot(char* fileName) diff --git a/surface.h b/surface.h index 5eaef78..c44656d 100644 --- a/surface.h +++ b/surface.h @@ -110,6 +110,7 @@ typedef struct { typedef struct bogl_font { char *name; /* Font name. */ int height; /* Height in pixels. */ + int spacing; /* Vertical spacing in pixels. */ unsigned long *content; /* 32-bit right-padded bitmap array. */ short *offset; /* 256 offsets into content. */ unsigned char *width; /* 256 character widths. */