Adobe Dreamweaver Forums



Last 10 THreads :         Query question/help (Last Post : trojnfn - Replies : 2 - Views : 3 )           »          CS4 Motion Editor issues (Last Post : aaronlyon - Replies : 4 - Views : 9 )           »          Bridge No Longer Rotates Automatically (Last Post : Michael_Palumbo@adobeforums.com - Replies : 1 - Views : 2 )           »          dollarFormat / numberformat problem (Last Post : izdabye - Replies : 0 - Views : 1 )           »          Call out side flex (Last Post : Amy Blankenship - Replies : 15 - Views : 16 )           »          captions for photos (Last Post : dc111652 - Replies : 0 - Views : 1 )           »          Re: CS4 GPU Acceleration and Intel X3100 (Last Post : Paul_B_Brown@adobeforums.com - Replies : 0 - Views : 1 )           »          error 1034 (Last Post : shottogan - Replies : 0 - Views : 1 )           »          Keyboard events don't work in player or projector (Last Post : tunghoy - Replies : 0 - Views : 1 )           »          Help with caption box question (Last Post : NZ-developer - Replies : 1 - Views : 2 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-03-2008, 04:37 AM
mogz3
 
Posts: n/a
Diggs:
Default Rich Text Editor isn't showing embedded non-system fonts

I've searched high and low for a resolution to this problem. And as far as I
can tell there isn't a solution. So, please if anyone has a solution, I think
it would be worth a lot of peoples time, if we could actually post it here.

If you embed non-system fonts (below I've compiled true type fonts into
swf's), and reset the rich text editors fontArrayFamily to only contain the
newly embedded fonts, the embedded fonts will not work. If you embed system
fonts, this method will work. If you assign 1 of the non-embedded fonts to a
component, the font will render correctly. The issue only seems to be when the
fonts are assigned to the RTE, and the font families that are available to it.

Below should allow for non-system fonts to be available to the RTE, but you
will get default fonts instead.

<mx:Style>
@font-face {
src:url("AABIGFICTION.swf");
fontFamily: "AABIGFICTION";
}
@font-face {
src:url("Baskerville_Old_Face.swf");
fontFamily: "Baskerville_Old_Face";
}

</mx:Style>

<mx:Script>
<![CDATA[
private function returnHandler():void {

RTE.fontFamilyArray = ["AABIGFICTION", "Baskerville_Old_Face"];
}
]]>
</mx:Script>

<mx:RichTextEditor id="RTE" title="Title" width="440" height="368"
creationComplete="returnHandler();">


*NOTE*
*IF you assign the fontFamily within the RTE to 1 of the embedded non-system
fonts, it will render the font.
*Below AAGBIGFICTION will show, but you will not be able to use any other font.
****
<mx:RichTextEditor id="RTE" title="Title" width="440"
fontFamily="AABIGFICTION" height="368" creationComplete="returnHandler();">





Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-03-2008, 04:37 AM
mogz3
 
Posts: n/a
Diggs:
Default Re: Rich Text Editor isn't showing embedded non-systemfonts

I just figured this one out. Make sure that if you embed a font, that every
font used by the movie is embedded. Because if flex tries to use a font that
is not embedded, Flex will automatically switch to using system fonts. IT WILL
IGNORE YOUR EMBEDDED FONTS.

In my project, I was embedding 2 non-system fonts. The Rich Text editor by
default uses Verdana to display your text size, font, all the control
components that belong to the Rich Text Editor... And since I didn't embed
Verdana, Flex ignored my embedded fonts, and forced the movie to use Verdana.
After I embedded the system font (Verdana) everything worked as expected.

So this fixed the issue:

@font-face {
src:url("AABIGFICTION.swf");
fontFamily: "AABIGFICTION";
fontName: "AABIGFICTION";

}
@font-face {
src:url("Baskerville_Old_Face.swf");
fontFamily: "Baskerville_Old_Face";
fontName: "Baskerville_Old_Face";

}
@font-face {
src: local(Verdana);
fontFamily: "Verdana";
fontName: "Verdana";
}

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 03:41 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk