Change font size based on Accessibility Settings in Appcelerator Studio - titanium

I am working on Titanium application which I am giving support for Android and iPhone. My goal is to change the overall app's font size whenever we change font size from Accessibility Settings. (Settings->General-> Accessibility->Larger Text->Setting maximum size)
Currently font size change is reflecting only in AlertDialog. I want to happen changes in all elements like Label, button, listview etc.
In android, font size is reflecting when I am setting font size from Accessibility.
Could you please suggest any solution for this!
Thanks !!

Try to use font size in sp (scale-independant pixel)
"#myLabel": {
font: {
fontSize: '14sp'
}
}
That would make it work

Related

Font Style Picker Control for OSX Application

I want to know if there is default system control that can be used to let the user select Font Type, Size and Style.
If there is a way to use font picker as XCode uses to let developers edit the font of label controls for example that would be great!
Thanks in advance :)

iOS Foundation: system font size

I would like to know if systemFontSize in iOS app tableView is always the same for textLabel? This is are depening to style?
For example when I NSLog(#"%f",[UIFont systemFontSize]); I'm getting 14.0. Is this are always the same?
And what's more: How can i change font size without changing the font-family (assuming that i have my own fonts in my plist).
I tried:
cell.textLabel.font = [UIFont fontWithName:#"Sansation-Light" size:12.0];
But UIFont always want for me fontname/family. How can i avoid that and have one font to all my screen and changing only size?
System Fonts are describe as following :
+ (CGFloat)labelFontSize;//Returns the standard font size used for labels.
+ (CGFloat)buttonFontSize;//Returns the standard font size used for buttons.
+ (CGFloat)smallSystemFontSize;//Returns the size of the standard small system font.
+ (CGFloat)systemFontSize;//Returns the size of the standard system font.
and you can change the font size without the font family like this :
cell.textLabel.font = [UIFont systemFontOfSize:14];
System font sizes are not always the same. Beginning in iOS 7 there is Dynamic Type. Users can set their preferred font size in the system settings. This is the recommended way for apps to get and set their font sizes now.
In the Interface Builder you can choose things like Body or Title 1 under the Font settings. The actual size will be adjusted according to the user's system settings. Programmatically you use UIFont.preferredFont(forTextStyle: ). See this post for more details about doing this in iOS 10 and Swift 3.
See also
Typography docs
Text Programming Guide for iOS
Just to add to the above answer. The above methods are members of UIFont class. So to get the default button font size...
float defaultFontSize = [UIFont buttonFontSize];

Phantom warning: Unsupported configuration minimum font size is greater than current font size

XCode is giving me a warning about my minimum font size being greater than my current font size. When I click on the warning, it takes me to a XIB file but it only highlights the outer object, none of the inner objects which actually have a font size attribute. Just to be sure, I went through each object and made sure their minimum font size was smaller than their current font size, but Xcode still gives me this warning. What is this warning trying to point to?
I fixed this issue by increasing the font size on a label object, then toggling off auto shrink on it, then rebuilding, then turning auto shrink back on.
There are two scenarios at play, and two solutions accordingly:
1) If you want to auto-shrink your label
Increase the minimum font size of your label to something safe, say 16point
Modify your code to set the font size to your desired font size at run-time
2) If you don't care about auto-shrink: simply change the "Autoshrink" setting to "Fixed Font Size" and this should correct the behavior regardless of what you have your font size set to in Interface Builder
I had the same problem and it was difficult to identify which label was the problem.
Then I opened the storyboard as Source Code and search for minimumFontSize. I compared minimumFontSize with fontDescription's pointSize, to check which value was equal to or greater than the minimumFontSize.
Replace minimum font size with minimum font scale.

vb.net images with Windows medium font

We have a vb.net desktop application that uses a number of graphical images. All is well when the Windows Display is set to the default small font; however, when the display is set to the medium (125%) font, the graphical images don't display properly. We can accommodate the changes to windows sizes and text boxes, etc using autoscale and autosize; however, this doesn't help with images. Is there any way to overcome this issue?
Thanks.
The controls and maybe the form containing the images are probably changing sizes when the font size changes. Make sure the size of the control containing the image does not change when the font size changes.
On the windows form set the following properties:
autosize = true
autoscalemode = dpi

Xcode 4 Interface Building Font Not Updating/Showing

When I am changing the font of a label to anything other than the default, the label's font never changes. I can change the font size but not the displaying font. However, when I double click on the label, I can see what the label's font would look like. Can anyone help me with this?
Not all fonts are available on the iPhone. If you are setting the font to an unavailable one, it will default to helvetica. Search the net for a list of the fonts you can use.
You can reference http://iosfonts.com/ for fonts available for each version of iOS. Fonts outside this list will appear as Helvetica, as jrturton said.
I would suggest expanding the size of the text box, by dragging its outermost edges? Despite having made your changes if the selected font/font size combo is to large for the text box to handle it will remain smaller than what you selected even though when you go into the highlight view it appears correct
Edit
Just Because its in that font selection tool does not mean it will show up on the device