Skip to content

Instantly share code, notes, and snippets.

@colejd
Created September 16, 2019 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colejd/da040f8656cd3055d0c460464ac9f582 to your computer and use it in GitHub Desktop.
Save colejd/da040f8656cd3055d0c460464ac9f582 to your computer and use it in GitHub Desktop.
San Francisco Internal Font Variants (dumped from Xcode 10)
.SFUI-Black
.SFUI-BlackItalic
.SFUI-Bold
.SFUI-BoldItalic
.SFUI-Heavy
.SFUI-HeavyItalic
.SFUI-Light
.SFUI-LightItalic
.SFUI-Medium
.SFUI-MediumItalic
.SFUI-Regular
.SFUI-RegularItalic
.SFUI-Semibold
.SFUI-SemiboldItalic
.SFUI-Thin
.SFUI-ThinItalic
.SFUI-Ultralight
.SFUI-UltralightItalic
.SFUIDisplayCondensed-Black
.SFUIDisplayCondensed-Bold
.SFUIDisplayCondensed-Heavy
.SFUIDisplayCondensed-Light
.SFUIDisplayCondensed-Medium
.SFUIDisplayCondensed-Regular
.SFUIDisplayCondensed-Semibold
.SFUIDisplayCondensed-Thin
.SFUIDisplayCondensed-Ultralight
.SFUIMono-Bold
.SFUIMono-BoldItalic
.SFUIMono-Heavy
.SFUIMono-HeavyItalic
.SFUIMono-Light
.SFUIMono-LightItalic
.SFUIMono-Medium
.SFUIMono-MediumItalic
.SFUIMono-Regular
.SFUIMono-RegularItalic
.SFUIMono-Semibold
.SFUIMono-SemiboldItalic
.SFUIRounded-Black
.SFUIRounded-Bold
.SFUIRounded-Heavy
.SFUIRounded-Light
.SFUIRounded-Medium
.SFUIRounded-Regular
.SFUIRounded-Semibold
.SFUIRounded-Thin
.SFUIRounded-Ultralight
.SFUITextCondensed-Bold
.SFUITextCondensed-Heavy
.SFUITextCondensed-Light
.SFUITextCondensed-Medium
.SFUITextCondensed-Regular
.SFUITextCondensed-Semibold
.SFUI-BoldG4
.SFUI-MediumG1
.SFUI-LightG3
.SFUI-UltralightG2
.SFUI-Ultrathin
.SFUIRounded-RegularG4
.SFUIRounded-SemiboldG3
.SFUIRounded-BoldG2
.SFUI-UltralightG3
.SFUIRounded-ThinG4
.SFUIRounded-RegularG1
.SFUI-HeavyG4
.SFUIRounded-UltrathinG4
.SFUI-BoldG3
.SFUI-UltralightG4
.SFUI-ThinG4
.SFUI-UltrathinItalic
.SFUIRounded-LightG2
.SFUI-RegularG2
.SFUI-RegularG4
.SFUI-HeavyG1
.SFUI-MediumG2
.SFUIRounded-UltralightG4
.SFUIRounded-BoldG3
.SFUIRounded-UltralightG2
.SFUIRounded-HeavyG3
.SFUIRounded-MediumG2
.SFUISymbols-Regular
.SFUI-SemiboldG1
.SFUI-SemiboldG2
.SFUI-BoldG2
.SFUI-SemiboldG3
.SFUI-ThinG3
.SFUI-SemiboldG4
.SFUI-LightG2
.SFUIRounded-UltrathinG1
.SFUIRounded-RegularG2
.SFUIRounded-BoldG4
.SFUIRounded-SemiboldG2
.SFUI-HeavyG3
.SFUI-MediumG3
.SFUI-BoldG1
.SFUIRounded-LightG3
.SFUI-ThinG2
.SFUI-UltrathinG1
.SFUIRounded-MediumG4
.SFUIRounded-HeavyG4
.SFUIRounded-ThinG1
.SFUIRounded-HeavyG1
.SFUIRounded-MediumG1
.SFUI-LightG4
.SFUI-UltrathinG2
.SFUIRounded-UltrathinG2
.SFUI-UltrathinG3
.SFUIRounded-SemiboldG4
.SFUI-RegularG1
.SFUI-RegularG3
.SFUI-UltrathinG4
.SFUIRounded-Ultrathin
.SFUIRounded-RegularG3
.SFUI-ThinG1
.SFUI-LightG1
.SFUI-MediumG4
.SFUIRounded-UltralightG3
.SFUIRounded-ThinG2
.SFUIRounded-UltralightG1
.SFUIRounded-SemiboldG1
.SFUIRounded-LightG4
.SFUI-HeavyG2
.SFUIRounded-LightG1
.SFUIRounded-UltrathinG3
.SFUIRounded-MediumG3
.SFUI-UltralightG1
.SFUIRounded-BoldG1
.SFUIRounded-ThinG3
.SFUIRounded-HeavyG2
.sfuirounded-ultrathing1
.sfuirounded-ultralight
.sfui-semibold
.sfuimono-lightitalic
.sfuirounded-thing2
.sfuidisplaycondensed-bold
.sfuimono-heavy
.sfui-mediumg2
.sfuirounded-ultralightg3
.sfui-boldg2
.sfuidisplaycondensed-thin
.sfuirounded-lightg4
.sfuirounded-mediumg3
.sfuirounded-bold
.sfui-ultrathing4
.sfuirounded-semiboldg4
.sfui-semiboldg2
.sfuimono-semibold
.sfuirounded-ultralightg1
.sfuirounded-mediumg1
.sfui-ultralightg1
.sfuirounded-ultrathing4
.sfui-heavyg1
.sfuirounded-boldg3
.sfuimono-heavyitalic
.sfui-ultralightitalic
.sfui-ultralightg4
.sfui-regular
.sfui-boldg1
.sfui-heavyg4
.sfuidisplaycondensed-regular
.sfuirounded-heavyg3
.sfui-regularg3
.sfuisymbols-regular
.sfuirounded-regularg4
.sfuirounded-semiboldg3
.sfui-lightg1
.sfui-ultrathing3
.sfuimono-regularitalic
.sfui-lightg4
.sfui-heavy
.sfuirounded-light
.sfuirounded-regularg3
.sfuirounded-lightg3
.sfuitextcondensed-regular
.sfuitextcondensed-light
.sfuimono-light
.sfui-regularitalic
.sfui-semibolditalic
.sfuirounded-semibold
.sfuirounded-regularg2
.sfuirounded-thing3
.sfui-mediumg3
.sfuirounded-semiboldg2
.sfuimono-bolditalic
.sfui-ultrathing2
.sfuirounded-ultrathing3
.sfuimono-mediumitalic
.sfuirounded-regularg1
.sfuirounded-boldg1
.sfui-bolditalic
.sfuidisplaycondensed-semibold
.sfui-thing4
.sfuirounded-regular
.sfuidisplaycondensed-ultralight
.sfui-heavyitalic
.sfuirounded-ultralightg4
.sfuirounded-heavyg2
.sfuimono-regular
.sfui-ultralightg3
.sfuirounded-semiboldg1
.sfui-regularg2
.sfui-heavyg3
.sfuitextcondensed-heavy
.sfuirounded-mediumg4
.sfui-semiboldg3
.sfuirounded-boldg4
.sfui-lightitalic
.sfui-ultrathing1
.sfui-ultrathinitalic
.sfuirounded-ultralightg2
.sfuidisplaycondensed-heavy
.sfuirounded-lightg2
.sfui-ultrathin
.sfuimono-medium
.sfuirounded-mediumg2
.sfui-lightg3
.sfui-ultralight
.sfuimono-semibolditalic
.sfuirounded-ultrathin
.sfuidisplaycondensed-black
.sfui-thing3
.sfuirounded-thing1
.sfui-mediumg1
.sfuidisplaycondensed-medium
.sfuitextcondensed-medium
.sfui-black
.sfuirounded-heavy
.sfui-semiboldg1
.sfuirounded-ultrathing2
.sfuitextcondensed-bold
.sfui-medium
.sfui-boldg4
.sfuirounded-thin
.sfui-mediumg4
.sfuirounded-thing4
.sfui-thinitalic
.sfuirounded-heavyg1
.sfui-thing2
.sfuirounded-medium
.sfui-mediumitalic
.sfui-regularg1
.sfuirounded-boldg2
.sfui-light
.sfui-ultralightg2
.sfuitextcondensed-semibold
.sfui-blackitalic
.sfui-heavyg2
.sfuirounded-lightg1
.sfui-thin
.sfui-boldg3
.sfuimono-bold
.sfui-lightg2
.sfui-regularg4
.sfuirounded-black
.sfui-thing1
.sfuirounded-heavyg4
.sfui-semiboldg4
.sfui-bold
.sfuidisplaycondensed-light
.sfuitext
.sfuidisplay-bolditalic
.sfuidisplay
.sfuidisplay-semibolditalic
.sfuitext-medium
.sfuitext-lightitalic
.sfuitext-semibolditalic
.sfuitext-mediumitalic
.sfuidisplay-thin
.sfuitext-light
.sfuidisplay-mediumitalic
.sfuidisplay-heavy
.sfuidisplay-thinitalic
.sfuitext-bolditalic
.sfuidisplay-ultralightitalic
.sfuidisplay-light
.sfuidisplay-semibold
.sfuidisplay-heavyitalic
.sfuidisplay-italic
.sfuitext-heavy
.sfuitext-bold
.sfuidisplay-blackitalic
.sfuitext-heavyitalic
.sfuidisplay-ultralight
.sfuitext-italic
.sfuidisplay-lightitalic
.sfuidisplay-bold
.sfuidisplay-medium
.sfuitext-semibold
.sfuidisplay-black
/System/Library/Fonts/CoreUI/SFUIRounded.ttf
/System/Library/Fonts/CoreUI/SFUITextCondensed-Light.otf
/System/Library/Fonts/CoreUI/SFUIItalic.ttf
/System/Library/Fonts/CoreUI/SFUIMonoItalic.ttf
/System/Library/Fonts/CoreUI/SFUI.ttf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Semibold.otf
/System/Library/Fonts/CoreUI/SFUIMono.ttf
/System/Library/Fonts/CoreUI/SFUITextCondensed-Semibold.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Regular.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Black.otf
/System/Library/Fonts/CoreUI/SFUITextCondensed-Heavy.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Bold.otf
/System/Library/Fonts/CoreUI/SFUITextCondensed-Regular.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Medium.otf
/System/Library/Fonts/CoreUI/SFUITextCondensed-Bold.otf
/System/Library/Fonts/Core/SFUISymbols-Regular.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Heavy.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Ultralight.otf
/System/Library/Fonts/CoreUI/SFUITextCondensed-Medium.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Thin.otf
/System/Library/Fonts/CoreUI/SFUIDisplayCondensed-Light.otf
.SFUIDisplay-Medium
.SFUIDisplay-Light
.SFUIDisplay-Bold
.SFUIDisplay-Thin
.SFUIDisplay-UltralightItalic
.SFUIText-SemiboldItalic
.SFUIDisplay-Italic
.SFUIDisplay-BlackItalic
.SFUIText-LightItalic
.SFUIText-Italic
.SFUIText-Medium
.SFUIText-Heavy
.SFUIDisplay-SemiboldItalic
.SFUIDisplay-HeavyItalic
.SFUIDisplay
.SFUIText-HeavyItalic
.SFUIDisplay-MediumItalic
.SFUIDisplay-Ultralight
.SFUIDisplay-Semibold
.SFUIDisplay-Black
.SFUIText-Light
.SFUIDisplay-LightItalic
.SFUIText
.SFUIDisplay-ThinItalic
.SFUIText-Bold
.SFUIDisplay-Heavy
.SFUIText-MediumItalic
.SFUIText-Semibold
.SFUIText-BoldItalic
.SFUIDisplay-BoldItalic
@colejd
Copy link
Author

colejd commented Sep 16, 2019

These are string dumps of all the font strings I found in Xcode 10, using the same technique and file as in here. Specifically, I'm dumping all the strings in libGSFontCache.dylib for iOS and I'm looking for any references to .SFUI.

Theoretically you could use these in conjunction with UIFont(name:size:) to access internal variants of San Francisco.

@caichunjian520
Copy link

I try to use UIFont(name:size:) with .SFUI-ThinG2. So here I wrote
UIFont(name: ".SFUI-ThinG2", size: fontSize)

But the font is really wired which is not my want. Any help?

@colejd
Copy link
Author

colejd commented Jun 8, 2021

@caichunjian520 these are internal font names, so there will probably be a lot of weirdness. I don't really know enough to help with your use case, but maybe re-dumping the file for a newer Xcode version will give you more, newer font variants to try.

Also keep that when you use systemFont(ofSize:), the OS will internally choose one of the above variants based on the size you request and the OS you're running. This may mean that certain font variants aren't able to render correctly at certain sizes, or aren't available at all for the OS you're on. Try playing with size, then pick another variant if you can't make it work at all.

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