Try embedding verdana to see if you're having this problem with all
fonts or just Helvetica.

 

Your code looks right.  When you made the adjustment, did the text
reflow and cut off different characters?

 

Maybe you can post a simple test case.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of renzeullo
Sent: Friday, April 11, 2008 12:36 AM
To: [email protected]
Subject: [flexcoders] Re: Embedded Fonts and Text Alignment problem in
Text control

 

Hi Alex,

The truncated text looks like this:
http://i87.photobucket.com/albums/k155/ernieldiaz/embedded_font_truncati
on.jpg
<http://i87.photobucket.com/albums/k155/ernieldiaz/embedded_font_truncat
ion.jpg> 

The text uses an embedded Helvetica font. The first paragraph is left
aligned and is rendered correctly. The succeeding paragraphs are
centered, right aligned, and justified. They have problems when the
text reaches the right border.

Any help is appreciated. Thanks in advance.

Renz

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "renzeullo" <[EMAIL PROTECTED]> wrote:
>
> Hi Alex,
> 
> Thanks for the reply. I tried your suggestion, but it doesn't seem to
> be working. Am I doing it correctly? Code is:
> 
> ...
> ...
> public class Text extends mx.controls.Text
> {
> public function text(){
> super();
> }
> 
> override protected function updateDisplayList(unscaledWidth:Number,
> unscaledHeight:Number):void {
> super.updateDisplayList(unscaledWidth, unscaledHeight);
> textField.width += 10;
> }
> }
> 
> I've tried adding integers from 2 to 20, but still does not seem to
> have any effect.
> 
> Any help is appreciated. Thanks in advance.
> 
> Thanks!
> Renz
> 
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <aharui@> wrote:
> >
> > Subclass Text and widen the TextField.
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected]
<mailto:flexcoders%40yahoogroups.com> 
[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> > Behalf Of renzeullo
> > Sent: Thursday, April 10, 2008 4:08 AM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com>

> > Subject: [flexcoders] Embedded Fonts and Text Alignment problem in
Text
> > control
> > 
> > 
> > 
> > Hi all,
> > 
> > Im having a problem with right, center, and justify alignment in a
> > text control using embedded fonts. The last character in the line is
> > not shown in full if it touches the right border of the control.
> > 
> > I have an html-formatted text which I feed into Text.htmlText. The
> > html-formatted text is taken from a RichTextEditor control. I
> > substiture the font names inside the html <font> tags with the
aliases
> > I assign to the embedded fonts. But when it renders in the Text
> > control, the character that touches the right border gets cut in
half. 
> > 
> > This happens with variable sized fonts like Arial. Fixed sized fonts
> > like Courier New gets generated without problems.
> > 
> > Anybody know of any solution?
> > 
> > Thanks in advance.
> > 
> > Renz
> >
>

 

Reply via email to