I didn't run it, but it looks like you are using a bold font without setting
fontWeight.


On 4/10/13 2:45 AM, "Sebastian Mohr" <flex.masul...@gmail.com> wrote:

> Hi there,
> 
> Just a quick question in regards to the TextInput component. Do
> you know how to change the font of the prompt in the TextInput
> component? The code example below [1] does not show the prompt
> with the correct font. I also tried to create a custom TextInputSkin
> with a customised promptDisplay [2], but, this didn't work either.
> 
> This strange behaviour seems to be solid throughout the latest
> Adobe Flex SDK 4.6 and and the latest Apache Flex SDK 4.9.1,
> even though this bug seems to be known and fixed:
> 
> https://issues.apache.org/jira/browse/FLEX-27991
> 
> Any ideas from your side how to fix that?
> 
> 
> - 
> Sebastian (PPMC)
> Interaction Designer
> 
> Looking for a Login Example with Apache Flex? Please check out this code:
> http://code.google.com/p/masuland/wiki/LoginExample
> 
> 
> 
> [1] Example Application
> 
> <?xml version="1.0" encoding="utf-8"?>
> <s:WindowedApplication
> xmlns:fx="http://ns.adobe.com/mxml/2009";
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx"
>> 
> 
> <fx:Style>
> @namespace s "library://ns.adobe.com/flex/spark";
> @namespace mx "library://ns.adobe.com/flex/mx";
> 
> @font-face {
> src:url("/assets/fonts/MyriadWebPro-Bold.ttf");
> fontFamily: myFontMyriadBold;
> embedAsCFF: true;
> }
> 
> global
> {
> fontSize: 16;
> }
> </fx:Style>
> 
> <s:layout>
> <s:VerticalLayout />
> </s:layout>
> 
> <s:Label
> width="100%"
> text="Text Prompt 12345"
> />
> 
> <s:TextInput
> width="100%"
> prompt="TextInput Prompt 12345"
> />
> 
> <s:Label
> width="100%"
> text="Text Prompt 12345"
> fontFamily="Times New Roman"
> />
> 
> <s:TextInput
> width="100%"
> prompt="TextInput Prompt 12345"
> fontFamily="Times New Roman"
> />
> 
> <s:Label
> width="100%"
> text="Text Prompt 12345"
> fontFamily="myFontMyriadBold"
> />
> 
> <s:TextInput
> width="100%"
> prompt="TextInput Prompt 12345"
> fontFamily="myFontMyriadBold"
> />
> 
> </s:WindowedApplication>
> 
> 
> 
> 
> [2] Example TextInputSkin:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <s:SparkSkin
> xmlns:fx="http://ns.adobe.com/mxml/2009";
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:fb="http://ns.adobe.com/flashbuilder/2009";
> blendMode="normal"
> alpha.disabledStates="0.5"
>> 
> 
> <fx:Metadata>
> <![CDATA[ 
> /** 
> * @copy spark.skins.spark.ApplicationSkin#hostComponent
> */
> [HostComponent("spark.components.TextInput")]
> ]]>
> </fx:Metadata> 
> 
> <!--- Defines the Label that is used for prompt text. The includeInLayout
> property is false so the prompt text does not affect measurement. -->
> <s:RichText
> id="promptDisplay" includeIn="normalWithPrompt,disabledWithPrompt"
> color="#5e6a70"
> fontFamily="myFontMyriadBold" fontSize="16" includeInLayout="false"
> maxDisplayedLines="1" mouseChildren="false" mouseEnabled="false"
> verticalAlign="middle"
> />
> 
> </s:SparkSkin>
> 
> 
> 

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui

Reply via email to