Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MqQ2X-0000u6-9Q for mharc-grub-devel@gnu.org; Wed, 23 Sep 2009 07:29:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqQ2U-0000rk-Ja for grub-devel@gnu.org; Wed, 23 Sep 2009 07:29:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqQ2T-0000qj-I5 for grub-devel@gnu.org; Wed, 23 Sep 2009 07:29:37 -0400 Received: from [199.232.76.173] (port=36133 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqQ2T-0000qZ-D0 for grub-devel@gnu.org; Wed, 23 Sep 2009 07:29:37 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]:21707) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqQ2S-0002T6-Vk for grub-devel@gnu.org; Wed, 23 Sep 2009 07:29:37 -0400 Received: by fg-out-1718.google.com with SMTP id 22so184774fge.12 for ; Wed, 23 Sep 2009 04:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=dTZXgFEvar8gNjDCGgV/c288mHNX7UnQkw7L4eRRN8E=; b=Lh20YJOso7GKdkA+wwtIeF1uWeKyA6e2uQQ+LotN6PIT83SXb/kfKCDTz7jMvSku5P FGx2x+soARkfeh+x8Tm8wi9dSmePgLEJ+qpxLBvpK6x10ti3i3Gfkb2ckxhpd8Sn6rwA lFI6/fgs7zELIM9o0Zgn47BgDBU7a4PlgpZhE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=L/suo7X+m4jPUvXqclHlFAp09kAKlvdsljL1AtOPlOKpSQS2gioCLELgaBgZCrf1s3 IFGmIcpPtuE9Es10CgGV+0hd1t/5hbp8mZtc6FSaIQZNFtCiqgAGzjAWGE1S87E2QyLZ 1JQXjMyqfThnV4AHZ7/aNLOprxNyRTty/GaxU= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.170.4 with SMTP id s4mr1942531fge.9.1253705374948; Wed, 23 Sep 2009 04:29:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Sep 2009 13:29:34 +0200 X-Google-Sender-Auth: 407699cc5c4f2f18 Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2009 11:29:38 -0000 2009/9/21 Bean : > On Mon, Sep 21, 2009 at 5:16 PM, Michal Suchanek wr= ote: >> 2009/9/20 Bean : >>> On Sun, Sep 20, 2009 at 4:30 PM, Michal Suchanek = wrote: >>>> >>>> So the text region is intended for drawing on text screen and the >>>> graphics region on graphics screen. I assume the check for pure text >>>> mode is there to choose which one is used. >>>> >>>> However, wouldn't this switch in coordinate system complicate further >>>> extending of the menu system with additional components? >>>> >>>> With these different coordinates every compound component would likely >>>> have to check which kind of rectangle is currently in use. >>>> >>>> Still it might work - borders have to be drawn differently, pictures >>>> currently don't work, and alignment should work with any units (and >>>> it's easier to see rounding errors if the units are large). >>>> >>>> There is slight issue with element placement, though, If somebody uses >>>> pixel coordinates for placing elements then the offsets will suddenly >>>> become huge in text mode. Shouldn't the layouts be more portable? >>> >>> Hi, >>> >>> I'm thinking about using the "c" unit as default, as it's usable in >>> both text and graphic mode, this would help to create portable config >>> file. If user really want to use pixel unit, he can add "p" suffix, >>> such as 100p. >> >> What does c mean in graphics mode? I can see that in text mode it's >> one character cell in either direction but there is no such thing in >> graphics mode be cause different fonts and even different letters of >> the same font have different character cells. >> >> What would be especially confusing when using such a unit is that most >> fonts (except perhaps CJK) have different character width and height >> so does this mean the average (maximum, ,,) width of a character, >> height of a character, or a different thing depending on the direction >> in which the unit is used (vertical, horizontal)? > > Hi, > > In graphic mode, 'c' unit is the width/height of the reference > character ( I use 'O' as reference character in menu_test.c) using > system default font, this ensure that 1c is always the same size in > the current system. IIRC traditionally X is used for height and m for width. Either way it is a unit that is not the same when measured vertically and horizontally, and it is not possible to draw a square using this unit. Also when you want to make a box that accomodates n lines of text you need a unit for line-height. That is, you need to take into account the maximum rise of characters like =C3=85=C3=95=E1=B9=8C=E1=B9=8E, and max= imum fall of characters like =E1=B6=98=C9=80 and also include some space between the lin= es so that they do not merge visually. I guess it would be quite common to either display a box that can accommodate a piece of text or a box that fits the most lines of text possible in a given space so it would be useful to have units for that. Thanks Michal