You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
4.3 KiB
129 lines
4.3 KiB
5 years ago
|
diff -Nrbu zvbi-0.2.22/contrib/x11font.c zvbi-0.2.22-OK/contrib/x11font.c
|
||
|
--- zvbi-0.2.24/contrib/x11font.c.orig 2006-02-10 09:25:36.000000000 +0300
|
||
|
+++ zvbi-0.2.24/contrib/x11font.c 2007-03-12 16:55:06.000000000 +0300
|
||
|
@@ -12,31 +12,31 @@
|
||
|
{
|
||
|
fprintf(fp,
|
||
|
"STARTFONT 2.1\n"
|
||
|
- "FONT -%s-%s-medium-%s-normal--%d-%d-75-75-c-%d-iso10646-1\n"
|
||
|
+ "FONT -%s-%s-Medium-%s-Normal--%d-%d-75-75-C-%d-ISO10646-1\n"
|
||
|
"SIZE %d 75 75\n"
|
||
|
- "FONTBOUNDINGBOX 6 13 0 -2\n"
|
||
|
+ "FONTBOUNDINGBOX %d %d 0 0\n"
|
||
|
"STARTPROPERTIES 25\n"
|
||
|
"FONTNAME_REGISTRY \"\"\n"
|
||
|
"FOUNDRY \"%s\"\n"
|
||
|
"FAMILY_NAME \"%s\"\n"
|
||
|
- "WEIGHT_NAME \"medium\"\n"
|
||
|
+ "WEIGHT_NAME \"Medium\"\n"
|
||
|
"SLANT \"%s\"\n"
|
||
|
- "SETWIDTH_NAME \"normal\"\n"
|
||
|
+ "SETWIDTH_NAME \"Normal\"\n"
|
||
|
"ADD_STYLE_NAME \"\"\n"
|
||
|
"PIXEL_SIZE %d\n"
|
||
|
"POINT_SIZE %d\n"
|
||
|
"RESOLUTION_X 75\n"
|
||
|
"RESOLUTION_Y 75\n"
|
||
|
- "SPACING \"c\"\n"
|
||
|
+ "SPACING \"C\"\n"
|
||
|
"AVERAGE_WIDTH %d\n"
|
||
|
- "CHARSET_REGISTRY \"iso10646\"\n"
|
||
|
+ "CHARSET_REGISTRY \"ISO10646\"\n"
|
||
|
"CHARSET_ENCODING \"1\"\n"
|
||
|
"COPYRIGHT \"fixme\"\n"
|
||
|
"CAP_HEIGHT 9\n"
|
||
|
"X_HEIGHT 18\n"
|
||
|
- "FONT \"-%s-%s-medium-%s-normal--%d-%d-75-75-c-%d-iso10646-1\"\n"
|
||
|
+ "FONT \"-%s-%s-Medium-%s-Normal--%d-%d-75-75-C-%d-ISO10646-1\"\n"
|
||
|
"WEIGHT 10\n"
|
||
|
- "RESOLUTION 103\n"
|
||
|
+ "RESOLUTION 75\n"
|
||
|
"QUAD_WIDTH %d\n"
|
||
|
"DEFAULT_CHAR 0\n"
|
||
|
"FONT_ASCENT %d\n"
|
||
|
@@ -44,6 +44,7 @@
|
||
|
"ENDPROPERTIES\n",
|
||
|
foundry,name,slant,height,height*10,width*10,
|
||
|
height,
|
||
|
+ width,height,
|
||
|
foundry,name,slant,height,height*10,width*10,
|
||
|
foundry,name,slant,height,height*10,width*10,
|
||
|
width,height);
|
||
|
@@ -53,11 +54,11 @@
|
||
|
print_font(const char *filename,
|
||
|
const char *foundry,
|
||
|
const char *name, int italic,
|
||
|
- uint8_t *font, int cw, int ch, int cpl,
|
||
|
+ uint8_t *font, int cw, int ch, int cpl, int hs,
|
||
|
int count, unsigned int (*map)(unsigned int,int), int invalid)
|
||
|
{
|
||
|
FILE *fp;
|
||
|
- int x,y,i,c,on,bit,byte,mask1,mask2;
|
||
|
+ int x,y,s,i,c,on,bit,byte,mask1,mask2;
|
||
|
|
||
|
fp = stdout;
|
||
|
if (NULL != filename) {
|
||
|
@@ -67,7 +68,7 @@
|
||
|
fprintf(stderr,"writing %s\n",filename);
|
||
|
}
|
||
|
|
||
|
- print_head(fp, foundry, name, italic ? "i" : "r", cw, ch);
|
||
|
+ print_head(fp, foundry, name, italic ? "I" : "R", cw, ch*hs);
|
||
|
fprintf(fp,"CHARS %d\n", count);
|
||
|
|
||
|
for (i = 0; i < 0xffff; i++) {
|
||
|
@@ -82,8 +83,9 @@
|
||
|
"BBX %d %d 0 0\n"
|
||
|
"BITMAP\n",
|
||
|
i,cw*10,cw,
|
||
|
- cw,ch);
|
||
|
+ cw,ch*hs);
|
||
|
for (y = 0; y < ch; y++) {
|
||
|
+ for (s = 0; s < hs; s++) {
|
||
|
bit = cpl * cw * y + cw * c;
|
||
|
byte = 0;
|
||
|
for (x = 0; x < cw; x++) {
|
||
|
@@ -100,6 +102,7 @@
|
||
|
}
|
||
|
fprintf(fp,"%02x\n",byte);
|
||
|
}
|
||
|
+ }
|
||
|
fprintf(fp,"ENDCHAR\n");
|
||
|
}
|
||
|
fprintf(fp,"ENDFONT\n");
|
||
|
@@ -109,17 +112,23 @@
|
||
|
}
|
||
|
|
||
|
int
|
||
|
-main ()
|
||
|
+main(int argc, char *argv[])
|
||
|
{
|
||
|
- print_font("teletext.bdf","ets","teletext",0,(uint8_t *) wstfont2_bits,
|
||
|
- TCW,TCH,TCPL,1448,unicode_wstfont2,357);
|
||
|
- print_font("teletexti.bdf","ets","teletext",1,(uint8_t *) wstfont2_bits,
|
||
|
- TCW,TCH,TCPL,1449,unicode_wstfont2,357);
|
||
|
- print_font("caption.bdf","ets","caption",0,(uint8_t *) ccfont2_bits,
|
||
|
- CCW,CCH,CCPL,120,unicode_ccfont2,15);
|
||
|
- print_font("captioni.bdf","ets","caption",1,(uint8_t *) ccfont2_bits,
|
||
|
- CCW,CCH,CCPL,120,unicode_ccfont2,15 + 4 * 32);
|
||
|
+ print_font("teletext1.bdf","Ets","Teletext",0,wstfont2_bits,
|
||
|
+ TCW,TCH,TCPL,1,1448,unicode_wstfont2,357);
|
||
|
+ print_font("teletext2.bdf","Ets","Teletext",0,wstfont2_bits,
|
||
|
+ TCW,TCH,TCPL,2,1448,unicode_wstfont2,357);
|
||
|
+ print_font("teletext4.bdf","Ets","Teletext",0,wstfont2_bits,
|
||
|
+ TCW,TCH,TCPL,4,1448,unicode_wstfont2,357);
|
||
|
+ print_font("teletext1i.bdf","Ets","Teletext",1,wstfont2_bits,
|
||
|
+ TCW,TCH,TCPL,1,1449,unicode_wstfont2,357);
|
||
|
+ print_font("teletext2i.bdf","Ets","Teletext",1,wstfont2_bits,
|
||
|
+ TCW,TCH,TCPL,2,1449,unicode_wstfont2,357);
|
||
|
+ print_font("teletext4i.bdf","Ets","Teletext",1,wstfont2_bits,
|
||
|
+ TCW,TCH,TCPL,4,1449,unicode_wstfont2,357);
|
||
|
+ print_font("caption.bdf","Ets","Caption",0,ccfont2_bits,
|
||
|
+ CCW,CCH,CCPL,1,120,unicode_ccfont2,15);
|
||
|
+ print_font("captioni.bdf","Ets","Caption",1,ccfont2_bits,
|
||
|
+ CCW,CCH,CCPL,1,120,unicode_ccfont2,15 + 4 * 32);
|
||
|
return 0;
|
||
|
}
|
||
|
-
|
||
|
-
|