From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1O0IPR-0002DH-Dq for mharc-grub-devel@gnu.org; Fri, 09 Apr 2010 13:54:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0IPP-0002Cy-6z for grub-devel@gnu.org; Fri, 09 Apr 2010 13:54:23 -0400 Received: from [140.186.70.92] (port=48616 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0IPN-0002Cq-ON for grub-devel@gnu.org; Fri, 09 Apr 2010 13:54:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0IPL-0005sZ-Uv for grub-devel@gnu.org; Fri, 09 Apr 2010 13:54:21 -0400 Received: from mail-bw0-f223.google.com ([209.85.218.223]:54095) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0IPL-0005sN-K1 for grub-devel@gnu.org; Fri, 09 Apr 2010 13:54:19 -0400 Received: by bwz23 with SMTP id 23so15098bwz.26 for ; Fri, 09 Apr 2010 10:54:18 -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:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=ajXOpn1IKA9Vu24YXcm07X1UwULWZdNQdnGmDOCc5v4=; b=mgctz6tWTeSXsIiMseLKhU6jEwX/+swM8cndmr53EG/EpQHFBQmHYIt0jPInuWDNtK CPqjm09gaph/tN3b+YuNsC8qax2Dc7+YWP80NVazeUOXnNBqoMNgyDBJsvaQIkgUyE2H rzrgSGn9DkBm2esteio+pU5vMaiooQJEWBeqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=HCM162oqRO5d3YFuGX2ka9+eKHfWbDwGcEAkGEd2ym5M3j6BEQ4wgl1YfBAGz2rC+q 61SpDJTVQVKna8xnMAxDfbaS1Uep5Y3GbRv2dSgQiG0V05eb/NSfqpuVZrsQNwKqAiiV regRDNXVsL/FAfOHwdJIK8c4O/v1Qc3R2Dt5E= Received: by 10.204.73.149 with SMTP id q21mr459537bkj.57.1270835657109; Fri, 09 Apr 2010 10:54:17 -0700 (PDT) Received: from debian.bg45.phnet (125-149.203-62.cust.bluewin.ch [62.203.149.125]) by mx.google.com with ESMTPS id 14sm608117bwz.14.2010.04.09.10.54.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Apr 2010 10:54:16 -0700 (PDT) Message-ID: <4BBF69BF.1060105@gmail.com> Date: Fri, 09 Apr 2010 19:54:07 +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> <4BB65231.10205@gmail.com> <1270446606.2581.41.camel@EK> In-Reply-To: <1270446606.2581.41.camel@EK> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig9EC7CD004B7031CE9995C75E" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Colin D Bennett 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, 09 Apr 2010 17:54:23 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9EC7CD004B7031CE9995C75E Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Evgeny Kolesnikov wrote: > On Fri, 2010-04-02 at 22:23 +0200, Vladimir '=CF=86-coder/phcoder' Serb= inenko > wrote: > > =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) >> =20 > > Most of sources related to font functionality contains awful mix of > spaces and tabs. Should I fix this? Strictly use spaces everywhere?=20 > > =20 I've run indent on the file in the tree. If you do the same on your tree it should help. You can also try generating patches with -bB >> +#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= last bit as STORAGE_FORMAT >> =20 > > This byte is already wasted with packed/unpacked bit.=20 > 3 bits actually, others as reserved. And I used reserved ones. > See http://grub.gibibit.com/New_font_format (PFF2 spec, CHIX, item 2). > > =20 Well "current" doesn't mean "best possible". I want to know motivation behind this packed/unpacked bit. Mixing compression and font engine will make the code more complex and bug prone. It's better to put compression layer below the font and make font subsystem unaware of it. The only exception is if compression takes advantage of knowing font structures. >> Also I doubt usefulness of a font in which only some glyphs are anti-a= liased. Perhaps we could move antialiasing flags to file header and shave= off few bytes? >> =20 > > Yes this makes sense. I.e. substitution glyph for unknown symbol=20 > have no AA. Also frames and other geometry can benefit from this. > Anyway this byte is already wasted in original spec. > =20 We can change the spec and make pff3. Also notice I didn't oppose to glyph in memory having this info, only on disk > Moreover I thinking about transparent gz or xz reader for font > file. This will drastically reduce the size. > > =20 You can already gz it. > =20 >> + 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; >> =20 > > Actually it always 0x00000000. See grub_font_draw_glyph:=20 > there is only FG color in declaration. > > Moreover I don't think that bg color is useful because > we handle alpha channel correctly for fg and mask itself, > so anyone can blit glyph onto everything he want. > > Also filling rectangle with color below text and then > rendering only fg mask will be way more fast. > =20 Ok then --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig9EC7CD004B7031CE9995C75E 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 iF4EAREKAAYFAku/acUACgkQNak7dOguQgk2DgD/fGAZzlmOn5NexVM+Oh84C1uf DEvWMjUPVwtnuXsR2dAA/0GJd3vjJHs2Z9orEm+iMqteKOg6nzvLLmQ3Hemp9UKZ =EDKl -----END PGP SIGNATURE----- --------------enig9EC7CD004B7031CE9995C75E--