Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fonts] New title and subtitle fonts

These fonts include Japanese characters and as they are
large include as compressed pcf files.

textall.bdf was also replaced by compressed pcf file

Also a small fix to pcf2bmf to handle stdin as the input file.

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
commit 06db77bc6c6480714fbe87fbcb9cc5bd5f99a2fa 1 parent e5064ef
@hxw hxw authored
View
8 host-tools/fonts/Makefile
@@ -39,6 +39,7 @@ $(call REQUIRED_BINARY, bdftopcf, xfonts-utils)
BDFTOPCF = $(shell which bdftopcf)
PCFTOBMF = ${HOST_TOOLS}/pcf2bmf/pcf2bmf
+DECOMPRESS = xz --decompress --stdout
TARGETS = title.bmf
TARGETS += subtitle.bmf
@@ -49,6 +50,8 @@ TARGETS += text.bmf
#TARGETS += small.bmf
TARGETS += textall.bmf
#TARGETS += textallb.bmf
+TARGETS += titleall.bmf
+TARGETS += subtlall.bmf
@@ -79,6 +82,9 @@ clean:
${BDFTOPCF} "$<" -o "$@"
%.bmf: %.pcf
- ${PCFTOBMF} -f "$<" -o "$@"
+ ${PCFTOBMF} -f "$<" -o "$@" -c 1152
+
+%.bmf: %.pcf.xz
+ ${DECOMPRESS} "$<" | ${PCFTOBMF} -f - -o "$@"
include ${MK_DIR}/rules.mk
View
BIN  host-tools/fonts/subtlall.pcf.xz
Binary file not shown
View
652,481 host-tools/fonts/textall.bdf
0 additions, 652,481 deletions not shown
View
BIN  host-tools/fonts/textall.pcf.xz
Binary file not shown
View
BIN  host-tools/fonts/titleall.pcf.xz
Binary file not shown
View
19 host-tools/pcf2bmf/pcf.c
@@ -389,7 +389,6 @@ load_pcf_font(pcffont_t *font)
if ((ff = FontFileOpen(font->file)) == NULL)
return -1;
-
if (pcfReadFont(&fr, ff, MSBFirst, MSBFirst, 1, 1) != Successful)
return -1;
fi = &(fr.info);
@@ -509,11 +508,11 @@ void Generate_new_font(pcffont_t *font)
if(i>nFontCount)
break;
}
- printf("count is:%d, before opening file: %s\n",count,name);
+ printf("nFontCount %d, count is:%d, before opening file: %s\n",nFontCount,count,name);
fd = fopen(name, "wb");
if(fd!=NULL)
{
- size_t bs = fwrite(buf,1,count*sizeof(font_bmf),fd);
+ size_t bs = fwrite(buf,1,nFontCount*sizeof(font_bmf),fd);
assert(bs==count*sizeof(font_bmf));
}
fclose(fd);
@@ -608,13 +607,15 @@ void Generate_new_font_with_header(pcffont_t *font)
memcpy(buf+offset,&font_create,sizeof(font_bmf));
offset+=sizeof(font_bmf);
+ if(i>nFontCount)
+ break;
}
- printf("count is:%d, before opening file: %s\n",count,name);
+ printf("count is:%d, before opening file: %s\n",nFontCount,name);
fd = fopen(name, "wb");
if(fd!=NULL)
{
- size_t bs = fwrite(buf,1,count*sizeof(font_bmf)+header_len,fd);
- assert(bs == count*sizeof(font_bmf)+header_len);
+ size_t bs = fwrite(buf,1,nFontCount*sizeof(font_bmf)+header_len,fd);
+ assert(bs == nFontCount*sizeof(font_bmf)+header_len);
}
fclose(fd);
free(buf);
@@ -1722,7 +1723,11 @@ FontFileOpen (char *name) {
// fd = gzcatfile (name);
// else
// fd = open (name, 0);
- fd = fopen(name, "rb");
+ if (0 == strcmp("-", name)) {
+ fd = stdin;
+ } else {
+ fd = fopen(name, "rb");
+ }
// if (fd < 0)
if (!fd)
Please sign in to comment.
Something went wrong with that request. Please try again.