Hi Kevin, On Fri, Oct 23, 2015 at 03:28:18PM +0800, Kevin Du Huanpeng wrote: > Hi, How about add a index before get fontdata? > so, we will able to support non-ascii fonts. > like: > drivers/video/fbconsole.c > --> static void drawchar(struct fbc_priv *priv, int x, int y, char c) > { > ... > - inbuf = &priv->fontdata[c * priv->font_height]; > + if(priv->index) { > + inbuf = look up index in the table. > + } > + else { > + inbuf = &priv->fontdata[c * priv->font_height]; > + } > the index table like: > struct font_index fontname_index = { > { 0xXXXX, 0xYYYY }, /* where, 0xXXXX is the unioncode of the char */ > { 0xXXXX, 0xYYYY }, /* the 0xYYYY is the index of the fontdata array. */ > { 0xXXXX, 0xYYYY }, /* normally, we don't need a full char set. */ > { 0xXXXX, 0xYYYY }, /* just put the used chars in the table. */ > { 0xXXXX, 0xYYYY }, /* we also have a tool to generate fontdata array.*/ > }; If you want to support non-ascii fonts then why don't you simply add one? Or is your concern that too much binary size is used when you only need a small fraction of a font but you always have to provide 256 chars? Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox