Actionscript 3 :: Programmatically Set "Faux" Bold And Italic Font Styles In Flex?

Feb 4, 2012

I have a client that I build a business card "builder" application for in Flex. All the text elements that users add to the stage are Flex spark TextArea. I have a list of fonts that we allow the user to set on the text areas and some of the fonts included do have Bold and Italic versions of the font. The others that do not I simply disable these options in the control panel so the user doesn't have the option to click bold or italic buttons.

Photoshop does something similar if you load a font that doesn't have Bold or Italic options they disable the dropdown that would allow you to select these options in the text pallet http://grab.by/bOTC

When bold and italic aren't an included font face then Photoshop as a couple of buttons for applying Faux Bold and Italic to the font. Basically they programmatically thicken up the font face or slat it to make it look italic.

I've tried just setting fontWeight and fontStyle on the fonts that don't have bold or italic included in the embedded fonts and the result usually is a "web safe" font shows instead of the selected font or nothing at all happens.

I am wondering if there is a programmatic way that anyone has found that will do this in Flash / Flex. Basically thicken the font face or tilt it slightly to look italic. My guess is this would be pretty difficult and not worth the time and effort to the client but would be a neat thing to figure out and have a solution for.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Embed Both - Bold And Italic Styles Of A Particular Font?

Nov 15, 2010

How to embed font so it would have both styles - bold and italic.

When creating new font from drop down menu there are only either bold or italic or other style, but how to embed font with all styles?

View 0 Replies

ActionScript 3.0 :: Bold And Italic Are Not Working For Normal Embed Font In Flex

Feb 2, 2012

I am using swf embed font[normal] in my flex application but if i apply bold or italic for the text,its looking normal only. let me know if you have any solution.

View 1 Replies

ActionScript 3.0 :: Bold Italic Font Face Doesn't Show Up?

Oct 13, 2009

I am putting the finishing touches on an as3 project (developped in flex for code and flash cs4 to create the UI) and I am running into a mysterious font issue.
 
1) I am loading in a swf file with the font outlines (empty dynamic textfields with embedded characters on the stage.  One text field for each regular / bold / italic / bold italic font styles).
 
2) I then load the swf and then in order to make sure that all font faces are properly available I list them in the output window with the following function:

[Code]....

View 3 Replies

ActionScript 2.0 :: Bold, Italic And Bold/italic Won't Embed?

Jul 18, 2009

I've imported four fonts into the Library and used Linkage to enable Export for Actionscript. The fonts are the four versions of Trebuchet MS:

Trebuchet MS
Trebuchet MS Bold
Trebuchet MS Bold Italic
Trebuchet MS Italic

They are named like this in the Library and for example the 'Bold Italic' version has both 'bold' and 'italic' selected in its properties.

Then I drew a dynamic textfield and selected for it's font 'Trebuchet MS Bold Italic*' so that the embed font was used. I also embeded the glyphs for 'Basic Latin' and 'Latin 1'.

Then I used this code to fill it with text:

ActionScript Code:
my_txt.embedFonts = true;
my_txt.text = "This is a sample";

The text is placed, however, it is always in the Trebuchet MS regular font. Also when I click the bold and italic icons in the Property Bar, the font won't go bold/italic. The same for just bold and just italic. It only turns bold/italic when I delete all font symbols accept the Bold Italic one.

View 9 Replies

ActionScript 3.0 :: Use The "Calibri" Font Bold/normal Styles - It Doesn't Seem To Embed Properly?

Dec 30, 2010

I want to use the "Calibri" font bold/normal styles.It doesn't seem to embed properly though.I have tried every different way to embed it but it just doesn't embed properly.Its blurry compared to static textfields,and the bold text shows up as not bold...has anyone been able to embed this font properly?

View 1 Replies

Professional :: How To Use Faux Bold

Jan 5, 2011

I was given a fireworks png design that makes use of century gothic text with a faux bold applied. I can get a bold version of century gothic in flash, but this is thicker than the faux version. Can I force faux bold?

View 2 Replies

Flash 10 :: Emulate The Faux Bold?

Jan 5, 2011

I was given a design in Adobe Fireworks that includes century gothic text with faux bold applied. Is there anyway to emulate this style in Flash?

View 0 Replies

ActionScript 3.0 :: Faux Bold Doesn't Work In CS4?

Mar 19, 2009

In CS3, I can create a clip with 2 dynamic text fields - fld1is say, Myriad Pro and fld2 is Myriad Pro with faux bold turned onfrom the properties panel. I can then do...fld1.htmlText = <b>Bold text</b>and fld1 text appears in bold text because the faux bold fontwas embedded in fld2.CS4 doesn't have a faux bold, and when I go to the text menuand choose bold, it doesn't faux bold fld2, it actually changes thetext to Myriad Pro Bold. The bold tag no longer works, neither doesthe strong tag. I can, however, use font face tag and set it toMyriad Pro Bold, and now fld1 will show up bold.

Now let's say I want to put all my text content in anexternal XML file so the client can update it and I don't want tohave to explain the inner workings of Flash and tell them that theycan't use the bold tag, they have to use the font face tag and setit to some random name that I come up with for the bold fontlibrary symbol (in case we don't want to use Myriad in the future).Do I really have to set up a function to examine strings forthe bold tag and replace it with the font face tag? Is there reallyno way to get the bold tag to work?

View 25 Replies

Actionscript 3.0 :: Embedding Fonts XML CSS Bold Italic?

Oct 23, 2008

I've been trying everything with this issue so thought I'd put it out there to see if anyone can offer a solution or even advise if this is possible or not.This is the scenario:

I dynamically create a textField. I load an external CSS file into a stylesheet. From an XML file I load HTML content into the textField via .htmlText I have added the font to the library and have made it available for Export for ActionScript The HTML has spans with classes eg:

<span class="boldText">Flash Flash Flash</span>

The CSS states:

.boldtext {
font-family:Anivers;
font-style:italic;

[code]....

The font I'm using does not have any other family members like bold or italic Here is the problem. Leaving embedFonts = false things work just fine. But obviously I need to embed this font so all can see it. As soon as i set embedFonts = true I no longer get bold or italic.Is this a case of because the font does not have a bold or italic the system it just rendering, or am I just missing something? For example the checkboxes in the font's properties where you can choose bold and italic. I tried these but no luck.

View 13 Replies

ActionScript 3.0 :: StaticText Class Bold / Italic

Sep 10, 2009

I can access the read only text property of a StaticText instance (added at design time) by using "for(i=0; i <this.numChildren; i++) .... etc".I can use this text, I can trace it, etc, and I know that you can't write to it (ie its read only). BUT can I some how test that text to see if it is bold/italic/regular?[code]The charCode is the same bold or not, sort of obvious after I think about it.

View 2 Replies

ActionScript 2.0 :: Can't Control The Bold And Italic From The Text?

Apr 15, 2005

i made my flash design loading text from a txt file. But the problem is that i can't control the bold and italic from the text.So what i need is kinda content management. The company where i make the design for want to have control of the contant. I already did a quick search about loading html in flash but i wasn't lucky to find anything usefull.

View 2 Replies

ActionScript 1/2 :: Embedding Bold+italic Fonts For HtmlText?

Feb 24, 2010

How can I embed my custom font and it's bold variant (and it's faux italic variant, because there is not real italic version) and get the b and i tags working in a htmlText field?I can use the htmlText field with system fonts (with b and i tags working) ... or I can use 1 of the embedded fonts for the whole text.but I can't seem to get flash to understand the bold and italic variants are also embedded.

createTextField("dynamic_txt", 2, 40, 170, 350, 350); dynamic_txt.embedFonts = true; var emphatic:TextFormat = new TextFormat(); emphatic.size = 40; emphatic.color = 0xFFFFFF; emphatic.font = "EurostileT"; dynamic_txt.html = true;[code]...

View 2 Replies

ActionScript 1/2 :: Bold And Italic Fonts In Dynamic Text Fields?

May 24, 2006

I have a dynamic text field with the text "IMAGES". The font is Arial, it has BOLD and ITALIC checked, and has basic Latin fonts embedded. Now, I use Actionscript to change the text:

textField.text = "IMAGES";

Suddenly the text disappears! Now, it seems to me that since BOLD and ITALIC are checked on the text field, changing the .text value should simply change the text itself, which should then be rendered in bold and italic, and since I have bold+italic Latin glyphs embedded, it should display properly. But what's clearly happening is that when I set the text using Actionscript, it is attempting to display the NORMAL font instead, and since it's not embedded, it won't display. I know this because if I create another proxy text field off the screen and embed the NORMAL Arial glyphs, the original text field's text will display just fine - as normal-weight text.

But why is this? Do I have to use a TextFormat object to set the text to Bold and Italic EVERY time I want to dynamicaly change the text? This seems silly. I simply want my text field to be bold and italic every time the text changes, and NO normal text!

View 1 Replies

ActionScript 3.0 :: Write An Editor, Which Only Outputs Bold (<b>) And Italic (<i>) Tags

Feb 7, 2009

i have a problem with the flash textFormat. I want to write an editor, which only outputs bold (<b>) and italic (<i>) tags and not the other information flash adds to an htmlText.

for example in this case the output trace (myTextField.htmlText) should be exactly the input.

ActionScript Code:
import flash.text.TextFormat;
myTextField.htmlText = "huhuh <b>asjdja</b> asdasd";
trace (myTextField.htmlText);

is there a cleaner solution than replace the other information (font-size etc)

View 0 Replies

ActionScript 3.0 :: Using A Mixture Of Bold/italic Embedded Fonts In One Textfield?

May 21, 2010

I have an HTML string that uses bold and italic tags which I need to apply to a TextField. I need the font to be embedded though and I can't seem to find a way to do this. From what I've read it seems that Flash needs to use the actual bold/italic versions of the font rather than just changing it with HTML? In which case I can't do it all in one textfield because you can't change font? The only solution I found was a suggestion to use the [Embed()] method rather than the method I am using (embedding the font in a library symbol) but I don't think you can do that either with Flash CS3?

View 5 Replies

ActionScript 2.0 :: Html Formatting XML / Issue With Bold And Italic Tags Only?

Jul 12, 2006

I'm loading an xml file into flash. I have formatted certain parts of the xml file with various html tags, however I run into problems with the <b>bold</b> and <i>italic</i> tags. Even though I have <a href> and <ul> tags working fine?

I have set my text field to html while also using the "myTextfield.htmlText = " as well as using the CDATA tag in the xml file. I also checked the macromedia livedocs, and it says that these tags are standard and are handled by the flash player...

View 14 Replies

ActionScript 3.0 :: Using A Character In XML File To Bold Or Color Or Italic Certain Text ?

Jan 27, 2012

I am using XML file to pass text into a SWF. How can I use styles, either inline or external, to make certain text in the middle of a sentence appear italic or colored or bold, etc. A character or somethinng that you can put right in the XML file.


Code:
<mainText>You have the email message with two domain names: character here hackistan.edu character here and >kevinsgym-uoh.co<. Below is a list of resources to discover more information. Match the web site with the type of information you would expect to find.</mainText>

View 1 Replies

Flex :: Display Part Of Text In RichText In Bold Font?

Nov 12, 2011

How do you make some parts of spark.components.RichText bold?[code]...

View 4 Replies

Professional :: No Dynamic Bold Font If Regular Static Font Present On Stage (CS5)?

Apr 16, 2011

I have a strange issue where a dynamic text field will not show a bold version of a font (Gerstner BQ) if the regular version is on the stage in a static text field.Remove the static text field and the dynamic text field displays the bold font correctlyI have created a test FLA to reproduce this and by turning the layer with the static text field on and off (Publish settings -> Flash -> include hidden layers [unchecked]), the issue is quite clearhis issue is so big for me that I have had to abandon a project in CS5 and start again in CS4 just to work around this.

View 19 Replies

Actionscript 3 :: Programmatically Altering Font Face, Size, Weight And Color Of A Flex Label/Text Component?

Dec 24, 2009

I can change the color of the label in Flex Builder, I can even BIND the color to a variable and that works, but I can't find the Color PROPERTY in order to change or reference it programatically! What is the ActionScript 3.0 code to change the font or color of a piece of text in a Flex RIA - or is caring in what color your text appears too bizzarre a request for a RIA? I wrote whole applications after just minutes of "learning" flex, how come it's taken me three days and I still can't change the color of my stupid label?

View 1 Replies

Professional :: Can't Get Different Styles Of The Same Font To Work?

Nov 10, 2010

I am trying to get my Trebuchet font working for several different styles in a single fla. I am using Flash CS5 and AS3, but I mustpublish it in flash player 9, so TLF-text is out. I am really confused and irritated by this.The fields are placed on the stage manually and must be able to handle htmlText.I embed all 3 fonts in the library but it doesnt work. If I only use one of the fields, and therefore only one style, it works great.

View 3 Replies

IDE :: Arial Font Styles Not Applying

Apr 24, 2009

I'm having a strange issue with the Arial font in Flash CS4. I can create a text box and choose the Arial font. That appears to look like regular Arial text. However, if I want to choose a style (italic, bold, bold italic) the text does not change at all. These fonts are loaded on my system and always have been. They work in Flash CS3 and they work in all other programs including Illustrator and Photoshop CS4. In addition to that, all other fonts seem to work just fine including Arial Narrow and the other general system fonts. Arial Narrow allows me to select and apply all the available styles. It seems to be specific to Arial.

This also happens when I open a file that was originally created in CS3 or Flash 8. The font mapping notification does not appear, but if I had a text box that is supposed to be Arial Bold Italic, it automatically changes to look like regular Arial.

View 6 Replies

ActionScript 2.0 :: Font Symbol Procedure With Styles?

Jul 31, 2009

I've imported two styles of the Trebuchet MS font into the library. One without selecting the 'bold' checkbox in the Library Panel upon importing and the second with the 'bold' checkbox selected.If I look in the font list of the property panel I now see the two embedded fonts (with asterisks behind their names):

Trebuchet MS Regular*
Trebuchet MS Bold*

The first textfield uses Trebuchet MS Regular* and off course shows the text in plain style.The second uses Trebuchet MS Bold* and I would expect the text to turn immediately bold, but it is still in regular style when I select Trebuchet MS Bold*. In both cases (Trebuchet MS Regular* and Trebuchet MS Bold*) I would have to select 'B' in the properties panel to make the text bold. Which in the second case seems a bit too much to me. Why still have to click 'B' when I already have Trebuchet MS Bold* selected?

Too make it more weird: I could also import Trebuchet MS with Italic selected, choose Trebuchet MS Italic* (which would make the text 'regular' at first) and click 'B' to also make the text bold. why Flash works this way with imported fonts?(I know I should/could use TextFormat, but I'm curious about this other approach and why Flash works this unlogical way with embedded fonts)

View 2 Replies

ActionScript 1/2 :: Embedded Font Styles Procedure?

Aug 1, 2009

I've imported two styles of the Trebuchet MS font into the library. One without selecting the 'bold' checkbox in the Library Panel upon importing and the second with the 'bold' checkbox selected. If I look in the font list of the property panel I now see the two embedded fonts (with asterisks behind their names): Trebuchet MS Regular* Trebuchet MS Bold* The first textfield uses Trebuchet MS Regular* and off course shows the text in plain style The second uses Trebuchet MS Bold* and I would expect the text to turn immediately bold, but it is still in regular style when I select Trebuchet MS Bold*. In both cases (Trebuchet MS Regular* and Trebuchet MS Bold*) I would have to select 'B' in the properties panel to make the text bold. Which in the second case seems a bit too much to me.

Why still have to click 'B' when I already have Trebuchet MS Bold* selected? Too make it more weird: I could also import Trebuchet MS with Italic selected, choose Trebuchet MS Italic* (which would make the text 'regular' at first) and click 'B' to also make the text bold. Can someone explain why Flash works this way with imported fonts? (I know I should/could use TextFormat, but I'm curious about this other approach and why Flash works this unlogical way with embedded fonts)

View 4 Replies

ActionScript 3.0 :: Embed And Display Different Font Styles?

Aug 6, 2009

Let's say I have a text field with some HTML formatted text inside.

txt_field.htmlText = "This is <b>sample</b> text."

how do I embed my fonts so it'll show both the regular and the bold version of the font? It just works on my Mac but when I look at it on a PC it doesn't even display the right font. Instead of the bold version of the font, how could I use the black version of the font instead?

View 2 Replies

ActionScript 3.0 :: Related 2 ComboBox After RemoveAll Removes Font Styles

Oct 22, 2010

I have two related comboBox on the stage

-First ones instance name is grp_cb
-Second ones instance name is altGrp_cb

They load data from XML.When they first load their text format are as I coded.But after I change the first one second ones text format disappears..Any idea, how can I have my comboBox text format back????

View 1 Replies

Bold Font In Dynamic Text

Mar 17, 2009

i'm using a font called "AGBookBQ-Regular" in a dynamic text box, which loads a text file. i understand that to include the bold and italic options, i have placed another text box just out of view off the stage with these two options selected.italic works fine but the bold makes very little difference... it only stretches the font slightly.i've searched for the answer to make a much bolder font and it seems you can use a specific bold font as the bold font.i've tried this, but nothing happens. i think i'm interpreting it correctly, but if someone could please confirm this works and perhaps explain it a little clearer (using my specific font names... "AGBookBQ-Regular" and "AGBookBQ-Medium" as the bold font).

View 2 Replies

ActionScript 2.0 :: Bold Font In CDATA?

Mar 26, 2009

why this code in my xml

Code:

<![CDATA[<font color="#00000"><b>action</b>. </font>]]>

Is not making the dynamic flash content bold?If I use <u></u> it underlines it, but bold doesnt seem to work!

View 2 Replies

CS4: Make _Sans Font Bold?

Sep 30, 2009

Where's 'CS4' as a prefix to the post title? Anyway. I'm using _sans font for my flash work, because i want the font to display as the default _sans font on the device/platform. Why in CS4 (not checked earlier versions, but im sure CS3 didnt do this) is the (font) 'Style' drop down greyed out?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved