mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Freetype font support; full UTF-8 support; dropped pixel fonts
This commit is contained in:
12
libsi/si.c
12
libsi/si.c
@@ -6,7 +6,7 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* $Id: si.c 1.19 2007/05/28 10:22:42 kls Exp $
|
||||
* $Id: si.c 1.20 2007/06/10 09:31:34 kls Exp $
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
@@ -219,7 +219,9 @@ char *String::getText() {
|
||||
int len=getLength();
|
||||
if (len < 0 || len > 4095)
|
||||
return strdup("text error"); // caller will delete it!
|
||||
char *data=new char(len+1);
|
||||
char *data=new char(len+1); // FIXME If this function is ever actually used, this buffer might
|
||||
// need to be bigger in order to hold the string as UTF-8.
|
||||
// Maybe decodeText should dynamically handle this? kls 2007-06-10
|
||||
decodeText(data, len+1);
|
||||
return data;
|
||||
}
|
||||
@@ -404,6 +406,9 @@ void String::decodeText(char *buffer, int size) {
|
||||
}
|
||||
bool singleByte;
|
||||
const char *cs = getCharacterTable(from, len, &singleByte);
|
||||
// FIXME Need to make this UTF-8 aware (different control codes).
|
||||
// However, there's yet to be found a broadcaster that actually
|
||||
// uses UTF-8 for the SI data... (kls 2007-06-10)
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (*from == 0)
|
||||
break;
|
||||
@@ -440,6 +445,9 @@ void String::decodeText(char *buffer, char *shortVersion, int sizeBuffer, int si
|
||||
}
|
||||
bool singleByte;
|
||||
const char *cs = getCharacterTable(from, len, &singleByte);
|
||||
// FIXME Need to make this UTF-8 aware (different control codes).
|
||||
// However, there's yet to be found a broadcaster that actually
|
||||
// uses UTF-8 for the SI data... (kls 2007-06-10)
|
||||
for (int i = 0; i < len; i++) {
|
||||
if ( ((' ' <= *from) && (*from <= '~'))
|
||||
|| (*from == '\n')
|
||||
|
Reference in New Issue
Block a user