P
P
Pavel2018-12-12 11:40:13
Cocoa Touch
Pavel, 2018-12-12 11:40:13

How to disable "Bold Font" in an app that is enabled system wide?

Good afternoon. There is a problem, when you turn on the bold font in the system settings, the design in the application floats, is it possible to somehow prevent the application from making a bold font, even if it is enabled in the iOS settings?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel, 2018-12-12
@gre4ixin

I found a way, if you use a non-system font, then there will be no problem, put SF, not through systemFont, but (name: "", size: "") and everything became fine

D
doublench21, 2018-12-13
@doublench21

Well, generally speaking, you don't need to turn it off. Not everyone who uses your app sees as well as you. This slider helps people with poor eyesight a lot and this should be taken into account.
To disable this behavior, it is enough to disable adjustsFontForContentSizeCategorythe y property UIFont, which is not in vain set to true.
By default, the font obtained by the preferredFont(forTextStyle:), preferredFont(forTextStyle:compatibleWith:)and from methods UIFontMetricsenables this property, for other fonts it is disabled. Here is your way that worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question