Android 15, the TextLayout application does not display Chinese and Japanese。
AIRSDK51.1.1.3 All Android15 Device
Thanks for the alert.. to clarify, this is related to FTE-based text rendering (TextBlock/TextLine etc) which uses a component to render both device fonts as well as the DefineFont4 (CFF-based) embedded text.
Google have changed the font files used in Android 15 for CJK so they are now using CFF2 tables, whereas the code here only supports CFF (version 1). We'll need to update this, sadly not a quick/easy fix.
In the meantime, it may be worth embedding a CFF-based font (you can pull it out of an Android 14 phone with ADB)?
thanks
Hi, we noticed that also our app, which has a very limited number of Chinese users, works with earlier versions of Android but doesn't show Chinese characters with newer smartphones.
We always embedded the TTF font with this line ` [Embed(source="/../assets/fonts/Lato-Regular.ttf",fontFamily="latoregular",mimeType="application/x-font",embedAsCFF="true")]
protected static const latoregular:Class; `
is this still the correct way to embed fonts? a very old article suggested embedAsCFF to be set to false, but this doesn't seem to work for us
Hello @ajwfrost , any update on this issue? We are using FeathersUI Labels and it seems that even setting
myLabel.styleProvider = null; myLabel.fontStyles = new TextFormat( "_sans", 14, 0x222222 );
cannot display chinese characters if Android version is 15 or later
I see very few people complaining about this, maybe there is some simple workaround but we didn't find it.
Hi - we had been trying to add support for CFF2 font tables, which is the root cause of the issue here, but it got very complicated... I've heard that some folk are embedding the characters rather than using device fonts, or it might be possible to provide and load the font at runtime (as long as it uses CFF outlines rather than CFF2..)
I'm confused by this, my app has a large number of Chinese users, and while there were issues displaying Chinese for Android a couple of years back, they were fixed, and we display Chinese just by using '_sans' font now. We use both Starling and Feathers. We arent embedding the font or loading a font but just relying on device fonts.
If you're not using the FTE classes then I believe it's still okay: the issue is in the more advanced font rendering code which is taking all the low-level font tables and determining how to rasterise the characters... i.e. TextBlockTextRenderer if you're using Feathers; the TextFieldTextRenderer uses a more basic font mechanism so hopefully works but you lose other capabilities such as right-to-left text etc.
Just to save someone from the headaches I've had to debug this... during the various trial and error we did to make it work I added to the Android manifest this line, and forgot about it
<newFontRenderingFromAPI>99999</newFontRenderingFromAPI>
with this line, NONE of Chinese symbols worked:
- with TextFieldTextRenderer and "_sans" or any other font name, embedded or system, I always got rectangles instead of glyphs
- with TextBlockTextRenderer I always got empty labels (no rectangles)
after removing newFontRenderingFromAPI, we managed to make it work
- with TextFieldTextRenderer I get the right glyphs, probably with any font I choose to use, but we decided to stick to "_sans" to stay sure
- with TextBlockTextRenderer I still get empty labels
So we chose to alternate the text renderer factory based on the chosen language.