From 54d5f6870a7351584fcb1c3e861a4fc9224badf3 Mon Sep 17 00:00:00 2001 From: Martin Prochnow Date: Sun, 26 Mar 2006 12:18:12 +0200 Subject: Version 0.7 - added frensh translation; thanks to Patrice Staudt - added finnish translation; thanks to Rolf Ahrenberg - several bugfixes: * if there are more then one recording with the same name, only one of it is shown if the recording details are hidden; thanks to Monroe from vdr-portal.de for reporting * recording list entry (not the recording itselfs!) is deleted, if it is moved to the same place; thanks to Monroe from vdr-portal.de for reporting * if a recording was deleted, the selection bar jumps to the first list entry * some people reported problems with wrong recording dates using LinVDR - revised rename-recording-menu; thanks to Monroe from vdr-portal.de for suggesting - revised move-recording-menu - it is now more obvious; thanks to Monroe from vdr-portal.de for suggesting - added option to show an alternative new marker - it's only useful for german speaking users because this icon shows 'NEU'; suggestions for an international version are welcome, you has 22x22 pixels for it - added the functionality of the DvdArchive- and the DVDShowArchive-patch for VDR - thanks fpr vejoun from vdr-portal.de for the script 'dvdarchive.sh' --- patchfont.c | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 patchfont.c (limited to 'patchfont.c') diff --git a/patchfont.c b/patchfont.c new file mode 100644 index 0000000..320e036 --- /dev/null +++ b/patchfont.c @@ -0,0 +1,163 @@ +/* + * See the README file for copyright information and how to reach the author. + */ + +#include +#include "patchfont.h" +#include "mymenusetup.h" + +void PatchFont(eDvbFont DvbFont) +{ + const cFont *font = cFont::GetFont(DvbFont); + int num_rows_global = font->Height(); + int num_rows = num_rows_global+2; + int i,j,num_char; + + cFont::tPixelData* font_data = new cFont::tPixelData[225*(num_rows)]; + + for (i = 0; i < 225; i++) + for (j = 0; j < num_rows; j++) + font_data[(i*num_rows)+j]=0x0000000000000000; + + font_data[0+0]=6;//font->CharData(0)->width; + font_data[0+1]=num_rows_global; + + for(num_char=33, i = 1; num_char<256; i++, num_char++) + { + const cFont::tCharData* char_data = font->CharData(num_char); + font_data[i*num_rows+0] = (num_char>=127 && num_char<=129)?6:char_data->width; + font_data[i*num_rows+1] = char_data->height; + + // new marker + if(num_char==250&&mysetup.PatchNew) + { + if(DvbFont==fontOsd) + { + font_data[i*num_rows+ 0]=16; + font_data[i*num_rows+ 1]=27; + font_data[i*num_rows+ 2]=0; // ................ + font_data[i*num_rows+ 3]=0xc600; // ##...##......... + font_data[i*num_rows+ 4]=0xe600; // ###..##......... + font_data[i*num_rows+ 5]=0xf600; // ####.##......... + font_data[i*num_rows+ 6]=0xf600; // ####.##......... + font_data[i*num_rows+ 7]=0xde00; // ##.####......... + font_data[i*num_rows+ 8]=0xde00; // ##.####......... + font_data[i*num_rows+ 9]=0xce00; // ##..###......... + font_data[i*num_rows+10]=0xc600; // ##...##......... + font_data[i*num_rows+11]=0x0; // ................ + font_data[i*num_rows+12]=0x1fc0; // ...#######...... + font_data[i*num_rows+13]=0x1fc0; // ...#######...... + font_data[i*num_rows+14]=0x1800; // ...##........... + font_data[i*num_rows+15]=0x1f00; // ...#####........ + font_data[i*num_rows+16]=0x1f00; // ...#####........ + font_data[i*num_rows+17]=0x1800; // ...##........... + font_data[i*num_rows+18]=0x1fc0; // ...#######...... + font_data[i*num_rows+19]=0x1fc0; // ...#######...... + font_data[i*num_rows+20]=0x0; // ................ + font_data[i*num_rows+21]=0x318; // ......##...##... + font_data[i*num_rows+22]=0x318; // ......##...##... + font_data[i*num_rows+23]=0x318; // ......##...##... + font_data[i*num_rows+24]=0x318; // ......##...##... + font_data[i*num_rows+25]=0x318; // ......##...##... + font_data[i*num_rows+26]=0x318; // ......##...##... + font_data[i*num_rows+27]=0x3f8; // ......#######... + font_data[i*num_rows+28]=0x1f0; // .......#####.... + } + else + { + font_data[i*num_rows+ 0]=16; + font_data[i*num_rows+ 1]=22; + font_data[i*num_rows+ 2]=0x0; // ................ + font_data[i*num_rows+ 3]=0xc600; // ##...##......... + font_data[i*num_rows+ 4]=0xe600; // ###..##......... + font_data[i*num_rows+ 5]=0xf600; // ####.##......... + font_data[i*num_rows+ 6]=0xde00; // ##.####......... + font_data[i*num_rows+ 7]=0xce00; // ##..###......... + font_data[i*num_rows+ 8]=0xc600; // ##...##......... + font_data[i*num_rows+ 9]=0x0; // ................ + font_data[i*num_rows+10]=0x1fc0; // ...#######...... + font_data[i*num_rows+11]=0x1fc0; // ...#######...... + font_data[i*num_rows+12]=0x1800; // ...##........... + font_data[i*num_rows+13]=0x1f00; // ...#####........ + font_data[i*num_rows+14]=0x1800; // ...##........... + font_data[i*num_rows+15]=0x1fc0; // ...#######...... + font_data[i*num_rows+16]=0x1fc0; // ...#######...... + font_data[i*num_rows+17]=0x0; // ................ + font_data[i*num_rows+18]=0x318; // ......##...##... + font_data[i*num_rows+19]=0x318; // ......##...##... + font_data[i*num_rows+20]=0x318; // ......##...##... + font_data[i*num_rows+21]=0x318; // ......##...##... + font_data[i*num_rows+22]=0x3f8; // ......#######... + font_data[i*num_rows+23]=0x1f0; // .......#####.... + } + } + // dvd marker + else if(num_char==251&&mysetup.PatchDvd) + { + if(DvbFont==fontOsd) + { + font_data[i*num_rows+ 0]=22; + font_data[i*num_rows+ 1]=27; + font_data[i*num_rows+ 5]=0x0; // .. .... .... .... .... .... + font_data[i*num_rows+ 6]=0x003f00; // .. .... ..## #### .... .... + font_data[i*num_rows+ 7]=0x01ffe0; // .. ...# #### #### ###. .... + font_data[i*num_rows+ 8]=0x03ff90; // .. ..## #### #### #..# .... + font_data[i*num_rows+ 9]=0x07ff08; // .. .### #### #### .... #... + font_data[i*num_rows+10]=0x0fff04; // .. #### #### #### .... .#.. + font_data[i*num_rows+11]=0x0ffe04; // .. #### #### ###. .... .#.. + font_data[i*num_rows+12]=0x0ffe0c; // .. #### #### ###. .... ##.. + font_data[i*num_rows+13]=0x1ffc3e; // .# #### #### ##.. ..## ###. + font_data[i*num_rows+14]=0x1ff2fe; // .# #### #### ..#. #### ###. + font_data[i*num_rows+15]=0x1fe1fe; // .# #### ###. ...# #### ###. + font_data[i*num_rows+16]=0x1fe1fe; // .# #### ###. ...# #### ###. + font_data[i*num_rows+17]=0x1fd3fe; // .# #### ##.# ..## #### ###. + font_data[i*num_rows+18]=0x1f0ffe; // .# #### .... #### #### ###. + font_data[i*num_rows+19]=0x0c1ffc; // .. ##.. ...# #### #### ##.. + font_data[i*num_rows+20]=0x081ffc; // .. #... ...# #### #### ##.. + font_data[i*num_rows+21]=0x083ffc; // .. #... ..## #### #### ##.. + font_data[i*num_rows+22]=0x043ff8; // .. .#.. ..## #### #### #... + font_data[i*num_rows+23]=0x027ff0; // .. ..#. .### #### #### .... + font_data[i*num_rows+24]=0x01ffe0; // .. ...# #### #### ###. .... + font_data[i*num_rows+25]=0x003f00; // .. .... ..## #### .... .... + font_data[i*num_rows+26]=0x000000; // .. .... .... .... .... .... + } + else + { + font_data[i*num_rows+ 0]=22; + font_data[i*num_rows+ 1]=22; + font_data[i*num_rows+ 2]=0x0; // .. .... .... .... .... .... + font_data[i*num_rows+ 3]=0x003f00; // .. .... ..## #### .... .... + font_data[i*num_rows+ 4]=0x01ffe0; // .. ...# #### #### ###. .... + font_data[i*num_rows+ 5]=0x03ff90; // .. ..## #### #### #..# .... + font_data[i*num_rows+ 6]=0x07ff08; // .. .### #### #### .... #... + font_data[i*num_rows+ 7]=0x0fff04; // .. #### #### #### .... .#.. + font_data[i*num_rows+ 8]=0x0ffe04; // .. #### #### ###. .... .#.. + font_data[i*num_rows+ 9]=0x0ffe0c; // .. #### #### ###. .... ##.. + font_data[i*num_rows+10]=0x1ffc3e; // .# #### #### ##.. ..## ###. + font_data[i*num_rows+11]=0x1ff2fe; // .# #### #### ..#. #### ###. + font_data[i*num_rows+12]=0x1fe1fe; // .# #### ###. ...# #### ###. + font_data[i*num_rows+13]=0x1fe1fe; // .# #### ###. ...# #### ###. + font_data[i*num_rows+14]=0x1fd3fe; // .# #### ##.# ..## #### ###. + font_data[i*num_rows+15]=0x1f0ffe; // .# #### .... #### #### ###. + font_data[i*num_rows+16]=0x0c1ffc; // .. ##.. ...# #### #### ##.. + font_data[i*num_rows+17]=0x081ffc; // .. #... ...# #### #### ##.. + font_data[i*num_rows+18]=0x083ffc; // .. #... ..## #### #### ##.. + font_data[i*num_rows+19]=0x043ff8; // .. .#.. ..## #### #### #... + font_data[i*num_rows+20]=0x027ff0; // .. ..#. .### #### #### .... + font_data[i*num_rows+21]=0x01ffe0; // .. ...# #### #### ###. .... + font_data[i*num_rows+22]=0x003f00; // .. .... ..## #### .... .... + font_data[i*num_rows+23]=0x000000; // .. .... .... .... .... .... + } + } + else + { + for(j = 0; j<(int)char_data->height; j++) + { + cFont::tPixelData Data = (cFont::tPixelData)char_data->lines[j]; + + font_data[(i*num_rows)+2+j] = Data; + } + } + } + cFont::SetFont(DvbFont, font_data); +} -- cgit v1.2.3