[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] multistring support in gui_label
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] multistring support in gui_label |
Date: |
Wed, 17 Apr 2013 09:01:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
On 16.04.2013 11:04, Vladimir Testov wrote:
>> Please don't use // comments.
> O.k. I won't.
>> This code completely forgets the cases
>> when even the first word doesn't fit in the available space.
>
> Mmm. It can handle this case actually.
>
>> The code as whole breaks some unicode concepts like e.g. bidi stack.
>
> Didn't get what you mean.
>
>> Could you reuse the already available line-vreaking algorithm in
>> normal/term.c and normal/charset.c ? Since the line-breaking is
>> artificially disabled for labels it should require only minor
>> adjustments to be reenabled.
>
> Yep! Here it is (patch included)!
>
> Nevertheless, two problems appeared and I don't sure how exactly should I fix
> them.
> 1) Handling of some long word. If this word is not first in line and it's
> length is more than label's width
> then the length of the first fragment of the word will be counted as if it
> will
> be drawn on the same line,
> but actually it will be printed on the next line.
Don't write any line-breaking at all yourself.
> 2) There is funny handling of UTF-8 symbols. Each symbol have "device_width"
> parameter,
> which is used in calculation of string's length.
Where is it used? Show exactly. It must be some leftover code.
> How should I fix these problems?
> 1st one - for example, I can slightly update line-breaking mechanism.
> 2nd one - more interesting, harder. I suggest utf-8 printing mechanism
> (charset.c unicode.c etc) should be remade. So symbol connections will be
> counted in more intelligent way (e.g. while counting spaces - take into
> consideration nearby symbols). It is interesting. :) I can do it. Would be
> happy, if someone could give me some advices.
We don't do any kerning. No need to change algorithm.
>
> Problem2.png
> text = "@KEYMAP_LONG@"
> t is misprinted
>
> Problem1.png
> text = "short short short
> HereWeHaveSomeVeryLongWordSoItCannotBePrintedEntirelyOnOneLine"
> See how the line-breaking works.
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH] multistring support in gui_label, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/04/03
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/16
- Re: [PATCH] multistring support in gui_label, Andrey Borzenkov, 2013/04/16
- Re: [PATCH] multistring support in gui_label,
Vladimir 'φ-coder/phcoder' Serbinenko <=
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/23
- [RFC][PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/23