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!
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!
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.
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.