On Mon, Sep 21, 2009 at 5:16 PM, Michal Suchanek <hramr...@centrum.cz> wrote: > 2009/9/20 Bean <bean12...@gmail.com>: >> On Sun, Sep 20, 2009 at 4:30 PM, Michal Suchanek <hramr...@centrum.cz> 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. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/ _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel