0 Replies
      Latest reply on Dec 3, 2019 2:22 PM by sharppa
      sharppa Level 1 Level 1 (0 points)

        I am familiar with the new Apple guidelines that the system fonts should no longer be accessed by the names and only the system API should be used. Beyond this new requirement, it seems like the two SF fonts have been merged into one font. The app I work on has user content where the users in the past have freely used SF Display or SF Text at any size. This appears to no longer be possible. Some code:

         

        UIFont *fontDisplay = [UIFont systemFontOfSize:10];
        UIFont *fontText = [UIFont systemFontOfSize:20];
        NSLog(@"display font %@ and %@", fontDisplay.fontName, fontDisplay.familyName);
        NSLog(@"text font %@ and %@", fontText.fontName, fontText.familyName);

         

        On ios12, we get two distinct fonts:

         

        display font .SFUIText and .SF UI Text
        text font .SFUIDisplay and .SF UI Display

         

        On ios13, we get one font:

         

        display font .SFUI-Regular and .AppleSystemUIFont
        text font .SFUI-Regular and .AppleSystemUIFont

         

        On ios12, we used to be able to use "UIFont fontWithSize" with either fontDisplay and fontText to get a small point version of Display or a large point version of Text to support what the authors have created. On ios 13, this is no longer possible.

         

        Are they any workarounds for this new behavior?

         

        A secondary question is related to the new SF Symbol glyphs. We have attempted to use them with a NSAttributedString and CTTypesetterCreateWithAttributedString and been unsuccessful.