From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NxnOo-00023r-SM for mharc-grub-devel@gnu.org; Fri, 02 Apr 2010 16:23:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxnOn-00021P-I0 for grub-devel@gnu.org; Fri, 02 Apr 2010 16:23:25 -0400 Received: from [140.186.70.92] (port=54839 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxnOm-0001zw-7K for grub-devel@gnu.org; Fri, 02 Apr 2010 16:23:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxnOk-0004jU-GX for grub-devel@gnu.org; Fri, 02 Apr 2010 16:23:24 -0400 Received: from mail-bw0-f217.google.com ([209.85.218.217]:48945) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxnOk-0004jP-9x for grub-devel@gnu.org; Fri, 02 Apr 2010 16:23:22 -0400 Received: by bwz9 with SMTP id 9so1681182bwz.9 for ; Fri, 02 Apr 2010 13:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=FKwQITzlqGmgIe4ab6HcDeIS3Gedte2BM1LQrTCJ2Og=; b=Uume1nj6jP/BbLJcFzFtId1sa4YjyB5xfGvOfo26c0nbDRnkGuiQY6Jonrx4SON7eE xC9sq4GqC9riT4OgTLbxStyAAkxQR0UxlGOaAx84n+FTXxhBoLHor2EdCWdJu0JVg8rX zkFeUmpMwuxBF3lDVHZ8IJy0uEnGF+aQkbRDY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=RYNwfoR+o6rZBfC/K36GdzFsrUDk8WhS/JkBV1TcdRx3U99SGB0lgpWgP4T3S2DkXN 9Adk9APOMuWdKSFBKHoWenJX47wtRDyjrUug4P01feE5fDTNMu1yjW7OdE+cnFJzyA5d ZTHQHmEuTCE31JvS5R6lBVkCxBsDBQ/ksjuWk= Received: by 10.204.131.153 with SMTP id x25mr3365685bks.159.1270239801112; Fri, 02 Apr 2010 13:23:21 -0700 (PDT) Received: from debian.bg45.phnet (222-14.77-83.cust.bluewin.ch [83.77.14.222]) by mx.google.com with ESMTPS id 16sm4663900bwz.9.2010.04.02.13.23.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 13:23:19 -0700 (PDT) Message-ID: <4BB65231.10205@gmail.com> Date: Fri, 02 Apr 2010 22:23:13 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <1267019540.8797.9.camel@EK> In-Reply-To: <1267019540.8797.9.camel@EK> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig12156CA3EB5FD28CCE38CDAF" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] Font antialiasing v2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Apr 2010 20:23:25 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig12156CA3EB5FD28CCE38CDAF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Evgeny Kolesnikov wrote: > Hello! > > Here is improved patch for fonts anti-aliasing. Includes: > > 1) Optimized blending blitters for 8-bit masks; > 2) Absolute compatibility with pf2 format. No PFF3 magic additions. > > Affected files: > font/font.c > include/grub/fbblit.h > include/grub/font.h = = =20 > include/grub/fontformat.h > include/grub/video.h > util/grub-mkfont.c > video/video.c > video/fb/fbblit.c > video/fb/fbutil.c > video/fb/video_fb.c > > =20 - for (j =3D font_info->ranges[i * 2]; j <=3D font_info->ranges[i * 2 + 1= ]; - j++) - add_char (font_info, face, j); + for (j =3D font_info->ranges[i * 2]; j <=3D font_info->ranges[i *= 2 + 1]; j++) + add_char (font_info, face, j); Can you fix the style of your patch to avoid hunks like these? (Hint: GNU indent) - glyph_bitmap.mode_info.blit_format =3D GRUB_VIDEO_BLIT_FORMAT_1BIT_PAC= KED; - glyph_bitmap.mode_info.bpp =3D 1; - - /* Really 1 bit per pixel. */ - glyph_bitmap.mode_info.bytes_per_pixel =3D 0; - These bits need to be filled even if blit_format is set +#define FONT_FORMAT_STORAGE_PACK_MASK 0x0F +#define FONT_FORMAT_STORAGE_PACKED 1 +#define FONT_FORMAT_STORAGE_DEPTH_MASK 0xF0 +#define FONT_FORMAT_STORAGE_1BIT 0 +#define FONT_FORMAT_STORAGE_8BIT_GRAY 32 Using entire byte for this is quite a waste. It's better to use 2 or 3 la= st bit as STORAGE_FORMAT Also I doubt usefulness of a font in which only some glyphs are anti-alia= sed. Perhaps we could move antialiasing flags to file header and shave of= f few bytes? Another point is that although storage_flags are present since some time = trying to use antialised fonts in older grub will result in garbage. I pr= efer to put PFF3 signature if any flag is used. It will also allow more f= reedom it fields specification, + fgcolor =3D grub_video_fb_map_rgba (src->mode_info->fg_red, + src->mode_info->fg_green, + src->mode_info->fg_blue, + src->mode_info->fg_alpha); background color isn't handled correctly (it's not always transparent) + grub_uint8_t fa, a; Please avoid mixing declarations and code + > -----------------------------------------------------------------------= - > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig12156CA3EB5FD28CCE38CDAF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iF4EAREKAAYFAku2UjYACgkQNak7dOguQglM7gD/UILYy4roe9b0kc/jzPHMFPEQ QXPkem4wDnBiQTid2HgA/0D0TyBIq38ntzaodvixTAW81+YV25nfgkWDbG6p0TQU =7tn0 -----END PGP SIGNATURE----- --------------enig12156CA3EB5FD28CCE38CDAF--