[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GITGRUB] New menu interface (implementation)

From: Michal Suchanek
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Wed, 23 Sep 2009 13:29:34 +0200

2009/9/21 Bean <address@hidden>:
> On Mon, Sep 21, 2009 at 5:16 PM, Michal Suchanek <address@hidden> wrote:
>> 2009/9/20 Bean <address@hidden>:
>>> On Sun, Sep 20, 2009 at 4:30 PM, Michal Suchanek <address@hidden> 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

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 ÅÕṌṎ, and maximum fall of
characters like ᶘɀ and also include some space between the lines 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]