Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8938763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:42:18+00:00 2026-06-15T10:42:18+00:00

I am applying a custom font to a text field this is working fine

  • 0

I am applying a custom font to a text field this is working fine in my Openlaszlo 3.3 but in the newer version(5.0) the font is getting applied and the style is also getting applied , but i see the space between the letters is more. But this is not happening in the older version.

I inspected the object in both the versions and i found that the only notable difference is the line height.

Any idea why this is happening?How to remove those spaces is it possible?

3.3 Screenshot

3.3 Client

5.0 Screenshot

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:42:19+00:00Added an answer on June 15, 2026 at 10:42 am

    The effect you are seeing is connected to the way how Flash deals with embedded TTF fonts: Text using those fonts is completely rendered by the Flash Player. Especially the change from Flash Player 8 to 9 brought many improvement for text rendering (better anti-aliasing for embedded fonts, finally the ability to modify the letter).

    The difference in rendering text you are seeing is probably caused by the better anti-aliasing in Flash Player 9 and higher. OpenLaszlo SWF9+ text and inputtext components use the setting flash.text.AntiAliasType.ADVANCED as default.

    Here’s a discussion in the OpenLaszlo dev mailing list mentioning the effect your are seeing:

    Font rendering should be as high-quality as possible — I don’t think
    anyone’s going to want old-style rendering in FP9. Isn’t there another way
    to fix this bug?

    We’re not going to get complete font rendering consistency across
    runtimes. It’s already not consistent when using device fonts. Each
    browser/player/OS variation is different, and Flash vs. DHTML is also
    different.

    As far I know there is not an official API for modifying that setting. I’ve created a small application where you can test how modifying that property affects text rendering. The top two text items use the default font for Flash Player, therefore the anti-aliasing setting does not affect the rendering. The following 4 text items all use an embedded TTF font, and you can see the difference depending on the antiAliasingType setting.

    OpenLaszlo SWF9/10 text rendering with anti-aliasing set to normal or advanced

    To compile the application, download the following fonts and put them into the application folder:

    http://svn.openlaszlo.org/openlaszlo/trunk/laszlo-explorer/fonts/ariosob.ttf
    https://github.com/w0ng/googlefontdirectory/raw/master/fonts/Amaranth-Regular.ttf

    <canvas height="600">
    
        <font name="amaranth" style="plain" src="Amaranth-Regular.ttf" />
        <font name="arioso" src="ariosob.ttf" />
    
        <class name="mytext" extends="text">
            <passthrough when="$as3">
                import flash.text.AntiAliasType;
            </passthrough>
            <attribute name="antialias" type="string" value="advanced" />
            <handler name="oninit">
                this.onantialias.sendEvent();
            </handler>
            <handler name="onantialias">
                var t = this.getDisplayObject().textfield;
                if ( this.antialias == 'normal' ) {
                    t.antiAliasType = flash.text.AntiAliasType.NORMAL;
                } else {
                    t.antiAliasType = flash.text.AntiAliasType.ADVANCED;
                }
            </handler>
            <method name="toogleAntialias">
                if ( this.antialias == 'normal' ) this.setAttribute( 'antialias', 'advanced' );
                else this.setAttribute( 'antialias', 'normal' );
            </method>
        </class>
    
        <view>
            <simplelayout axis="y" spacing="10" />
            <view layout="axis:x; spacing:5">
                <text valign="middle">Anti-alias advanced</text>
                <checkbox value="true" y="10"
                          onvalue="if (parent.t) parent.t.toogleAntialias()" />
                <view width="20" height="1" />
                <mytext name="t"
                        antialias="advanced"
                        fontsize="25">Default font (no embedded TTF)</mytext>
            </view>
            <view layout="axis:x; spacing:5">
                <text valign="middle">Anti-alias advanced</text>
                <checkbox value="false" y="10"
                          onvalue="if (parent.t) parent.t.toogleAntialias()" />
                <view width="20" height="1" />
                <mytext name="t"
                        antialias="normal"
                        fontsize="25">Default font (no embedded TTF)</mytext>
            </view>
    
            <view layout="axis:x; spacing:5">
                <text valign="middle">Anti-alias advanced</text>
                <checkbox value="true" y="10"
                          onvalue="if (parent.t) parent.t.toogleAntialias()" />
                <view width="20" height="1" />
                <mytext name="t"
                        antialias="advanced"
                        font="amaranth" fontsize="25">Amaranth Regular</mytext>
            </view>
            <view layout="axis:x; spacing:5">
                <text valign="middle">Anti-alias advanced</text>
                <checkbox value="false" y="10"
                          onvalue="if (parent.t) parent.t.toogleAntialias()" />
                <view width="20" height="1" />
                <mytext name="t"
                        antialias="normal"
                        font="amaranth" fontsize="25">Amaranth Regular</mytext>
            </view>
    
            <view layout="axis:x; spacing:5">
                <text valign="middle">Anti-alias advanced</text>
                <checkbox value="true" y="10"
                          onvalue="if (parent.t) parent.t.toogleAntialias()" />
                <view width="20" height="1" />
                <mytext name="t"
                        antialias="advanced"
                        font="arioso" fontsize="25">Amaranth Regular</mytext>
            </view>
            <view layout="axis:x; spacing:5">
                <text valign="middle">Anti-alias advanced</text>
                <checkbox value="false" y="10"
                          onvalue="if (parent.t) parent.t.toogleAntialias()" />
                <view width="20" height="1" />
                <mytext name="t"
                        antialias="normal"
                        font="arioso" fontsize="25">Amaranth Regular</mytext>
            </view>
        </view>
    
    </canvas>
    

    The results might not be consistent across all operating systems, since operating systems will use different approaches to optimizing text rendering. The above screenshot was taken on Linux.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When applying a custom height on a select element, the text in IE8 is
In GNU Octave version 3.4.3, I am having trouble applying a custom function to
I've been trying to apply some custom style to my ListBoxes but the styles
When applying a multi-project Gradle structure to our project, my settings.gradle looks like this:
i am applying a border to NSView but how can i change the bordercolor.
I'm applying the strikeout tag: <s>$5,000,000</s> But the line is too low.. .it's about
I am having difficulties applying my custom 404 page in Drupal. So first I
I have a problem with an image that I am applying a custom jquery
I am making a custom menu. I am applying colors on panels on mouse
I have a question regarding applying a custom function to mysql_fetch_assoc while it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.