Группа :: Видео
Пакет: alevt
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: alevt-1.8.1-doublefont.patch
Скачать
Скачать
diff '--color=auto' -Naur alevt-v1.8.1/alevt.1x.in alevt-v1.8.1-mod/alevt.1x.in
--- alevt-v1.8.1/alevt.1x.in 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/alevt.1x.in 2023-01-30 10:08:58.742932130 +0100
@@ -73,6 +73,9 @@
.BI \-pid \ pid
Specifies the teletext PID if using the DVB interface.
.TP
+.BR \-doublefont / \-df
+Instructs alevt to use double sized fonts.
+.TP
.B \-\-help
Show summary of options.
.TP
diff '--color=auto' -Naur alevt-v1.8.1/exp-gfx.c alevt-v1.8.1-mod/exp-gfx.c
--- alevt-v1.8.1/exp-gfx.c 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/exp-gfx.c 2023-01-30 10:08:59.141932965 +0100
@@ -21,7 +21,16 @@
int sep)
{
int x,y;
- unsigned char* src= (latin1==LATIN1 ? font1_bits : font2_bits);
+ unsigned char* src = double_font ?
+ ( (latin1==LATIN1) ? font1_bits :
+ ( (latin1==LATIN2) ? font2_bits :
+ ( (latin1==KOI8) ? font3_bits :
+ ( (latin1==GREEK) ? font4_bits : /* fallback */ font1_bits) ) ) )
+ :
+ ( (latin1==LATIN1) ? font1d_bits :
+ ( (latin1==LATIN2) ? font2d_bits :
+ ( (latin1==KOI8) ? font3d_bits :
+ ( (latin1==GREEK) ? font4d_bits : /* fallback */ font1d_bits) ) ) );
int dest_x=_x*CW;
int dest_y=_y*CH;
diff '--color=auto' -Naur alevt-v1.8.1/font.c alevt-v1.8.1-mod/font.c
--- alevt-v1.8.1/font.c 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/font.c 2023-01-30 10:12:05.895323926 +0100
@@ -4,3 +4,13 @@
#include "font3.xbm"
#include "font4.xbm"
+#include "font1d.xbm"
+#include "font2d.xbm"
+#include "font3d.xbm"
+#include "font4d.xbm"
+
+int CW;
+int CH;
+int double_font = 0;
+int font_width;
+int font_height;
diff '--color=auto' -Naur alevt-v1.8.1/font.h alevt-v1.8.1-mod/font.h
--- alevt-v1.8.1/font.h 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/font.h 2023-01-30 10:09:00.366935529 +0100
@@ -1,20 +1,31 @@
#ifndef FONT_H
#define FONT_H
-#include "fontsize.h" /* the #defines from font?.xbm */
+// #include "fontsize.h" /* the #defines from font?.xbm */
-#if font1_width != font2_width || font1_height != font2_height
-#error different font sizes.
-#endif
+//#if font1_width != font2_width || font1_height != font2_height
+//#error different font sizes.
+//#endif
extern unsigned char font1_bits[];
extern unsigned char font2_bits[];
extern unsigned char font3_bits[];
extern unsigned char font4_bits[];
-#define font_width font1_width
-#define font_height font1_height
-#define CW (font_width/32) /* pixel width of a character */
-#define CH (font_height/8) /* pixel height of a character */
+extern unsigned char font1d_bits[];
+extern unsigned char font2d_bits[];
+extern unsigned char font3d_bits[];
+extern unsigned char font4d_bits[];
+
+//#define font_width font1_width
+//#define font_height font1_height
+//#define CW (font_width/32) /* pixel width of a character */
+//#define CH (font_height/8) /* pixel height of a character */
+
+extern int CW;
+extern int CH;
+extern int double_font;
+extern int font_width;
+extern int font_height;
#endif
diff '--color=auto' -Naur alevt-v1.8.1/main.c alevt-v1.8.1-mod/main.c
--- alevt-v1.8.1/main.c 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/main.c 2023-01-30 10:24:51.045929716 +0100
@@ -49,6 +49,7 @@
" -[no]bell\t\t\tenabled\n"
" -charset <latin-1/2/koi8-r/\n"
" iso8859-7>\tlatin-1\n"
+ " -doublefont\n"
" -progname <name>\n"
" -pid <pid>\n"
"\n"
@@ -75,6 +76,12 @@
exit(exitval);
}
+/* Double font size related variables */
+extern int double_font;
+extern int font_width;
+extern int font_height;
+extern int CW;
+extern int CH;
static int
arg_pgno(char *p, int *subno)
@@ -162,6 +169,7 @@
{ "-charset", "-latin", 1 },
{ "-progname", "-pn", 1 },
{ "-pid", "--pid", 1 },
+ { "-doublefont", "-df", 0 },
};
int i;
@@ -284,6 +292,13 @@
case 20: // pid
txtpid = strtoul(arg, NULL, 0);
break;
+ case 21: // Doublefont
+ double_font = 1;
+ font_width = 576;
+ font_height = 256;
+ CW = (font_width/32);
+ CH = (font_height/8);
+ break;
case 6: // parent
case -1: // non-option arg
pgno = arg_pgno(arg, &subno);
diff '--color=auto' -Naur alevt-v1.8.1/Makefile alevt-v1.8.1-mod/Makefile
--- alevt-v1.8.1/Makefile 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/Makefile 2023-01-30 10:09:01.423937742 +0100
@@ -44,9 +44,10 @@
alevt-cap: $(COBJS)
$(CC) $(OPT) $(COBJS) -o alevt-cap $(EXPLIBS)
-font.o: font1.xbm font2.xbm font3.xbm font4.xbm
-fontsize.h: font1.xbm font2.xbm font3.xbm font4.xbm
+font.o: font1.xbm font2.xbm font3.xbm font4.xbm font1d.xbm font2d.xbm font3d.xbm font4d.xbm
+fontsize.h: font1.xbm font2.xbm font3.xbm font4.xbm font1d.xbm font2d.xbm font3d.xbm font4d.xbm
fgrep -h "#define" font1.xbm font2.xbm font3.xbm font4.xbm >fontsize.h
+ fgrep -h "#define" font1d.xbm font2d.xbm font3d.xbm font4d.xbm >> fontsize.h
font1.xbm: bdf2xbm $(FONT)-latin-1.bdf
./bdf2xbm font1 <$(FONT)-latin-1.bdf >font1.xbm
@@ -60,6 +61,18 @@
font4.xbm: bdf2xbm vtxt-iso8859-7.bdf
./bdf2xbm font4 <vtxt-iso8859-7.bdf >font4.xbm
+font1d.xbm: font1.xbm
+ /usr/bin/convert -filter Point -resize 200% font1.xbm font1d.xbm
+
+font2d.xbm: font2.xbm
+ /usr/bin/convert -filter Point -resize 200% font2.xbm font2d.xbm
+
+font3d.xbm: font3.xbm
+ /usr/bin/convert -filter Point -resize 200% font3.xbm font3d.xbm
+
+font4d.xbm: font4.xbm
+ /usr/bin/convert -filter Point -resize 200% font4.xbm font4d.xbm
+
bdf2xbm: bdf2xbm.c
$(HOSTCC) bdf2xbm.c -o bdf2xbm
@@ -73,7 +86,7 @@
sed s/VERSION/$(VER)/g <alevt-cap.1.in >alevt-cap.1
clean:
- rm -f *.o page*.txt a.out core bdf2xbm font?.xbm fontsize.h Makefile.bak
+ rm -f *.o page*.txt a.out core bdf2xbm font?.xbm font?d.xbm fontsize.h Makefile.bak
rm -f alevt alevt-date alevt-cap
rm -f alevt.1x alevt-date.1 alevt-cap.1
rm -f contrib/a.out ttext-*.*
diff '--color=auto' -Naur alevt-v1.8.1/xio.c alevt-v1.8.1-mod/xio.c
--- alevt-v1.8.1/xio.c 2021-08-20 21:35:44.000000000 +0200
+++ alevt-v1.8.1-mod/xio.c 2023-01-30 10:09:01.922938787 +0100
@@ -130,12 +130,22 @@
int i;
unsigned char *font_bits;
- switch(latin1) {
- case LATIN1: font_bits=font1_bits; break;
- case LATIN2: font_bits=font2_bits; break;
- case KOI8: font_bits=font3_bits; break;
- case GREEK: font_bits=font4_bits; break;
- default: font_bits=font1_bits; break;
+ if(!double_font) {
+ switch(latin1) {
+ case LATIN1: font_bits=font1_bits; break;
+ case LATIN2: font_bits=font2_bits; break;
+ case KOI8: font_bits=font3_bits; break;
+ case GREEK: font_bits=font4_bits; break;
+ default: font_bits=font1_bits; break;
+ }
+ } else {
+ switch(latin1) {
+ case LATIN1: font_bits=font1d_bits; break;
+ case LATIN2: font_bits=font2d_bits; break;
+ case KOI8: font_bits=font3d_bits; break;
+ case GREEK: font_bits=font4d_bits; break;
+ default: font_bits=font1d_bits; break;
+ }
}
xio->font[0] = XCreateBitmapFromData(xio->dpy, xio->root,