Apps that support Dynamic Type will adjust to preferred reading size.
The path to that setting on an actual device is:
Settings > Display and Brightness > Text Size
and there is a slider to change the size of text throughout the operating system.
But I seem to not find that setting on a simulator.
You can Find it with
Settings>General>Accessibility>Larger Text
Related
I'm new to Xamarin and I'm actually developing an Android App. I've tried to run the app on different Android phones, but the fontSize appears either too small or large. Programmatically, how can I scale the FontSize of texts so that it can be adjust according to the device's screen?
Firstly, make sure you are using sizes in dp not px (or in, mm etc.) as these will factor in the screen density.
If you still have an issue, look at Screens support in the Android Docs, especially Using configuration qualifiers. Examples can be found here.
Basically you would need to provide a different resource file for each screen size. You should have a file something like res/values/dimens.xml where you store sizes for all your components. Make sure your font sizes are declared and referenced from here. You can then create a series of folders/files for the different screen sizes
res/values/dimens.xml
res/values-sw320dp/dimens.xml
res/values-sw720dp/dimens.xml
res/values-sw1024dp/dimens.xml
where each of these folders define the smallest width screen that that file will be used for.
I have added min font size to label but the font is not changing according to the screen size.
I thought setting min font size and using autolayout is to scale the label height is enough.
But its not happening.
Use minimum font scale instead of minimum font size. Minimum font size was deprecated in IOS 6. In the image although mine says fixed here you can change that and then set the scale factor.
To vary by size of the screen you can do some of that with interface builder. See image. This is using size classes.
Other ways would be to increase the font size to a large number and let it scale, set it in code by device type, or set a constraint on the label to make it grow and shrink between different sizes and have the scaling set right.
TextKit provides the inbuilt support for making UI with Adaptive text font sizing based on auto layouts.
https://developer.apple.com/design/adaptivity/
Check the details on Dynamic text on above article.
I would like to know how people have reliably (from a system set dynamic text size POV) worked with smaller size fonts on the apple watch, with normal text and timer elements.
The former can have their text size assigned in their attributed text, however the preferred fonts (or descriptors) used to create the new smaller font don't seem to update their size with respect to the watch's dynamic text size setting.
The latter can't have their text size assigned directly though using their minimum text scale and resizing them in the storyboard you can shrink them to a given size ok. The problem from a dynamic text size POV is that these timers DO update their size from the dynamic text size setting but if you've used the storyboard scale and minScale route to resize them then you can run into trouble when larger text size is selected by the user and no longer fits in the smaller size frame so is truncated as ...
Essentially dynamic text size on the watch doesn't even seem to be properly exposed in any of the API so you can't even adapt UI element sizes in code depending on what the current system dynamic text size is set to.
Cheers
How do I match the font pixel size given to me by my designer in PhotoShop to the correct font size in Xcode Interface builder.
For example, my designer is using Helvetica Neueu Regular 32px Font in his design.
I've used a few points to pixel translation sites, but it doesn't seem exact.
I have attempted to follow the answer from this question, but to no avail:
https://stackoverflow.com/a/6107836/1014164
You will never have perfect results when visually comparing a Photoshop comp to a real program. In fact, it's not un-common for a text layout to be different between different computers because version and operating system differences (as well as monitor layouts) cause the text to reflow every time it's edited.
Unless things are very much different in other versions of Photoshop, your designer hasn't specified 32px because Photoshop doesn't lay text out in pixels - it works in points/picas. The exact text rendering is also dependent on the document's resolution (which is different between print and screen).
The best you can do is get the text to look roughly proportional to the designer's intent. In modern iOS, most apps will use the user's customized font settings anyway.
The BB OS 5.0 supports images for context menus. The API documentation says the image will be scaled to fit a square set by the height of the menu font. I find that totally unhelpful.
The only way I can explain that method of calculation is due to screen resolution and DPI. But since the 5.0 OS is only valid on a handful of devices with similar screen sizes, I reckon they can specify the actual icon size they use.
I'd like to choose an icon size that's closest to the default menu font height so that the they look OK.
What size do you use? Do you even use this feature?
I haven't used it yet, but I would recommend using any square ratio maybe up to 64x64; the problem is that with new devices on the horizon (eg rumored tablet - with much bigger display) it won't necessarily be practical to target a specific screen size.