Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE5A110C1A for ; Wed, 25 Sep 2013 16:44:14 +0000 (UTC) Received: (qmail 84745 invoked by uid 500); 25 Sep 2013 16:44:11 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 84461 invoked by uid 500); 25 Sep 2013 16:44:06 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 84397 invoked by uid 99); 25 Sep 2013 16:44:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 16:44:05 +0000 Date: Wed, 25 Sep 2013 16:44:05 +0000 (UTC) From: "Mihai Chira (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FLEX-33779) RTE in Label.as when it's 8px wide and uses the Myriad Web Pro font face MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLEX-33779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mihai Chira updated FLEX-33779: ------------------------------- Description: Build and run the attached project. Hit Apply. You will get this error: RangeError: Error #1125: The index 2 is out of range 0. at spark.components::Label/getNextTruncationPosition()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:1587] at spark.components::Label/truncateText()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:1386] at spark.components::Label/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:496] at spark.components.supportClasses::TextBase/updateDisplayList()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\supportClasses\TextBase.as:705] at mx.core::UIComponent/validateDisplayList()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\core\UIComponent.as:9261] at mx.managers::LayoutManager/validateDisplayList()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:744] at mx.managers::LayoutManager/doPhasedInstantiation()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:827] at mx.managers::LayoutManager/doPhasedInstantiationCallback()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1188] The same thing happens eventually if you hit "Auto increment". This was created so that I could find the width at which other fonts would throw the same error.* * I didn't find any other. Myriad Web Pro seems to be unique somehow. Notes: 1. I couldn't find another value for the label's text property that could throw this error. "User Status" and some of its anagrams seem to be special (though not all! "Status User" won't throw the RTE). 2. I couldn't find another font with Kerning information (as Myriad Web Pro is) that could throw the error, despite incrementing the label's size once every three frames by .001 to make sure it wasn't about the size of the increment. I've included AppleGaramond.ttf as an example. 3. To expand on the above, if you go into the Type light font editing application, open MyriadWebPro.ttf, go to Font->Font Options..., deselect Kerning and save it (that's what I did for "MyriadWebProNoKerning.ttf" in the assets/fonts folder), you cannot get the same RTE even if you try to Auto increment. Kerning seems to be key. However, AppleGaramong.ttf, which already has kerning information, does not throw the RTE. 4. If maxDisplayedLines is not 2, there's no RTE for any increment. 5. If you set two breakpoints in TextBase.measure() and TextBase.updateDisplayList() (both of which call composeTextLines), you will see that composeTextLines() is first called from measure() (via LayoutManager.validateSize) and works just fine. It's the second call, the one through TextBase.updateDisplayList(), that ends up throwing the RTE. 6. If I use AppleGaramond and hit Apply for a width of 5px, on the second call to Label.composeTextLines() no textLines are created on this call var allLinesComposed:Boolean = createTextLines(elementFormat); From there on things proceed smoothly. I therefore conclude that textLines being created in this call for MyriadWebPro is buggy behaviour. 7. Continuing from the above, the problem seems to be in TextBlock.recreateTextLine, which in the happy path (see point 6 above) returns null, while in the buggy path it returns a valid TextLine object (see Label.createTextLinesFromTextBlock). was: Build and run the attached project. Hit Apply. You will get this error: RangeError: Error #1125: The index 2 is out of range 0. at spark.components::Label/getNextTruncationPosition()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:1587] at spark.components::Label/truncateText()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:1386] at spark.components::Label/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:496] at spark.components.supportClasses::TextBase/updateDisplayList()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\supportClasses\TextBase.as:705] at mx.core::UIComponent/validateDisplayList()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\core\UIComponent.as:9261] at mx.managers::LayoutManager/validateDisplayList()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:744] at mx.managers::LayoutManager/doPhasedInstantiation()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:827] at mx.managers::LayoutManager/doPhasedInstantiationCallback()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1188] The same thing happens eventually if you hit "Auto increment". This was created so that I could find the width at which other fonts would throw the same error.* * I didn't find any other. Myriad Web Pro seems to be unique somehow. Notes: 1. I couldn't find another value for the label's text property that could throw this error. "User Status" seems to be special for some strange reason. 2. I couldn't find another font with Kerning information (as Myriad Web Pro is) that could throw the error, despite incrementing the label's size once every three frames by .001 to make sure it wasn't about the lower increment. I've included AppleGaramond.ttf as an example. 3. To expand on the above, if you go into the Type light font editing application, open MyriadWebPro.ttf, go to Font->Font Options..., deselect Kerning and save it (that's what I did for "MyriadWebProNoKerning.ttf" in the assets/fonts folder), you cannot get the same RTE even if you try to Auto increment. Kerning seems to be key. However, AppleGaramong.ttf (which already has kerning information) does not throw the RTE. 4. If maxDisplayedLines is not 2, there's no RTE for any increment. 5. If you set two breakpoints in TextBase.measure() and TextBase.updateDisplayList() (both of which call composeTextLines), you will see that composeTextLines() is first called from measure() (via LayoutManager.validateSize) and works just fine. It's the second call, the one through TextBase.updateDisplayList(), that ends up throwing the RTE. 6. If I use AppleGaramond and hit Apply for a width of 5px, on the second call to Label.composeTextLines() no textLines are created on this call var allLinesComposed:Boolean = createTextLines(elementFormat); From there on things proceed smoothly. I therefore conclude that textLines being created in this call for MyriadWebPro is buggy behaviour. 7. Continuing from the above, the problem seems to be in TextBlock.recreateTextLine, which in the happy path (see point 6 above) returns null, while in the buggy path it returns a valid TextLine object. > RTE in Label.as when it's 8px wide and uses the Myriad Web Pro font face > ------------------------------------------------------------------------ > > Key: FLEX-33779 > URL: https://issues.apache.org/jira/browse/FLEX-33779 > Project: Apache Flex > Issue Type: Bug > Components: Embedded Fonts, Spark: Label > Affects Versions: Apache Flex 4.10.0 > Environment: Windows 8 > SDK 4.10 > Reporter: Mihai Chira > Priority: Minor > Labels: mandelbug > > Build and run the attached project. Hit Apply. You will get this error: > RangeError: Error #1125: The index 2 is out of range 0. > at spark.components::Label/getNextTruncationPosition()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:1587] > at spark.components::Label/truncateText()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:1386] > at spark.components::Label/http://www.adobe.com/2006/flex/mx/internal::composeTextLines()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\Label.as:496] > at spark.components.supportClasses::TextBase/updateDisplayList()[C:\Users\Developer1\workspace\_LabelTruncationError\src\spark\components\supportClasses\TextBase.as:705] > at mx.core::UIComponent/validateDisplayList()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\core\UIComponent.as:9261] > at mx.managers::LayoutManager/validateDisplayList()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:744] > at mx.managers::LayoutManager/doPhasedInstantiation()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:827] > at mx.managers::LayoutManager/doPhasedInstantiationCallback()[F:\hudson\hudson-slave\workspace\flex-sdk_release\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1188] > The same thing happens eventually if you hit "Auto increment". This was created so that I could find the width at which other fonts would throw the same error.* > * I didn't find any other. Myriad Web Pro seems to be unique somehow. > Notes: > 1. I couldn't find another value for the label's text property that could throw this error. "User Status" and some of its anagrams seem to be special (though not all! "Status User" won't throw the RTE). > 2. I couldn't find another font with Kerning information (as Myriad Web Pro is) that could throw the error, despite incrementing the label's size once every three frames by .001 to make sure it wasn't about the size of the increment. I've included AppleGaramond.ttf as an example. > 3. To expand on the above, if you go into the Type light font editing application, open MyriadWebPro.ttf, go to Font->Font Options..., deselect Kerning and save it (that's what I did for "MyriadWebProNoKerning.ttf" in the assets/fonts folder), you cannot get the same RTE even if you try to Auto increment. Kerning seems to be key. However, AppleGaramong.ttf, which already has kerning information, does not throw the RTE. > 4. If maxDisplayedLines is not 2, there's no RTE for any increment. > 5. If you set two breakpoints in TextBase.measure() and TextBase.updateDisplayList() (both of which call composeTextLines), you will see that composeTextLines() is first called from measure() (via LayoutManager.validateSize) and works just fine. It's the second call, the one through TextBase.updateDisplayList(), that ends up throwing the RTE. > 6. If I use AppleGaramond and hit Apply for a width of 5px, on the second call to Label.composeTextLines() no textLines are created on this call var allLinesComposed:Boolean = createTextLines(elementFormat); From there on things proceed smoothly. I therefore conclude that textLines being created in this call for MyriadWebPro is buggy behaviour. > 7. Continuing from the above, the problem seems to be in TextBlock.recreateTextLine, which in the happy path (see point 6 above) returns null, while in the buggy path it returns a valid TextLine object (see Label.createTextLinesFromTextBlock). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira