Skip to main content
Inspiring
December 15, 2015
Question

How to access all the fonts on the device in iOS?

  • December 15, 2015
  • 2 replies
  • 710 views

I have a simple program that runs in AIR. Everything is working fine, except for one detail; i can't get the font I want to draw in a TextField. I try selecting the font, but I don't get the one i wanted, it always snaps back to the default _sans font. It works on the AIR simulator, but not on the device itself. I dumped out the font list using the enumerate function, and I see the following families:

name : Avenir Next Condensed

name : Bangla Sangam MN

name : Baskerville

name : Bodoni 72

name : Bodoni 72 Oldstyle

name : Bodoni 72 Smallcaps

name : Bodoni Ornaments

name : Bradley Hand

name : Chalkboard SE

name : Chalkduster

...etc...

But i try to access Bodoi 72 Smallcaps, and I get the normal _sans font.

And how can I access the "demibold" fonts that are actually on the device.

if you run a font dumper utility on the IOS devices, like the free AAA fonts app, you will see the actual font names are listed like this:

AvenirNextCondensed-Bold,

AvenirNextCondenses-DemiBold,

etc...

Clearly Adobe is trying to create the concept of a font family, and variations in that family. It is easy enough to get the fonts you want if you stick to vanilla fonts that only have Bold, Italic, and BoldItalic variants, because there is a BOLD and ITALIC flag in the TextField control. But how on earth are we supposed to access the really important fonts like the condensed ones, or the demibold? 

This is frustrating the heck out of me; i have tried giving the TextField () function all sorts of different spelling variants, but haven't found the trick to coerce the system to use the font i want. It would also be super helpful if Adobe would refine their font enumeration system to give us the actual sub-fonts in the family, not just the generic family because on the all important mobile devices you don't find nice orthogonal font sets; you have holes all over the place, and it is super important to use the best fonts you have, given that your selection is so meagre.

any help is greatly appreciated.

edward

This topic has been closed for replies.

2 replies

Inspiring
December 16, 2015

as you can see from the above screenshot, sending the font name to TextField only works some of the time. Many of the fonts are not rendered properly. Baskerville is working fine, But Bodoni 72 no, that is being substituted with_sans, and Academy Engraved LET is also failing.  This is baffling, why is this happening? American Typewriter - OK, Arial Rounded - OK, but why are all the Avenirs failing to render?

This is totally baffling. This is on iOS 9 by the way, latest version with AIR v19.

Inspiring
December 16, 2015

By the way, on the AIR simulator, all the fonts render perfectly, including Academy Engraved! It is as if the name is not correct somehow, and the family name reported by Adobe is incorrect. Either way this is a major bug!! i suspect this bug has been around a while, are people just ignoring these failing fonts?  Baffling.

Inspiring
December 16, 2015

And i am setting embedFonts to FALSE, and have tried various combinations of antialiasing, has no effect whatsoever.

Colin Holgate
Inspiring
December 15, 2015

Do you have the textfield set to Use Device Font?

Inspiring
December 16, 2015

Textfield has a property called "embedfont", which when true allows you to specify that the font  name you supplied is embedded. In my situation, i am not using embedded fonts, just trying to access all of the device fonts that the device has to offer. It appears that many of the fonts are not reachable; at least I can't find a way to trick the AS3 runtime into using them.  Surely i can't be the first person to wrestle with the issue of accessing available fonts that aren't just plain. I plan to write a test program that tries to access all the fonts on the device.