Using Helvetica Neue in iOS
Posted: Sat Oct 11, 2014 3:53 am
As many of you may know, Apple makes judicious use of Helvetica Neue and all it's font weights in their iOS interfaces. Sadly, one thing it appears LC doesn't do is translate those fonts correctly from Mac to iOS-- so everything comes out the same Helvetica Neue font no matter what font weight you have specified. And the "fontstyles" method doesn't give you the full range either.
This is what I finally figured out. Here is the correct mapping from Mac to iOS for Helvetica Neue: Say you have a field in your Mac application which has the textfont set to "Helvetica Neue Thin". To properly display, you'll need to set the same field's textfont in iOS to "HelveticaNeue-Thin".
Here are all the iOS equivalents:
HelveticaNeue-UltraLight
HelveticaNeue-Thin
HelveticaNeue-Light
HelveticaNeue
HelveticaNeue-Medium
HelveticaNeue-Bold
HelveticaNeue-Bold Condensed
HelveticaNeue-Black Condensed
And unless anyone knows of a better way, here is some code to update all those fields on all those cards when in iOS:
You call it in your startup handler thusly:
This is what I finally figured out. Here is the correct mapping from Mac to iOS for Helvetica Neue: Say you have a field in your Mac application which has the textfont set to "Helvetica Neue Thin". To properly display, you'll need to set the same field's textfont in iOS to "HelveticaNeue-Thin".
Here are all the iOS equivalents:
HelveticaNeue-UltraLight
HelveticaNeue-Thin
HelveticaNeue-Light
HelveticaNeue
HelveticaNeue-Medium
HelveticaNeue-Bold
HelveticaNeue-Bold Condensed
HelveticaNeue-Black Condensed
And unless anyone knows of a better way, here is some code to update all those fields on all those cards when in iOS:
Code: Select all
on altUpdateFontsFor_iOS
lock screen
lock messages
repeat with x=1 to the number of cards in this stack
repeat with y=1 to the number of controls on card x
try
get the textfont of control y of cd x
if it contains "Helvetica" and the environment is "mobile" then
set the textfont of control y of cd x to fixHelvetica(it)
end if
end try
end repeat
end repeat
unlock messages
unlock screen
end altUpdateFontsFor_iOS
private function fixHelvetica pFontname
--> Helvetica Neue Thin BECOMES HelveticaNeue-Thin
put "-" into char 15 in pFontname
delete character 10 in pFontname
return pFontname
end fixHelvetica
Code: Select all
if the environment is "mobile" then altUpdateFontsFor_iOS