flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: How Flex font fallback is working?
Date Fri, 21 Oct 2016 11:04:29 GMT
The font fallback is handled by the Flash runtime.

All fontFamily does is specify a font fallback if a font is not installed on the system. It
does not have anything to do with fallbacks for missing glyphs. If Glyphs are missing in the
specified font, Flash uses the system default font to display the missing glyphs, Unfortunately,
there’s no control over what font is used that I know of. The exact font used can be different
on different systems, although Arial is the most common one.

If you need to support different languages, you’re going to need to do one of two things:
1. Create a font which contains the correct glyphs for all used languages.
2. Change the CSS (i.e fontFamily) on the fly to set the font for the correct language.

Thanks,
Harbs

On Oct 20, 2016, at 7:12 PM, GhaziTriki <ghazi.nocturne@gmail.com> wrote:

> Hello,
> 
> I have been trying to embed fonts to my Flex application. The application is
> multi-lingual and have Arabic, Russian, Chinese and a lot of other languages
> that are not supported by a lot of fonts.
> 
> I want to understand how the font fallback is working for a Flex Application
> because we have different results with the two cases below.
> 
> Case 1: 
> @font-face
> {
> 	src:             url("assets/fonts/roboto/Roboto-Medium.ttf");
> 	font-family:  Roboto;
> }
> 
> global {
> 	fontFamily : Roboto;
> }
> 
> In that case all the application uses Roboto and the non-supported glyphs
> are displayed as empty.
> 
> Case 2:
> @font-face
> {
> 	src:             url("assets/fonts/roboto/Roboto-Medium.ttf");
> 	font-family:  Roboto;
> }
> 
> global {
> 	fontFamily : Roboto, Arial, "_sans";
> }
> 
> When the application is loaded and after detecting Arabic glyphs in one
> component, all the application falls back to Arial.
> 
> Why in case 2 all the application is falling back to Arial instead of the
> concerned element? Is it possible to configure the fallback per component or
> is it always applied per Application level?
> 
> Many Thanks
> 
> 
> 
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/How-Flex-font-fallback-is-working-tp13879.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.


Mime
View raw message