New Way To Deal With Custom Fonts on iOS?

Scott Rossi scott at
Wed Apr 15 12:23:15 EDT 2015

Thanks Chris.  The bug report is mostly about time to load, but yes it
seems somewhat related.  The main issue is there's some disconnect between
what the fontNames function reports and what is needed by the system for
fonts to render properly.  To apply a font name, the basic approach seems
to be to put the core name of the font into a string, followed by a single
hyphen and any style/s, and remove spaces from string (shown below).

There are several exceptions though, such as Arial which is listed as
"Arial" in the fontNames but is actually "ArialMT" on the device.  There
are roughly dozen or so of these exceptions, and to further complicate
matters, there's at least one case where "condensed" is part of the font's
name, as opposed to being a style.  There is no way to make this
differentiation programmatically.

I wrote a font name formatting routine which works about 90% of the time,
but then realized it's probably easier just to go with an established
reference, like the one here:

In any event, the fontNames needs to be fixed, because trying to figure
out the naming for any custom installed font still requires trial and


Scott Rossi
Creative Director
Tactile Media, UX/UI Design

On 4/14/15, 7:18 AM, "Chris Sheffield" <cs_livecode at> wrote:

>Could this possibly be related to this issue bug 14116
>Mark W. stated in a comment there that the screen loading times may have
>something to do with a change in the way that fonts were handled between
>LC 6.6 and LC 6.7. I wonder if the issue you described is related
>somehow. Maybe it¹s also caused by this change to using CoreText in iOS.
>Specifically, see his comment from February 27.
>> On Apr 14, 2015, at 1:27 AM, Scott Rossi <scott at> wrote:
>> Hi All:
>> I just spent two hours with a colleague trying to track down why a
>> font wasn't rendering correctly on iOS, and apparently it seems that
>> something changed with either the way LiveCode 7 or iOS 8 handles font
>> names.
>> It used to be that grabbing the installed name of a font on iOS was all
>> that was needed to get a custom font to work, but now it seems one has
>> manually combine the font name and any desired style/s into a string
>> separated by a dash:
>> Installed name = American Typewriter Condensed Bold
>> becomes -------> AmericanTypewriter-CondensedBold
>> I know about the fontStyles function, but that only appears to return
>> available styles for font, it doesn't return a properly formatted
>> Looking up font related terms/issues in the docs, forums, and mail list
>> haven't seen any reference to this anywhere.  Is this documented, and
>> more importantly, is there a function or script to automate this so we
>> don't have to maintain a stored list of styles and compare/replace words
>> in the font name?
>> I'm also worried about what caused this change: is this a LiveCode
>> or an iOS change?  An iOS change would seem to mean that we need to code
>> around the system version to handle older versions of iOS.
>> Thanks for any info/advice here.
>> Regards,
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX/UI Design
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at
>> Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>use-livecode mailing list
>use-livecode at
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:

More information about the use-livecode mailing list