You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA. */
/* Based heavily on code by H. Miyashita for Meadow (a descendant of
MULE for W32). */
hbdf_bmp_heap = HeapCreate(0, BDF_BITMAP_HEAP_INITIAL_SIZE, 0);
if (!hbdf_cp_heap || !hbdf_bmp_heap)
- error("Fail to create heap for BDF.");
+ error("Fail to create heap for BDF");
hfile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
(fileinfo.nFileSizeLow > BDF_FILE_SIZE_MAX))
{
CloseHandle(hfile);
- error("Fail to open BDF file.");
+ error("Fail to open BDF file");
}
hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL);
if (hfilemap == INVALID_HANDLE_VALUE)
{
CloseHandle(hfile);
- error("Can't map font.");
+ error("Can't map font");
}
font = MapViewOfFile(hfilemap, FILE_MAP_READ, 0, 0, 0);
{
CloseHandle(hfile);
CloseHandle(hfilemap);
- error("Can't view font.");
+ error("Can't view font");
}
bdffontp = (bdffont *) xmalloc(sizeof(bdffont));
info.c[1].rgbRed = info.c[1].rgbGreen = info.c[1].rgbBlue = 255;
return CreateDIBSection(hdc, (LPBITMAPINFO)&info,
- DIB_RGB_COLORS, bitsp, NULL, 0);
+ DIB_RGB_COLORS, (void **)bitsp, NULL, 0);
}
glyph_metric *
/* Now fill in the slots of *FONTP. */
BLOCK_INPUT;
+ bzero (fontp, sizeof (*fontp));
fontp->font = font;
fontp->font_idx = dpyinfo->n_fonts;
fontp->name = (char *) xmalloc (strlen (fontname) + 1);
bcopy (fontname, fontp->name, strlen (fontname) + 1);
fontp->full_name = fontp->name;
- fontp->size = FONT_WIDTH (font);
+ /* FIXME: look at BDF spec to see if there are better ways of finding
+ average_width and space_width, hopefully that don't involve working out
+ the values for ourselves from the data. */
+ fontp->size = fontp->average_width = fontp->space_width = FONT_WIDTH (font);
fontp->height = FONT_HEIGHT (font);
/* The slot `encoding' specifies how to map a character