mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Kevin Du Huanpeng <u74147@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [vedio] support no-ascii fonts?
Date: Mon, 26 Oct 2015 07:39:09 +0100	[thread overview]
Message-ID: <20151026063909.GR14476@pengutronix.de> (raw)
In-Reply-To: <20151023072818.GA11271@L64>

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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-10-26  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  7:28 Kevin Du Huanpeng
2015-10-26  6:39 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151026063909.GR14476@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=u74147@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox