diff options
Diffstat (limited to 'apps/plugins/text_viewer/tv_text_processor.c')
-rw-r--r-- | apps/plugins/text_viewer/tv_text_processor.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/apps/plugins/text_viewer/tv_text_processor.c b/apps/plugins/text_viewer/tv_text_processor.c index fa644d7725..db96d61409 100644 --- a/apps/plugins/text_viewer/tv_text_processor.c +++ b/apps/plugins/text_viewer/tv_text_processor.c | |||
@@ -33,11 +33,7 @@ enum{ | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* the max characters of each blocks */ | 35 | /* the max characters of each blocks */ |
36 | #ifdef HAVE_LCD_BITMAP | ||
37 | #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) | 36 | #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH / 2 + 1) |
38 | #else | ||
39 | #define TV_MAX_CHARS_PER_BLOCK (LCD_WIDTH + 1) | ||
40 | #endif | ||
41 | 37 | ||
42 | #define TV_MAX_BLOCKS 5 | 38 | #define TV_MAX_BLOCKS 5 |
43 | 39 | ||
@@ -90,15 +86,11 @@ static int tv_glyph_width(int ch) | |||
90 | if (ch == 0) | 86 | if (ch == 0) |
91 | ch = ' '; | 87 | ch = ' '; |
92 | 88 | ||
93 | #ifdef HAVE_LCD_BITMAP | ||
94 | /* the width of the diacritics charcter is 0 */ | 89 | /* the width of the diacritics charcter is 0 */ |
95 | if (rb->is_diacritic(ch, NULL)) | 90 | if (rb->is_diacritic(ch, NULL)) |
96 | return 0; | 91 | return 0; |
97 | 92 | ||
98 | return rb->font_get_width(rb->font_get(preferences->font_id), ch); | 93 | return rb->font_get_width(rb->font_get(preferences->font_id), ch); |
99 | #else | ||
100 | return 1; | ||
101 | #endif | ||
102 | } | 94 | } |
103 | 95 | ||
104 | static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) | 96 | static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) |
@@ -138,7 +130,6 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) | |||
138 | if (preferences->encoding == UTF_8) | 130 | if (preferences->encoding == UTF_8) |
139 | return (unsigned char*)rb->utf8decode(str, ch); | 131 | return (unsigned char*)rb->utf8decode(str, ch); |
140 | 132 | ||
141 | #ifdef HAVE_LCD_BITMAP | ||
142 | if ((*str >= 0x80) && | 133 | if ((*str >= 0x80) && |
143 | ((preferences->encoding > SJIS) || | 134 | ((preferences->encoding > SJIS) || |
144 | (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) | 135 | (preferences->encoding == SJIS && (*str <= 0xa0 || *str >= 0xe0)))) |
@@ -151,7 +142,7 @@ static unsigned char *tv_get_ucs(const unsigned char *str, unsigned short *ch) | |||
151 | } | 142 | } |
152 | count = 2; | 143 | count = 2; |
153 | } | 144 | } |
154 | #endif | 145 | |
155 | rb->iso_decode(str, utf8_tmp, preferences->encoding, count); | 146 | rb->iso_decode(str, utf8_tmp, preferences->encoding, count); |
156 | rb->utf8decode(utf8_tmp, ch); | 147 | rb->utf8decode(utf8_tmp, ch); |
157 | return (unsigned char *)str + count; | 148 | return (unsigned char *)str + count; |