#include <stdio.h>
#include <conio.h>
#include <windows.h>
Go to the source code of this file.
◆ FONT_NAME_DEF
| #define FONT_NAME_DEF "Lucida Console" |
◆ FONT_SIZE_DEF
◆ HEIGHT
◆ WIDTH
◆ X_OFFSET_DEF
◆ Y_OFFSET_DEF
◆ DumpCharacterFontData()
| static void DumpCharacterFontData |
( |
DWORD |
BmpBits[] | ) |
|
|
static |
Dump the FontData for the bootvid/i386/bootdata.c array.
Definition at line 54 of file bootvid_font_generator.c.
55{
56 static int iBegin = 0;
58
60
63
66}
int WINAPIV fprintf(FILE *file, const char *format,...)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by DumpFont().
◆ DumpFont()
Definition at line 124 of file bootvid_font_generator.c.
125{
126 int iHeight;
129
132
135 {
138 }
139
145 {
148 }
149
150 for (
c = 0;
c < 256;
c++)
151 {
153
154#ifdef DUMP_CHAR_ON_SCREEN
155 DumpCharacterOnScreen(BmpBits);
159#else
161#endif
162 }
163
167
170}
static void DumpCharacterFontData(DWORD BmpBits[])
static BOOL PlotCharacter(HDC hDC, HFONT hFont, INT XOffset, INT YOffset, CHAR Character, DWORD BmpBits[])
_ACRTIMP int __cdecl system(const char *)
static const WCHAR Cleanup[]
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
DWORD WINAPI GetLastError(void)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define OUT_DEFAULT_PRECIS
#define CLIP_DEFAULT_PRECIS
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)
BOOL WINAPI DeleteDC(_In_ HDC)
#define NONANTIALIASED_QUALITY
Referenced by main().
◆ main()
Definition at line 172 of file bootvid_font_generator.c.
173{
174
176 {
178 "Usage: %s \"font name\" [font size] [X-offset] [Y-offset]\n"
179 "Default font name is: \"%s\"\n"
180 "Default font size is: %i\n"
181 "Default X-offset is: %i\n"
182 "Default Y-offset is: %i\n",
185
186 return -1;
187 }
188
193 return 0;
194}
static void DumpFont(LPSTR FontName, INT FontSize, INT XOffset, INT YOffset)
_ACRTIMP int __cdecl atoi(const char *)
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
◆ PlotCharacter()
Use GDI APIs to load a monospace font and plot a single character into a bitmap.
Definition at line 72 of file bootvid_font_generator.c.
73{
80
82 if (!hBmp)
83 {
86 }
87
93
94
95
96
97
98
105
107
109 {
111 bReturnValue =
FALSE;
112 }
113
116
118 if (hBmp)
120
121 return bReturnValue;
122}
BITMAPINFOHEADER bmiHeader
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
BOOL WINAPI TextOutA(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCSTR lpString, _In_ int c)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
struct tagBITMAPINFO BITMAPINFO
struct tagBITMAPINFO * PBITMAPINFO
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Referenced by DumpFont().