/* Implementation of BDF font handling on the Microsoft W32 API.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
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). */
font_char *pch;
cache_bitmap *pcb;
- UnmapViewOfFile(fontp->hfilemap);
+ UnmapViewOfFile(fontp->font);
CloseHandle(fontp->hfilemap);
CloseHandle(fontp->hfile);
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 *
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
retval = 1;
}
}
+ UnmapViewOfFile (font);
CloseHandle (hfile);
CloseHandle (hfilemap);
return retval;