In my app I need to support iOS since iOS 7. As you know iOS 9 uses new system font "San-Francisco".
Is it possible some how to use system font (to make native font for operation system) with setting size and attributes like Light, Medium, Bold, Italic, etc?
I found only one solution to hard code font name as for iOS 9 use "San-Francisco" and for less use "HelveticaNueue".
Maybe some one know a better solution.
Related
I'm planning to create a keyboard in iOS for a language script which has unicode block allocated to it but neither android nor iOS has it's font. I'll get the font made by someone but will other apps like WhatsApp use that font instead of showing boxes
I am using different fonts in my Codename One app. If I include and use Roboto-Bold.ttf or Oswald font from Google fonts or Keep Calm Medium from dafont.com the text is displayed on Android and Codename One Simulator (as reported on this SO question) but NOT on iOS (neither on the device nor on XCode device) although the fonts are packaged in the .ipa generated by Codename One.
I tried with style = PLAIN or BOLD with the same results.
I used font = Font.createTrueTypeFont(fontName, fontFilename ).derive(fontSize, style);
Why are some fonts working while other aren't? Is there any way to know before compilation which fonts are more likely to work on iOS?
iOS and Android use very different approaches to dealing with fonts which we try to simplify with a simple method.
If you define the font in the designer with a UIID we can hide most of that complexity for you but when you load the font dynamically you are exposed to some of that.
Android just loads font files so the file is used and this should work easily like the simulator. iOS needs the fonts to be installed and then loaded by font name (which isn't the file name and isn't very intuitive). This stack overflow question discusses the method of getting the font name on a Mac: How do I get the font name from an otf or ttf file?
I am developing an IOS application. I always use system fonts for UILabel. But they appear sometimes bold and sometimes italic on some IOS 7 devices. I added a screenshot. You can see some lines normal and some lines bold. But I've set the default system font on xib. What I'm doing wrong,
Thanks.
Did you check which are the settings for Vision in Accessibility in those devices? Are they the same?
*
As you may know, in iOS7 users are allowed to change some aspects in the system's font as size and weight.
To handle the proper notifications when users change this settings and manage your fonts properly, take a look to Text Styles programming guide.
*Image source: http://osxdaily.com/2013/09/20/ios-7-font-hard-to-read-fix/
I've used a custom TTF font (Gotham) when implementing the layout of an app on iOS 6. I've noticed its baseline was always a bit higher than regular fonts, but just nudged things around to fit.
Now that I've updated to the iOS 7 SDK, the font placement is closer to that of regular fonts when running on iOS 7 devices, but still looks nudged on iOS 6 devices.
So it looks like Apple fixed what caused that vertical shifting on the baseline when interpreting the font metrics for iOS 7, but left iOS 6 untouched.
I've already tried modifying the actual TTF ascender, descender and line gap properties using Apple's Font Tools suits according to this blog post and many answers here on stackoverflow, it does help on iOS 6 but doesn't change much on iOS 7.
My question is: is there something I can do to use a custom font on iOS 6 and 7 without needing to tweak each label depending on the running iOS version?
I know this has been mentioned on the iOS 7 release notes, but I don't want to add tons of conditional clauses on my code to nudge the labels differently for iOS 6 or iOS 7 devices.
Editing the TTF file was the solution.
I've followed the suggestion from this answer and opened my TTF files on Glyphs and exported them again. Glyphs adjusted the ascender and lineGap values to something which is probably correct and the fonts behave pretty much identically on iOS 6 and IOS 7. The baseline now is even very close to the system fonts.
There are still some minor vertical differences, but apparently this happens with every font on iOS 7, even on system fonts, but it's much less noticeable.
My app uses the lovely Avenir font which is built in to iOS6 but not iOS5. How can I get it onto iOS5? I know I can fall back to a different font on iOS5 (eg just use System font) but I don't want to do that. Can I build the Avenir font into my app some how?
No and Yes, you could just supply the font with your app.
But you will need to buy a distribution license for the font, this will be very costly.
Your best option is to fall back to an other font on iOS5 or just not support iOS5.