Skip to main content
Inspiring
Nov 13, 2023 10:50 AM UTC
Question

(AS3) Different fonts for each language in the text field

I have a textfield with about 100000 characters.
Is there a way to display different fonts for each language in this field?
(For example) English=>"Arial", Hangul=>"Malkun Gothic"
If possible, please provide sample code.

    This topic is closed to new replies. Start a new post to keep the conversation going.

    6 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    Nov 13, 2023 1:32 PM UTC

    Hi.

     

    You can create a new TextFormat instance, change the font property and apply this TextFormat instance to the target text field using the defaultTextFormat property.

     

    Regards,

    JC

    Translate
    Inspiring
    Nov 14, 2023 12:52 AM UTC

    I think my question is wrong.
    The text field contains a mixture of English and Korean.
    In this case I am asking how to apply different fonts for each language.

    Translate
    kglad
    Community Expert
    Community Expert
    Nov 14, 2023 3:04 AM UTC

    you can mix different fonts in the same textfield, but it would be easier and cleaner to use different textfields for different languages if both languages are to be displayed concurrently.

    Translate