[prev in list] [next in list] [prev in thread] [next in thread]
List: rockbox-cvs
Subject: amiconn: r19607 - trunk/apps/plugins/lib
From: mailer () svn ! rockbox ! org
Date: 2008-12-28 20:12:13
Message-ID: 200812282012.mBSKCDi7007033 () giant ! haxx ! se
[Download RAW message or body]
Date: 2008-12-28 21:12:12 +0100 (Sun, 28 Dec 2008)
New Revision: 19607
Log Message:
Make the greylib text output functions handle unicode. Fixes non-working umlauts etc \
in greyscale pictureflow.
Modified:
trunk/apps/plugins/lib/grey_draw.c
Modified: trunk/apps/plugins/lib/grey_draw.c
===================================================================
--- trunk/apps/plugins/lib/grey_draw.c 2008-12-28 17:34:44 UTC (rev 19606)
+++ trunk/apps/plugins/lib/grey_draw.c 2008-12-28 20:12:12 UTC (rev 19607)
@@ -534,20 +534,18 @@
void grey_putsxyofs(int x, int y, int ofs, const unsigned char *str)
{
int ch;
+ unsigned short *ucs;
struct font* pf = _grey_info.rb->font_get(_grey_info.curfont);
+
+ ucs = _grey_info.rb->bidi_l2v(str, 1);
- while ((ch = *str++) != '\0' && x < _grey_info.width)
+ while ((ch = *ucs++) != 0 && x < _grey_info.width)
{
int width;
const unsigned char *bits;
- /* check input range */
- if (ch < pf->firstchar || ch >= pf->firstchar+pf->size)
- ch = pf->defaultchar;
- ch -= pf->firstchar;
-
/* get proportional width and glyph bits */
- width = pf->width ? pf->width[ch] : pf->maxwidth;
+ width = _grey_info.rb->font_get_width(pf, ch);
if (ofs > width)
{
@@ -555,8 +553,7 @@
continue;
}
- bits = pf->bits + (pf->offset ?
- pf->offset[ch] : (((pf->height + 7) >> 3) * pf->maxwidth * ch));
+ bits = _grey_info.rb->font_get_bits(pf, ch);
grey_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs@cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic