Package: dvb-apps
Version: 1.1.1+rev1500-1.1
Severity: normal
File: /usr/bin/alevt
Tags: patch upstream
The font size of alevt is very small on modern display sizes and
resolutions.
The same problem was reported on another distribution over 10 years
ago (https://bugzilla.redhat.com/show_bug.cgi?id=459294), but
apparently the patch never made it back upstream or to Debian. I've
rebased the patch provided there
(https://src.fedoraproject.org/rpms/alevt/blob/master/f/alevt-1.6.2-doublefont.patch)
against the current version and it still works (tested).
Interestingly, alevt.patch added this as a to-do item in 2010 (long
time ago, but *after* the patch above was already made) ...
--- linuxtv-dvb-apps-1.1.1+rev1457.orig/util/alevt/TODO 2011-12-08
01:26:50.000000000 +1100
+++ linuxtv-dvb-apps-1.1.1+rev1457/util/alevt/TODO 2012-01-05
22:23:33.000000000 +1100
-Hi, these are issues that I unfortunately cannot resolve myself:
+These are issues that I unfortunately cannot resolve myself:
[...]
+3. New BDF fonts for slightly bigger windows.
+ Those BDF fonts need to be edited so that they can be transformed by
bdf2xbm.
-Uwe Bugla, February 11th, 2010.
+Uwe Bugla, February 14th, 2010.
--- ./util/alevt/alevt.1
+++ ./util/alevt-doublefont/alevt.1
@@ -21,6 +21,9 @@
.TP
.B \-cs -charset <latin-1/2/koi8-r/iso8859-7>
character set
+.BR \-doublefont / \-df
+Instructs alevt to use double sized fonts.
+.TP
.TP
.B \-h -help
print this page
--- ./util/alevt/exp-gfx.c
+++ ./util/alevt-doublefont/exp-gfx.c
@@ -15,7 +15,16 @@
int c, int dbl, int _x, int _y, 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;
--- ./util/alevt/font.c
+++ ./util/alevt-doublefont/font.c
@@ -3,3 +3,14 @@
#include "font2.xbm"
#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;
--- ./util/alevt/font.h
+++ ./util/alevt-doublefont/font.h
@@ -1,19 +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
--- ./util/alevt/main.c
+++ ./util/alevt-doublefont/main.c
@@ -22,6 +22,12 @@
static int ttpid = -1;
u_int16_t sid = 0;
+/* Double font size related variables */
+extern int double_font;
+extern int font_width;
+extern int font_height;
+extern int CW;
+extern int CH;
static void usage(FILE *fp, int exitval)
{
@@ -33,6 +39,7 @@
" -ch -child <ppp.ss>\t\t(none)\n"
" -cs -charset\t\tlatin-1\n"
" <latin-1/2/koi8-r/iso8859-7>\n"
+ " -doublefont\n"
" -h -help\n"
" -o <outfile>\t\t(none;dvb only)\n"
" -p -parent <ppp.ss>\t\t900\n"
@@ -127,6 +134,7 @@
{ "-sid", "-s", 1 },
{ "-ttpid", "-t", 1 },
{ "-vbi", "-v", 1 },
+ { "-doublefont", "-df", 0 },
};
int i;
if (*ind >= argc)
@@ -159,6 +167,12 @@
char *arg;
sid = 0;
+ font_width = 288;
+ font_height = 128;
+
+ CW = (font_width/32);
+ CH = (font_height/8);
+
setprgname(argv[0]);
fdset_init(fds);
@@ -189,6 +203,13 @@
else
fatal("bad charset (not latin-1/2/koi8-r/iso8859-7)");
break;
+ case 10: // Doublefont
+ double_font = 1;
+ font_width = 576;
+ font_height = 256;
+ CW = (font_width/32);
+ CH = (font_height/8);
+ break;
case 4: // help
usage(stdout, 0);
break;
--- ./util/alevt/Makefile
+++ ./util/alevt-doublefont/Makefile
@@ -33,9 +33,10 @@
alevt-cap: $(COBJS)
$(CC) $(OPT) $(COBJS) $(LDFLAGS) -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
@@ -49,6 +50,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
@@ -53,7 +66,7 @@
$(HOSTCC) bdf2xbm.c -o bdf2xbm
clean:
- rm -f *.o page*.txt a.out core bdf2xbm font?.xbm fontsize.h
+ rm -f *.o page*.txt a.out core bdf2xbm font?.xbm font?d.xbm fontsize.h
rm -f alevt alevt-date alevt-cap
rpm-install: all
--- ./util/alevt/xio.c
+++ ./util/alevt-doublefont/xio.c
@@ -122,12 +122,22 @@
GC gc;
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,
_______________________________________________
pkg-vdr-dvb-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-vdr-dvb-devel