Skip to main content
Filter by
Sorted by
Tagged with
3 votes
2 answers
139 views

I've searched all over and can't seem to find a definitive (current) answer to this question. I have a UILabel set up to use dynamic font sizing for accessibility reasons. It worked quite well with ...
Wasko Ltd's user avatar
0 votes
1 answer
57 views

I have logic that lets the user change Font.Design, which works fine for SwiftUI views, and also the navigation bar (logic included below). But it does not reload or re-apply to existing TabView ...
Henrik's user avatar
  • 4,084
0 votes
1 answer
61 views

When setting font in configureSpeedLabel and configureProgressLabel below, if I set font using UIFont speedLabel.font = UIFont(name: "TimesNewRomanPSMT", size: 24) then the progress track ...
brunshte's user avatar
  • 331
-1 votes
1 answer
91 views

I am currently working with the UITextView and now I wanted to set the font there. As far as I can see, I can only apply the UIFont and not the Font class itself. I found several guides to convert a ...
Strassenrenner's user avatar
0 votes
1 answer
70 views

In code , I can define a UILabel has a dynamic font like this, and I change this body TextStyle font from default size to 30. label.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: UIFont....
ximmyxiao's user avatar
  • 2,923
0 votes
1 answer
53 views

How to use OpenType feature tags (eg. cv11) with UIFont in Swift?
Martin S's user avatar
  • 378
-1 votes
1 answer
426 views

The system font SF Mono has two variations for the number zero (0) and number one (1). By default, a slashed zero character is displayed for text with system font SF Mono. In the MacOS Font Book, both ...
user4806509's user avatar
  • 3,011
0 votes
0 answers
92 views

I am using SWiftUI and have a video editing application . A person selects a video and we display it along with the date the video was taken . The initial overlay is size 14 and if the person saves ...
user1591668's user avatar
  • 2,935
0 votes
0 answers
55 views

My font file name is "CONSELHEIRO.otf". It is located in a folder called 'fonts'. I have added this file to Xcode, and made sure that it was indeed added to the target. I added it in the &...
user717452's user avatar
3 votes
2 answers
4k views

iOS 16 allows to install custom fonts. They are listed in Settings → General → Fonts. I too want to display a list of the installed fonts in my app. I did try using UIFont.familyNames as well as ...
ixany's user avatar
  • 6,200
0 votes
0 answers
35 views

I am having an issue with CGFont not being deallocated when used within a TableView, minimal example of what I'm trying to do is at follow: extension FontPickerPageViewController: ...
Kex's user avatar
  • 8,687
1 vote
0 answers
161 views

Swift application. I have a Theme class declared including the following: class Theme { enum Font { static let header1 = UIFont(name: "IBM Plex Sans Bold", size: 32)!...
David's user avatar
  • 2,810
1 vote
1 answer
143 views

I have created a custom renderer as i wanted to use "SF Pro Display" font and using UIFont.SystemFontOfSize(size , weight) i get output as .SFUI-weight .Below is the code i used for custom ...
Ruchira's user avatar
  • 101
0 votes
1 answer
1k views

I want to change my text in textview to BOLD and Italic on button click; but when I do this the custom font which is I am using for my textview also changed; but I want to use custom font. Following ...
noorapps's user avatar
2 votes
1 answer
1k views

I want to set a custom font for inline widget text. I put the custom font to the accessory Rectangular and it's working well however, I am not able to set the font to the accessory Inline widget. Here ...
Ravi Kotadiya's user avatar
2 votes
1 answer
232 views

I use custom fonts in my iOS application and have setup the fonts like so: private enum MalloryProWeight: String { case book = "MalloryMPCompact-Book" case medium = "MalloryMPCompact-...
Robert Clegg's user avatar
  • 7,368
0 votes
1 answer
589 views

I am trying to add 3 different custom font to 3 different target how can i add that font. one storyboard have 3 labels which has bold, semi-bold, regular font weight with different size. i have added ...
Asmita's user avatar
  • 497
1 vote
0 answers
109 views

Context: Im observing a bigger down size of my text when using .adjustsFontSizeToFitWidth on iOS15 vz iOS14 Xcode 13 but i haven't find any release notes explaining why. My observations are this: ...
Misael Landeros's user avatar
0 votes
1 answer
56 views

I am trying to see if there is a proper method to change the height of the text, without changing the width - more akin to vertical compression. Photoshop lets you do it as shown below: There are ...
Gizmodo's user avatar
  • 3,024
-2 votes
1 answer
470 views

We already have project in which already added fonts is working without adding plist file but we want to add another fonts which is not working without adding in plist?
Saroj Kumar's user avatar
0 votes
1 answer
30 views

I have a UIView with a UILabel for which, I'd like allow the user to dynamically change the font size. The code below almost works, but the problem is that after the new UIFont is assigned to the ...
Dale's user avatar
  • 5,997
2 votes
2 answers
908 views

I followed nearly every tutorial and stack overflow questions and still couldn't get my fonts to work. I downloaded Montserrat font from Google fonts I added the folder to my project with Copy items ...
Ralph Lee's user avatar
  • 117
1 vote
1 answer
52 views

There are a dozen answers to how to set the font of a UISegmentedControl, but I want to determine what font is being used, without having been manually set. override func viewDidLoad() { super....
bshirley's user avatar
  • 8,364
0 votes
0 answers
409 views

I am using Font from UIDocumentPickerViewController and I am successfully registered font and also get UIFont.families. But once I kill the application and then reopen application then I can not get ...
Kamlesh Shingarakhiya's user avatar
0 votes
0 answers
182 views

I have a textview in my application. User can select a preferred English font from a dropdown and then type in the textView. I have 3 more buttons (bold, italic and underline) for text formatting ...
S.Basnagoda's user avatar
1 vote
2 answers
819 views

Aim: I would like to know how to use a system font in my SwiftUI app with a custom size that supports dynamic size (that changes when the user changes the text size on the device, font size changes ...
user1046037's user avatar
  • 17.9k
0 votes
1 answer
718 views

I want to create a UIFont that is both black in weight (heavier than bold) and italic, without hardcoding any font names or anything. All my attempts have came up short. You can do it via UIFont....
christianselig's user avatar
0 votes
2 answers
475 views

I'm now building a listview to display fonts from the UIFonts framework. However, for using UIPasteboard.general.string, the fonts are not copied to the clipboard and only the plain text is ...
21.kaw's user avatar
  • 593
3 votes
0 answers
469 views

I have a UITextView and its attributedText can have different fonts, fonts sizes and colours as shown in the image (left). User can resize textView by dragging from resize handles (vertically/...
S.Basnagoda's user avatar
0 votes
0 answers
222 views

I am getting the system small caps font using: let systemFont = UIFont.systemFont(ofSize: 16.0, weight: UIFont.Weight.regular) let smallCapsDesc = systemFont.fontDescriptor....
a.wip's user avatar
  • 69
3 votes
0 answers
1k views

Is there any way to set the lineHeight of a UIFont? I know that NSAttributedString can be used to achieve this, but this doesn't suit my case, I would really like to just manipulate font of a UILabel ...
Damian Dudycz's user avatar
1 vote
1 answer
825 views

In iOS 13 and low I got Font.Weight using this extension for UIFont var weight: UIFont.Weight { guard let traits = fontDescriptor.object(forKey: .traits) as? [UIFontDescriptor.TraitKey: Any], let ...
Artem's user avatar
  • 13
0 votes
0 answers
960 views

I have some UIFonts like this: let regularFont = UIFont.systemFont(ofSize: 18, weight: .regular) let mediumFont = UIFont.systemFont(ofSize: 18, weight: .medium) I use them in my UIKit components ...
de.'s user avatar
  • 8,787
3 votes
1 answer
738 views

I have created small project with UIScrollView, UIView and UITextView (hierarchy is also the same.). UIView display as red color and UITextView display as blue color. Then I have added UIFont to with ...
Dileepa Chandrasekara's user avatar
1 vote
0 answers
267 views

Given a UIFont instance, how can I determine what system design it is using? This is the value UIFontDescriptor.SystemDesign which can be one of: default, monospaced, rounded or serif. I see how to ...
David James's user avatar
  • 2,468
1 vote
1 answer
460 views

How can I test the given UIFont.TextStyle for a UIFont with a dynamic font size via UIFontMetrics in XCTest unit testing? var myDynamicFont: UIFont { let font = UIFont(name: "Font-Name", ...
SchmidtFx's user avatar
  • 636
0 votes
0 answers
67 views

I've downloaded and installed a font in my computer and using it as a font for buttons' texts in my application. I wanted to know if the all the fonts used in an application are automatically embedded ...
Somanna's user avatar
  • 346
8 votes
2 answers
3k views

I'm using a custom font and somehow the rendering screws up the line height, potentially because of misconfigured descent or leading (?), so that g's and j's are cut off in the last line of the ...
marius's user avatar
  • 7,796
-1 votes
1 answer
665 views

Can you dynamically load custom fonts in iOS similar to how you do in Javascript? I have seen few questions about this but they are quite outdated or don't really answer the question. I don't want to ...
久美子's user avatar
  • 131
0 votes
0 answers
136 views

I wrote code that can simply return UIFont which can used like this myLabel.font = UIFont.AppleSDGothicNeo.medium.of(20) And actual implementation is like this extension UIFont { enum ...
naljin's user avatar
  • 645
0 votes
1 answer
416 views

After I learned the system default font in iOS13 is SF Pro according to apple's development guidance. I wandering [UIFont systemFontOfSize:18] might can be replayced by [UIFont fontWithName:@"...
BenArvin's user avatar
8 votes
1 answer
3k views

I need to write a custom font picker view in my ios project. when user click on font family name, i need to display fonts which are in particular family, i used name as particular text style in the ...
Dileepa Chandrasekara's user avatar
3 votes
1 answer
1k views

A UIFont can easily be setup via the font descriptor, e.g. let settings: [UIFontDescriptor.FeatureKey: Int] = [ .featureIdentifier: kStylisticAlternativesType, .typeIdentifier: 2] ...
benrudhart's user avatar
  • 1,524
3 votes
1 answer
2k views

How can I set a font for a label heavy AND italic? Examples from SO does not work: labelCurrentDate.font = UIFont(descriptor: UIFont.systemFont(ofSize: 32, weight: .black).fontDescriptor....
JohnDole's user avatar
  • 565
1 vote
0 answers
181 views

I'm using Averta font series in my iOS app. I'm trying to show "₿" symbol in Averta-Bold. When there is unsupported character, iOS show it in default system font. I don't have any problem with showing ...
Emre Önder's user avatar
  • 2,547
1 vote
1 answer
260 views

I'd like to get an italic version of a light font, for example "HelveticaNeue-Light". Using a fontDescriptor gives me the italic version of the 'regular' "Helvetica Neue" instead of the italic "...
Marco's user avatar
  • 340
1 vote
0 answers
280 views

On the update of iOS 13.4, the top & bottom spacing of the NSAttributedString lines not the same not. This is the same code run on iOS 13.3 & iOS 13.4. iOS 13.3 iOS 13.4 Here is the code ...
user avatar
59 votes
4 answers
30k views

I have a UIViewRepresentable with a UITextView and I want to set the font on the UITextView using the current Font from the SwiftUI environment. I just need a simple init like: UIFont(_ swiftUIFont: ...
Richard Venable's user avatar
1 vote
0 answers
46 views

I am creating a UIView programtically that is scaled and translated to the center of my view. I am then adding subviews (UILabel's) to that view programatically and the issue I have encountered is ...
Onicha21's user avatar
  • 159
4 votes
0 answers
658 views

I am creating an iOS app in which different fonts must be used for different languages. I am trying to do this by using systemFont everywhere in the app and at runtime, changing what systemFont ...
user avatar

1
2 3 4 5
15