better font
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@67 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
278a86951e
commit
d15ecd71ec
2 changed files with 19 additions and 7 deletions
|
|
@ -1,6 +1,10 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright notice:
|
||||||
|
* "Public domain font. Share and enjoy."
|
||||||
|
*/
|
||||||
MwFont MwFontData[] = {
|
MwFont MwFontData[] = {
|
||||||
{0, 12, {0, 90, 66, 0, 66, 66, 0, 66, 66, 0, 66, 90, 0, 0}}, /* 0 */
|
{0, 12, {0, 90, 66, 0, 66, 66, 0, 66, 66, 0, 66, 90, 0, 0}}, /* 0 */
|
||||||
{0, 12, {0, 90, 66, 0, 66, 66, 0, 66, 66, 0, 66, 90, 0, 0}}, /* 1 */
|
{0, 12, {0, 90, 66, 0, 66, 66, 0, 66, 66, 0, 66, 90, 0, 0}}, /* 1 */
|
||||||
|
|
|
||||||
22
tools/font.c
22
tools/font.c
|
|
@ -2,18 +2,20 @@
|
||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
#include FT_BITMAP_H
|
#include FT_BITMAP_H
|
||||||
|
#include FT_BDF_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
FT_Library lib;
|
FT_Library lib;
|
||||||
FT_Face face;
|
FT_Face face;
|
||||||
int i;
|
int i;
|
||||||
int ay = 0;
|
int ay = 0;
|
||||||
int ax = 0;
|
int ax = 0;
|
||||||
int sy = 0;
|
int sy = 0;
|
||||||
int sx = 0;
|
int sx = 0;
|
||||||
|
BDF_PropertyRec rec;
|
||||||
|
|
||||||
FT_Init_FreeType(&lib);
|
FT_Init_FreeType(&lib);
|
||||||
if(FT_New_Face(lib, argv[1], 0, &face)) {
|
if(FT_New_Face(lib, argv[1], 0, &face)) {
|
||||||
|
|
@ -26,9 +28,15 @@ int main(int argc, char** argv) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FT_Get_BDF_Property(face, "COPYRIGHT", &rec);
|
||||||
|
|
||||||
printf("/* $Id$ */\n");
|
printf("/* $Id$ */\n");
|
||||||
printf("#include <Mw/Milsko.h>\n");
|
printf("#include <Mw/Milsko.h>\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
printf("/**\n");
|
||||||
|
printf(" * Copyright notice:\n");
|
||||||
|
printf(" * \"%s\"\n", rec.u.atom);
|
||||||
|
printf(" */\n");
|
||||||
printf("MwFont MwFontData[] = {\n");
|
printf("MwFont MwFontData[] = {\n");
|
||||||
for(i = 0; i < 0x80; i++) {
|
for(i = 0; i < 0x80; i++) {
|
||||||
int y, x;
|
int y, x;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue