Skip to content

Default font changes in Xcode 11 #33

Open

Description

@sevgjan

Hi all,
Why it switches to TimesNewRomanPSMT font in Xcode 11?

Thanks

Activity

  1. changed the title [-]Font changes in Xcode 11[/-] [+]Default font changes in Xcode 11[/+] on Oct 2, 2019
  2. evermeer commented on Oct 3, 2019

    @evermeer
    Owner

    AttributedTextView does not change any attributes by itself. It just takes the UILable, UITextview or NSAttributed text and applies whatever you specified. Indeed Apple made some changes in Xcode 11

    As per Apple's official document https://developer.apple.com/fonts/

    SF Pro:

    This sans-serif typeface is the system font for iOS, macOS, and tvOS, and includes a rounded variant. It provides a consistent, legible, and friendly typographic voice.

    SF Compact:

    This sans-serif typeface is the system font for watchOS, and includes a rounded variant. It suits a wide range of content and is easily legible in a variety of contexts.

    So we need to download and install SF Pro font and set UILabel attributed string font style with SF Pro Text Regular 18.0 to keep the same font style like Plain text have.

  3. sevgjan commented on Oct 11, 2019

    @sevgjan
    Author

    Quick update
    In Attributer.swift I was changing:
    open func font(_ font: UIFont?) -> Attributer { if font != nil { return fontName(font!.fontName.replacingOccurrences(of: ".", with: "")).size(font!.pointSize) } return self }
    without the dot (.) and it worked for font, it was not changing to TimesNewRoman, but it's not working for font-weight.

  4. added a commit that references this issue on Sep 30, 2020
  5. evgeniy-bizhanov commented on May 20, 2021

    @evgeniy-bizhanov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions