Typography

RSS for tag

Implement good typography technique, make the most of the advanced features in Apple system fonts, and integrate custom fonts.

Posts under Typography tag

21 Posts
Sort by:
Post marked as solved
2 Replies
199 Views
I'm building a settings page and simply want an active preview display embedded into a larger Font Settings View that has: editable text (so TextField) rendering of corresponding Apple provided TextStyle (so ask to keep with DynamicType guidelines) struct PairingDisplayView: View { @Binding var displayStyle: Font.TextStyle @State var displaySample = "This is a title" @State var bodySample = "Here's some body text to elaborate the font paring preview" var body: some View { VStack(alignment: .leading) { Group { TextField( "display", text: $displaySample ) .font(displayStyle) TextField( "body", text: $bodySample ) .font(.body) } .padding() } .overlay( RoundedRectangle(cornerSize: CGSize(width: 20, height: 20)) .strokeBorder() .foregroundColor(.cyan) ) .padding() } } I have a @State var selectedSystemStyle: Font.TextStyle = .caption2 that later feeds the said Binding... but I can't get over how confusing it is to me that a Font.TextStyle is not acceptable for the .font() modifier considering it's a Font and I appropriately call .font(displayStyle) Am I missing something fundamental here?
Posted Last updated
.
Post not yet marked as solved
0 Replies
245 Views
Xcode 15 doesn't show all fonts that you have in your Font Book. I need to use a japanese font for my app. i've download it in my Mac's Font Book but I can't use it. How can i fix it? How can I use japanese font in Xcode 15?
Posted
by Rufy.
Last updated
.
Post not yet marked as solved
0 Replies
277 Views
Hi All, I am having some issues with my website font on safari. It is showing the correct font, but it appears too bold. If I zoom into the site the font then appears correct but at full screen it is showing very bold. Any ideas what the issue could be? Kindest Liam
Posted Last updated
.
Post not yet marked as solved
0 Replies
276 Views
Hello! I am developing an ebook reader iOS app that uses c/c++ codec as a page renderer. The codec uses TrueType as a font rendering engine that requires access to .ttf (or .ttc) files. Currently, I supply TrueType with fonts embedded in the app package, so they lay within the app sandbox. The codec supports the whole unicode plane and many languages that ebooks may use, but the fonts I supply don't have some of the important glyphs (i.e. katakana or hangul). I see that iOS has its own font storage, located in /System/Library/Fonts/ directory. The codec is able to parse this directory and read .ttf files located inside, using these fonts as a fallback in the case when the supplied fonts can't draw certain glyphs. I use opendir and fopen(in "rb" mode) as a way to read the data, and it works well. Does this type of access to the system directory violate the sandbox rule for an app distribution, and, if yes, is there a way to get access to stored .ttf files not violating the mentioned rule?
Posted
by Tarasus.
Last updated
.
Post not yet marked as solved
0 Replies
298 Views
Hey I'm struggling to get to use Custom fonts to work In Xcode 15, I have installed 3 fonts that I downloaded from googlefonts.. I'm new to Xcode and can't seem to get the coding right or may have done something wrong when installing them however, it isn't throwing an error code, it's just not showing the typeface. font(.custom("IslandMoments-Regular2", size: 60, relativeTo: .title)) (This is the code I have been using) Thanks, Caitlin
Posted
by CaityRose.
Last updated
.
Post not yet marked as solved
4 Replies
4.5k Views
I'm confused about the SF Pro fonts. Can these be used in our apps? I tried pasting characters from SF Pro into a label, but was unable to get them to display properly. "SF Pro" doesn't appear in the list of available fonts in Xcode. If these are not intended to be used by app developers, then what is their purpose? Are "SF Symbols" different that SF Pro? What about the list of icons that appears in the "Symbols Library" in Xcode? There are so many different sources of symbols and icons, it is very confusing. If any of these sources is OK to use in an iOS app, is it also OK to export them for use in the event that business needs require me to create an alternate version of my app for some hypothentical non-iOS platform? Thanks, Frank
Posted
by flarosa.
Last updated
.
Post not yet marked as solved
0 Replies
443 Views
I take these websites to test COLR/CPAL(v0) format color font: https://yoksel.github.io/color-fonts-demo/ https://pixelambacht.nl/chromacheck/ In my iOS 17 device, both websites show unsupported of COLR/CPAL (v0) color font, however, on my other iOS 16 devices, it is supported. COLR/CPAL (v0) color font format is widely supported on mainstream browsers currently, from Blink (Chrome) to WebKit (Safari desktop), why does iOS deprecate it?
Posted
by chingru.
Last updated
.
Post marked as solved
18 Replies
4.8k Views
I am having issues with the Font Sizes on iOS17 Beta. When running the app in the simulator and on the device, the font weight for my app suddenly changed. For example, it has always been "Regular" and it changed to "Semibold" even thought its set to be in "Regular". I am also adding a new label, and no matter what I do to the size, it does not change. On the storyboard is shows the correct size I set, but then running it on the simulator or in my device running iOS17 Beta it shows smaller or the the regular size of 17. Is anyone else experiencing this issue?
Posted Last updated
.
Post not yet marked as solved
0 Replies
367 Views
Hi guys, I have imported font (I have added in info.plist) and I use this code to import in all of project: struct swim_targetApp: App { var body: some Scene { WindowGroup { ContentView() .environment(\.font, Font.custom("SFCompactRounded-Regular", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Ultralight", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Thin", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Light", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Medium", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Semibold", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Bold", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Heavy", size: 16)) .environment(\.font, Font.custom("SFCompactRounded-Black", size: 16)) } } } But .title, .title3, navigationBarTitle don't use my custom font (ex 1, 2 in screenshot), but in another parts working fine (ex 3 in screenshot). Can you help me? Thank you ;)
Posted
by gatfil.
Last updated
.
Post not yet marked as solved
0 Replies
341 Views
Our company's name is HealthTunes (one word). When users try to find our APP on the iOS APP store a Health Tunes -Health[space]Tunes- does not yield ANY result - How can we allow a find, with that particular, common spelling error?
Posted Last updated
.
Post not yet marked as solved
0 Replies
447 Views
Dear experts, I get glyphs from the system font using CTFontGetGlyphsForCharacters, something like this: UIFont* uifont = [UIFont monospacedDigitSystemFontOfSize: s weight: w]; CTFontRef font = (__bridge CTFontRef)uifont; CTFontGetGlyphsForCharacters(font, ....); The characters that I ask for are basically latin-1 plus a few others. The app is not localised for Chinese. When I change the phone's default language to Chinese, this code gets glyphs for most characters OK but it fails for a few punctuation symbols: 91 = [ 93 = ] 183 = middle dot 8220 = left double curly quote 8221 = right double curly quote Can anyone guess what's going on here? What's special about those characters? Thanks, Phil.
Posted
by endecotp.
Last updated
.
Post not yet marked as solved
0 Replies
623 Views
Apple's Weather app StandBy widget uses a font for the temperature that I can't seem to find how to access. As far as I can tell, it is some variant of SF Pro, but it isn't the default and it isn't rounded. To my eye the slightly rounded corners look significantly better in places where the text is really large. Does anyone have any idea how to specify the mystery font as seen in the included image?
Posted
by jcgoforth.
Last updated
.
Post not yet marked as solved
1 Replies
1.6k Views
Hello, The system font for iOS is SF-Pro, as mentioned here: https://developer.apple.com/design/human-interface-guidelines/typography. "SF Pro is the system font in iOS and iPadOS." However, when I print the font, created with `[UIFont systemFontOfSize:18.0 weight:UIFontWeightRegular], I get the following info: <UICTFont: 0x114f1f400> font-family: ".SFUI-Regular"; font-weight: normal; font-style: normal; font-size: 18.00pt. If SF-Pro is the system font , shouldn't the font family be some variation of SFPro? How come it prints font-family: ".SFUI-Regular" Thank you
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
Can I use SF UI Text font in a web application? If it is legal to use the font on a web application then how can I get a license for the font? I could not find the font on the Apple fonts.
Posted
by aswath.
Last updated
.
Post not yet marked as solved
0 Replies
540 Views
I got a sample code as following that worked correctly on iOS 14 and iOS 15. But it seems to not work at iOS16, it there something missing on iOS16? func showFontPicker(_ sender: Any) { let fontConfig = UIFontPickerViewController.Configuration() fontConfig.includeFaces = true fontConfig.filteredLanguagesPredicate = UIFontPickerViewController.Configuration.filterPredicate(forFilteredLanguages: ["zh-Hant"]) let fontPicker = UIFontPickerViewController(configuration: fontConfig) fontPicker.delegate = self self.present(fontPicker, animated: true, completion: nil) }
Posted Last updated
.
Post marked as solved
3 Replies
2.2k Views
When I run SF Symbols, I get a "Fonts Mismatch" error. It claims that newer versions of all the SF-Pro-[Display/Rounded/etc.] family (save the italics ones) are available. The link it sends me to apparently still has the older versions. I've deleted the 'older' versions of the font files and then run the SF-Pro font installer off the downloaded disk image; error just continues to appear.
Posted Last updated
.
Post not yet marked as solved
1 Replies
736 Views
Hi, guys。 When I used SwiftUI to build the app, I used a custom font in the project to display emojis (the font ttf file has 23.7M). When using custom fonts, the code is as follows: ContentView will load slowly。 struct ContentView: View { var body: some View { NavigationView { List { ForEach(0..<100, id: \.self) { i in Text(verbatim: "\u{1fa84}") .font(.custom("NotoColorEmoji", size: 18)) .foregroundColor(.secondary) } } .frame(height: 400) } } } It takes about 3 seconds for the app to start and display the page. If commented out .font(.custom("NotoColorEmoji", size: 18)), everything will be fine So how to improve performance or preload the ttf font file? I wrote a demo in here,Is there any good way to solve this problem?
Posted
by coderyjy.
Last updated
.