Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Device font support on iOS/Android

1 REPLY 1
Reply
Message 1 of 2
Anonymous
455 Views, 1 Reply

Device font support on iOS/Android

Anonymous
Not applicable

I'm trying to change one of the TextFields in our app to use a device font. This is because the user can enter text into this field and we'd rather not embed a font containing every potential glyph (around 14,000 in Chinese). It'd be really useful to know if this is even remotely possible.

 

I turned off font embedding for that field and specified a font which I know to exist on the device but it fails to find the font on the device.

 

This works in the Editor, I can specify something like "Arial", non-embedded, and it'll find the font and render correctly.

Trying "Droid Sans" on the Android device fails. 

 

I tried using Font.enumerateFonts(true) to see which fonts SF is aware of. In the editor this returns me a huge list of device fonts, as expected. On Android, just one font. None of the standard device fonts are available.

 

Is there any way I can achieve this? Should I look at creating a Font Provider (is this possible via Unity?)? Is there a workaround that allows me to render using a device font and apply the result to my movie? I considered rendering text to a texture and passing that back to the Actionscript but I've never had any success with ReplaceTexture.

 

Any help/ideas would be greatly appreciated!

Reply
Reply
0 Likes

Device font support on iOS/Android

I'm trying to change one of the TextFields in our app to use a device font. This is because the user can enter text into this field and we'd rather not embed a font containing every potential glyph (around 14,000 in Chinese). It'd be really useful to know if this is even remotely possible.

 

I turned off font embedding for that field and specified a font which I know to exist on the device but it fails to find the font on the device.

 

This works in the Editor, I can specify something like "Arial", non-embedded, and it'll find the font and render correctly.

Trying "Droid Sans" on the Android device fails. 

 

I tried using Font.enumerateFonts(true) to see which fonts SF is aware of. In the editor this returns me a huge list of device fonts, as expected. On Android, just one font. None of the standard device fonts are available.

 

Is there any way I can achieve this? Should I look at creating a Font Provider (is this possible via Unity?)? Is there a workaround that allows me to render using a device font and apply the result to my movie? I considered rendering text to a texture and passing that back to the Actionscript but I've never had any success with ReplaceTexture.

 

Any help/ideas would be greatly appreciated!

1 REPLY 1
Message 2 of 2
AD_NEdwards
in reply to: Anonymous

AD_NEdwards
Alumni
Alumni

Hi,

 

My understanding is that Android doesn't expose it's font/glyph functions in the same way you're observing on Windows, so this type of setup would not be possible.

Reply
Reply
0 Likes

Hi,

 

My understanding is that Android doesn't expose it's font/glyph functions in the same way you're observing on Windows, so this type of setup would not be possible.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report