From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1USMNX-0008Vc-P4 for mharc-grub-devel@gnu.org; Wed, 17 Apr 2013 03:02:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USMNP-0008V3-KX for grub-devel@gnu.org; Wed, 17 Apr 2013 03:02:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USMNK-0008D2-Mu for grub-devel@gnu.org; Wed, 17 Apr 2013 03:01:55 -0400 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:61523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USMNK-0008Ct-FU for grub-devel@gnu.org; Wed, 17 Apr 2013 03:01:50 -0400 Received: by mail-ea0-f170.google.com with SMTP id a15so550139eae.1 for ; Wed, 17 Apr 2013 00:01:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=KYUha1PzqUgBeRh4gUFCFUrAZ1ptwAKFY4m73wpCDd8=; b=n2RO6a4NCJCwZrIfmbEP9+V+XvO1939tsKcxhv3MFZe/3Ynmvi4HKSfbyOo8HWydJ+ ClIptjYCal38mg6jt2qxW1q0s9n4QmeigV2x4lm93odC89eMCQagaqpFPG3IyUrynG9t DDd5TKtASHX+Mc3BKb7r/ukh/L7cX7XnJGCDUbjzSdOL3fsY7vjwZPUlUpCcDD8y8D2D 7/UExg0p6jaJ1uzzs7eMpq/Q8ZesUjZk7wpEWDhAKPhTB3rnJ8+ZUaD4CtLAMjBZ1Auc /QEXZiZoupxcketOUaM5wqAi2gDpTrmTymniDTIkokHqGV7QEJwZJBpuQrLCdO5Nv1sq TfcQ== X-Received: by 10.15.32.142 with SMTP id a14mr15163388eev.22.1366182109576; Wed, 17 Apr 2013 00:01:49 -0700 (PDT) Received: from debian.x201.phnet (public-docking-cx-5-167.ethz.ch. [195.176.112.167]) by mx.google.com with ESMTPS id x42sm6887608eee.0.2013.04.17.00.01.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Apr 2013 00:01:49 -0700 (PDT) Message-ID: <516E48DB.8070506@gmail.com> Date: Wed, 17 Apr 2013 09:01:47 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [PATCH] multistring support in gui_label References: <1720724.fd4NVO69U8@icedphoenix> In-Reply-To: <1720724.fd4NVO69U8@icedphoenix> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigF96C0BABC5A3E67BDD19B8F7" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22a X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 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: Wed, 17 Apr 2013 07:02:01 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF96C0BABC5A3E67BDD19B8F7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Mmm. It can handle this case actually. >=20 >> The code as whole breaks some unicode concepts like e.g. bidi stack. >=20 > Didn't get what you mean. >=20 >> 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. >=20 > Yep! Here it is (patch included)! >=20 > Nevertheless, two problems appeared and I don't sure how exactly should= I fix=20 > them. > 1) Handling of some long word. If this word is not first in line and it= 's=20 > length is more than label's width > then the length of the first fragment of the word will be counted as if= it will=20 > 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_w= idth"=20 > 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=20 > counted in more intelligent way (e.g. while counting spaces - take into= =20 > consideration nearby symbols). It is interesting. :) I can do it. Would= be=20 > happy, if someone could give me some advices. We don't do any kerning. No need to change algorithm. >=20 > Problem2.png=20 > text =3D "@KEYMAP_LONG@" > t is misprinted >=20 > Problem1.png > text =3D "short short short=20 > HereWeHaveSomeVeryLongWordSoItCannotBePrintedEntirelyOnOneLine" > See how the line-breaking works. >=20 >=20 >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --------------enigF96C0BABC5A3E67BDD19B8F7 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.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlFuSNsACgkQNak7dOguQgkI+wD/WghiNWWkgzvqp88ITbr7LIpx phO4kr8a+V2gpxCHrAwBAIylcFkeCUkj97Jbh4k4T3YipTwQDKl0eNlHjCU6w6ux =x/jB -----END PGP SIGNATURE----- --------------enigF96C0BABC5A3E67BDD19B8F7--