You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Alex Harui <ah...@adobe.com> on 2015/09/10 05:46:19 UTC

Re: git commit: [flex-sdk] [refs/heads/develop] - Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts not working on charts)

Well, ok, but I was expecting that the fix would support Spark Label
properly throughout the Chart code.

-Alex

On 9/9/15, 6:03 PM, "bigosmallm@apache.org" <bi...@apache.org> wrote:

>Repository: flex-sdk
>Updated Branches:
>  refs/heads/develop 0b3a613ff -> 636859085
>
>
>Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts
>not working on charts)
>
>
>Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
>Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/63685908
>Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/63685908
>Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/63685908
>
>Branch: refs/heads/develop
>Commit: 636859085bbd6794ce6b3950727e20c5aa2a665d
>Parents: 0b3a613
>Author: OmPrakash Muppirala <bi...@gmail.com>
>Authored: Wed Sep 9 18:00:24 2015 -0700
>Committer: OmPrakash Muppirala <bi...@gmail.com>
>Committed: Wed Sep 9 18:01:46 2015 -0700
>
>----------------------------------------------------------------------
> frameworks/projects/charts/charts.css                    |  2 +-
> .../projects/charts/src/mx/charts/series/BarSeries.as    | 11 ++---------
> .../projects/charts/src/mx/charts/series/ColumnSeries.as | 11 ++---------
> 3 files changed, 5 insertions(+), 19 deletions(-)
>----------------------------------------------------------------------
>
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/63685908/frameworks/p
>rojects/charts/charts.css
>----------------------------------------------------------------------
>diff --git a/frameworks/projects/charts/charts.css
>b/frameworks/projects/charts/charts.css
>index 02b374f..94cb064 100644
>--- a/frameworks/projects/charts/charts.css
>+++ b/frameworks/projects/charts/charts.css
>@@ -211,7 +211,7 @@ PieChart
> 
> AxisRenderer
> {
>-	labelClass: ClassReference("spark.components.Label");
>+	labelClass: ClassReference("mx.controls.Label");
> 	canDropLabels : ClassReference(null);
> 	canStagger : true;
> 	labelGap : 3;
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/63685908/frameworks/p
>rojects/charts/src/mx/charts/series/BarSeries.as
>----------------------------------------------------------------------
>diff --git a/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
>b/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
>index 864e37e..7fb224a 100644
>--- a/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
>+++ b/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
>@@ -280,15 +280,8 @@ public class BarSeries extends Series implements
>IStackable2, IBar
>         var labelClass:Class = getStyle("labelClass");
>         if(labelClass == null)
>         {
>-            try{
>-                labelClass = Class(ApplicationDomain.currentDomain.
>-                    getDefinition("spark.components::Label"));
>-            }
>-            catch(e:Error)
>-            {
>-                labelClass = Class(ApplicationDomain.currentDomain.
>-                    getDefinition("mx.controls::Label"));
>-            }
>+			labelClass = Class(ApplicationDomain.currentDomain.
>+				getDefinition("mx.controls::Label"));
>         }
>         return labelClass;
>     }
>
>http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/63685908/frameworks/p
>rojects/charts/src/mx/charts/series/ColumnSeries.as
>----------------------------------------------------------------------
>diff --git 
>a/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
>b/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
>index bf81896..05e5eee 100644
>--- a/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
>+++ b/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
>@@ -280,15 +280,8 @@ public class ColumnSeries extends Series implements
>IColumn,IStackable2
>         
>         if(labelClass == null)
>         {
>-            try{
>-                labelClass = Class(ApplicationDomain.currentDomain.
>-                    getDefinition("spark.components::Label"));
>-            }
>-            catch(e:Error)
>-            {
>-                labelClass = Class(ApplicationDomain.currentDomain.
>-                    getDefinition("mx.controls::Label"));
>-            }
>+			labelClass = Class(ApplicationDomain.currentDomain.
>+				getDefinition("mx.controls::Label"));
>         }
>         return labelClass;
>     }
>


Re: git commit: [flex-sdk] [refs/heads/develop] - Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts not working on charts)

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/15, 10:24 PM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:

>On Wed, Sep 9, 2015 at 10:03 PM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 9/9/15, 9:06 PM, "OmPrakash Muppirala" <om...@gmail.com> wrote:
>>
>> >Haha, okay.  I had limited time to spend on this (work deadlines)  And
>>I
>> >don't know the inner workings of the Charts very well.  If you can
>>guide
>> >me
>> >through it, I can take a shot at fixing it properly.
>>
>> Well, the comments indicate that it looked like there were places where
>>it
>> was using a TextField to measure but a Spark Label to render.
>
>
>The comments in the code or in the JIRA ticket?

In the JIRA ticket.

>
>
>> It should
>> use a Spark Label to measure if Spark Label is used to render, and MX
>> Labels to measure if MX Labels are used to render.
>>
>>
>If measurement is the only thing that was off, why would the spark labels
>not show up at all?  Is it setting width/height to undefined or something?

Well, it could be more complex than just the measurement, but there is
some logic to reduce the number of labels on an axis so they don’t
overlap.  If you measure 0 width (which is what happens in some cases)
things could go wonky, so I’d fix the measurement first and then see if
there are still issues.  The workaround, which was to use
TextField/mx.controls.Label) for both measurement and display seems to
work fine so I’m assuming that matching up correct measurements to the
right Label will solve the problem, although another comment in the JIRA
says that it isn’t easy to override which labelClass you are using because
some classes cache the labelClass too early.

Thanks for digging into it.
-Alex



Re: git commit: [flex-sdk] [refs/heads/develop] - Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts not working on charts)

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Wed, Sep 9, 2015 at 10:03 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 9/9/15, 9:06 PM, "OmPrakash Muppirala" <om...@gmail.com> wrote:
>
> >Haha, okay.  I had limited time to spend on this (work deadlines)  And I
> >don't know the inner workings of the Charts very well.  If you can guide
> >me
> >through it, I can take a shot at fixing it properly.
>
> Well, the comments indicate that it looked like there were places where it
> was using a TextField to measure but a Spark Label to render.


The comments in the code or in the JIRA ticket?


> It should
> use a Spark Label to measure if Spark Label is used to render, and MX
> Labels to measure if MX Labels are used to render.
>
>
If measurement is the only thing that was off, why would the spark labels
not show up at all?  Is it setting width/height to undefined or something?


> >
> >A broader question - Charts don't have Spark equivalents.  Is it important
> >to make Spark Labels work with Charts?
>
> IIRC, the decision was that Charts aren’t stylized enough to be considered
> Halo/MX or Spark, but folks don’t want to have to embed a font twice so if
> they are using Spark Labels and CFF fonts elsewhere, then Charts must as
> well and that avoids having a whole other set of Chart components.
>

Okay, makes sense.

Thanks,
Om

Re: git commit: [flex-sdk] [refs/heads/develop] - Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts not working on charts)

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/15, 9:06 PM, "OmPrakash Muppirala" <om...@gmail.com> wrote:

>Haha, okay.  I had limited time to spend on this (work deadlines)  And I
>don't know the inner workings of the Charts very well.  If you can guide
>me
>through it, I can take a shot at fixing it properly.

Well, the comments indicate that it looked like there were places where it
was using a TextField to measure but a Spark Label to render.  It should
use a Spark Label to measure if Spark Label is used to render, and MX
Labels to measure if MX Labels are used to render.

>
>A broader question - Charts don't have Spark equivalents.  Is it important
>to make Spark Labels work with Charts?

IIRC, the decision was that Charts aren’t stylized enough to be considered
Halo/MX or Spark, but folks don’t want to have to embed a font twice so if
they are using Spark Labels and CFF fonts elsewhere, then Charts must as
well and that avoids having a whole other set of Chart components.

Good luck,
-Alex


Re: git commit: [flex-sdk] [refs/heads/develop] - Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts not working on charts)

Posted by OmPrakash Muppirala <om...@gmail.com>.
Haha, okay.  I had limited time to spend on this (work deadlines)  And I
don't know the inner workings of the Charts very well.  If you can guide me
through it, I can take a shot at fixing it properly.

FWIW, the other Series - AreaSeries, BubbleSeries, CandlestickSeries,
HLOCSeries, LineSeries, PieSeries and PlotSeries don't have this problem.
And the embedded fonts seems to be working fine with them.

A broader question - Charts don't have Spark equivalents.  Is it important
to make Spark Labels work with Charts?

Thanks,
Om

On Wed, Sep 9, 2015 at 8:46 PM, Alex Harui <ah...@adobe.com> wrote:

> Well, ok, but I was expecting that the fix would support Spark Label
> properly throughout the Chart code.
>
> -Alex
>
> On 9/9/15, 6:03 PM, "bigosmallm@apache.org" <bi...@apache.org> wrote:
>
> >Repository: flex-sdk
> >Updated Branches:
> >  refs/heads/develop 0b3a613ff -> 636859085
> >
> >
> >Fix for https://issues.apache.org/jira/browse/FLEX-34909 (Embedded fonts
> >not working on charts)
> >
> >
> >Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> >Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/63685908
> >Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/63685908
> >Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/63685908
> >
> >Branch: refs/heads/develop
> >Commit: 636859085bbd6794ce6b3950727e20c5aa2a665d
> >Parents: 0b3a613
> >Author: OmPrakash Muppirala <bi...@gmail.com>
> >Authored: Wed Sep 9 18:00:24 2015 -0700
> >Committer: OmPrakash Muppirala <bi...@gmail.com>
> >Committed: Wed Sep 9 18:01:46 2015 -0700
> >
> >----------------------------------------------------------------------
> > frameworks/projects/charts/charts.css                    |  2 +-
> > .../projects/charts/src/mx/charts/series/BarSeries.as    | 11 ++---------
> > .../projects/charts/src/mx/charts/series/ColumnSeries.as | 11 ++---------
> > 3 files changed, 5 insertions(+), 19 deletions(-)
> >----------------------------------------------------------------------
> >
> >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/63685908/frameworks/p
> >rojects/charts/charts.css
> >----------------------------------------------------------------------
> >diff --git a/frameworks/projects/charts/charts.css
> >b/frameworks/projects/charts/charts.css
> >index 02b374f..94cb064 100644
> >--- a/frameworks/projects/charts/charts.css
> >+++ b/frameworks/projects/charts/charts.css
> >@@ -211,7 +211,7 @@ PieChart
> >
> > AxisRenderer
> > {
> >-      labelClass: ClassReference("spark.components.Label");
> >+      labelClass: ClassReference("mx.controls.Label");
> >       canDropLabels : ClassReference(null);
> >       canStagger : true;
> >       labelGap : 3;
> >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/63685908/frameworks/p
> >rojects/charts/src/mx/charts/series/BarSeries.as
> >----------------------------------------------------------------------
> >diff --git a/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
> >b/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
> >index 864e37e..7fb224a 100644
> >--- a/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
> >+++ b/frameworks/projects/charts/src/mx/charts/series/BarSeries.as
> >@@ -280,15 +280,8 @@ public class BarSeries extends Series implements
> >IStackable2, IBar
> >         var labelClass:Class = getStyle("labelClass");
> >         if(labelClass == null)
> >         {
> >-            try{
> >-                labelClass = Class(ApplicationDomain.currentDomain.
> >-                    getDefinition("spark.components::Label"));
> >-            }
> >-            catch(e:Error)
> >-            {
> >-                labelClass = Class(ApplicationDomain.currentDomain.
> >-                    getDefinition("mx.controls::Label"));
> >-            }
> >+                      labelClass = Class(ApplicationDomain.currentDomain.
> >+                              getDefinition("mx.controls::Label"));
> >         }
> >         return labelClass;
> >     }
> >
> >
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/63685908/frameworks/p
> >rojects/charts/src/mx/charts/series/ColumnSeries.as
> >----------------------------------------------------------------------
> >diff --git
> >a/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
> >b/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
> >index bf81896..05e5eee 100644
> >--- a/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
> >+++ b/frameworks/projects/charts/src/mx/charts/series/ColumnSeries.as
> >@@ -280,15 +280,8 @@ public class ColumnSeries extends Series implements
> >IColumn,IStackable2
> >
> >         if(labelClass == null)
> >         {
> >-            try{
> >-                labelClass = Class(ApplicationDomain.currentDomain.
> >-                    getDefinition("spark.components::Label"));
> >-            }
> >-            catch(e:Error)
> >-            {
> >-                labelClass = Class(ApplicationDomain.currentDomain.
> >-                    getDefinition("mx.controls::Label"));
> >-            }
> >+                      labelClass = Class(ApplicationDomain.currentDomain.
> >+                              getDefinition("mx.controls::Label"));
> >         }
> >         return labelClass;
> >     }
> >
>
>