You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Alex Harui (JIRA)" <ji...@apache.org> on 2013/11/14 07:51:21 UTC

[jira] [Comment Edited] (FLEX-33876) Font Styles not taking effect on mx:PieCharts, mx:ColumnCharts, mx:Legends, s:Form and s:Alert

    [ https://issues.apache.org/jira/browse/FLEX-33876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13822221#comment-13822221 ] 

Alex Harui edited comment on FLEX-33876 at 11/14/13 6:50 AM:
-------------------------------------------------------------

There were some issues with ApplicationStyles.css

1) You switched to Spark Alert, so mx|Alert isn't useful
2) Spark Alert is in the experimental namespace, not the spark namespace.  To style a Spark Alert in CSS you use the following:
{code}
@namespace sparkComponents "spark.components.*"; 
sparkComponents|Alert
{
	fontFamily: defaultFont;
}
{code}

3) The bold font was not embedded correctly.  The normal and bold (and italic) embeds must use the same fontFamily, but the bold version has fontWeight: bold

{code}
@font-face
{
	src: url("SofiaProLight.otf");
	fontFamily: defaultFont;
	embedAsCFF : true;
}


@font-face
{
	src: url("SofiaProBold.otf");
	fontFamily: defaultFont;
    fontWeight: bold;
	embedAsCFF : true;
}
{code}

4) The bold .otf file seems to only have CFF data and cannot be used for MX components that use TextField.

5) The charts are currently configured to use mx.chart.chartClasses.DataTip for the "callouts".

{code}
mx|DataTip
{
    fontFamily: defaultMXFont;
}
{code}

With those changes, the app appears to be using the embedded fonts everywhere, although the bold won't work right in the datatips.



was (Author: aharui):
There were some issues with ApplicationStyles.css

1) You switched to Spark Alert, so mx|Alert isn't useful
2) Spark Alert is in the experimental namespace, not the spark namespace.  To style a Spark Alert in CSS you use the following:
@namespace sparkComponents "spark.components.*"; 
sparkComponents|Alert
{
	fontFamily: defaultFont;
}

3) The bold font was not embedded correctly.  The normal and bold (and italic) embeds must use the same fontFamily, but the bold version has fontWeight: bold

@font-face
{
	src: url("SofiaProLight.otf");
	fontFamily: defaultFont;
	embedAsCFF : true;
}


@font-face
{
	src: url("SofiaProBold.otf");
	fontFamily: defaultFont;
    fontWeight: bold;
	embedAsCFF : true;
}

4) The bold .otf file seems to only have CFF data and cannot be used for MX components that use TextField.

5) The charts are currently configured to use mx.chart.chartClasses.DataTip for the "callouts".

mx|DataTip
{
    fontFamily: defaultMXFont;
}


With those changes, the app appears to be using the embedded fonts everywhere, although the bold won't work right in the datatips.


> Font Styles not taking effect on mx:PieCharts, mx:ColumnCharts, mx:Legends, s:Form and s:Alert
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33876
>                 URL: https://issues.apache.org/jira/browse/FLEX-33876
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.9.0, Apache Flex 4.10.0, Apache Flex 4.11.0
>         Environment: Windows 7 Professional SP1 64Bit running on MacBook Pro (mid 2010) OSX 10.9 Bootcamp.
> Apache Flex SDK 4.11 running on FlashBuilder 4.7 Standard.
>            Reporter: Dylan Randall
>            Priority: Critical
>         Attachments: ApplicationStyles.css, FontStyleTest.fxp, Mostardesign - Sofia Pro Bold.otf, SofiaProLight.otf
>
>
> When I try to apply a css style that lives in the main application onto a sub application loaded into the main application via a SWFLoader some styles are not set. Instances like s:Label have the style applied however mx:PieChart, mx:ColumnChart and mx:Legend the style is not applied. I am only trying to apply a font to the text of these components. Things like the callouts and the text on the legends do not get the style applied to them. The same goes for s:Form the font style isn't applied to the component. The same font style is also not being applied to the title string of the s:Alert component but the body or message string the font is being applied correctly.



--
This message was sent by Atlassian JIRA
(v6.1#6144)