Move fonts to subdirectory && automatically detect/compile all fonts

This commit is contained in:
Stefan `Sec` Zehl 2011-05-22 22:13:41 +02:00
parent 39696e59fd
commit a41987c29c
12 changed files with 6067 additions and 212 deletions

View File

@ -9,10 +9,7 @@ OBJS += render.o
OBJS += decoder.o OBJS += decoder.o
OBJS += backlight.o OBJS += backlight.o
FONTS = FONTS = $(basename $(wildcard fonts/*.c))
FONTS += smallfonts
FONTS += ubuntu18
FONTS += orbitron14
LIBNAME=lcd LIBNAME=lcd
@ -42,10 +39,10 @@ $(LIBFILE): $(OBJS)
$(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h $(FOBJS): $(foreach ft,$(FONTS),$(ft).h) fonts.h
clean: clean:
rm -f $(OBJS) $(LIBFILE) allfonts.h rm -f $(OBJS) $(LIBFILE) fonts/*.o allfonts.h
render.o: render.c render.h display.h fonts.h render.o: render.c render.h display.h fonts.h
.PHONY: allfonts.h .PHONY: allfonts.h
allfonts.h: allfonts.h:
for a in $(FONTS) ; do echo "#include <lcd/$$a.h>"; done > $@ (echo "#include <lcd/fonts.h>";for a in $(FONTS) ; do echo "#include <lcd/$$a.h>"; done) > $@

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
#include "fonts.h" #include "lcd/fonts.h"
extern const struct FONT_DEF Font_Orbitron14pt; extern const struct FONT_DEF Font_Orbitron14pt;

View File

@ -38,7 +38,7 @@
#ifndef __SMALLFONTS_H_ #ifndef __SMALLFONTS_H_
#define __SMALLFONTS_H_ #define __SMALLFONTS_H_
#include "fonts.h" #include "lcd/fonts.h"
/* Partially based on original code for the KS0108 by Stephane Rey */ /* Partially based on original code for the KS0108 by Stephane Rey */
/* Current version by Kevin Townsend */ /* Current version by Kevin Townsend */

View File

@ -1,3 +1,3 @@
#include "fonts.h" #include "lcd/fonts.h"
extern const struct FONT_DEF Font_Ubuntu18pt; extern const struct FONT_DEF Font_Ubuntu18pt;

2604
lcd/fonts/ubuntu29.c Normal file

File diff suppressed because it is too large Load Diff

3
lcd/fonts/ubuntu29.h Normal file
View File

@ -0,0 +1,3 @@
#include "lcd/fonts.h"
extern const struct FONT_DEF Font_Ubuntu29pt;

3092
lcd/fonts/ubuntu36.c Normal file

File diff suppressed because it is too large Load Diff

3
lcd/fonts/ubuntu36.h Normal file
View File

@ -0,0 +1,3 @@
#include "lcd/fonts.h"
extern const struct FONT_DEF Font_Ubuntu36pt;

View File

@ -56,9 +56,9 @@ HELP
### Code starts here. ### Code starts here.
### ###
my $width=2000; my $width=5000;
my $height=100; my $height=100;
my $xoff=30; my $xoff=90;
my $origsize; my $origsize;
my $c1size; my $c1size;
@ -320,7 +320,7 @@ close(C);
open (H,">",$file.".h")||die; open (H,">",$file.".h")||die;
print H <<EOF; print H <<EOF;
#include "fonts.h" #include "lcd/fonts.h"
extern const struct FONT_DEF Font_$fonts; extern const struct FONT_DEF Font_$fonts;
EOF EOF