I added an empty file called notes.txt to my project in Xcode 5. It is a list of comments that start with either an asterisk or hyphen, along with some blank lines. While editing it initially, the font size was fine. But after viewing some source files and coming back to notes.txt, the font was suddenly noticeably smaller.
I'm not seeing any font settings in the File Inspector in the Utilities view on the right side of the Xcode window. The file type is "Default - Plain Text". I tried changing this to "Objective-C Source" to see if that would have any effect, but it didn't.
The theme I'm using in Xcode's Fonts & Colors pref pane is Midnight, with Menlo Regular - 14.0 for the source editor, and Menlo Regular - 13.0 for the console (but I'm about to set that to 14.0 as well). However, the notes.txt file seems to be using a font of size 10 or 11. How can I fix this?
Edit: I just added a new line to the file, and I can see that the smaller text is in fact a different font. In the picture below, line 23 is old text and line 25 is new text. Line 25 looks like the Menlo font that I'd expect.
Choose Show SwiftUI Inspector and then you can edit the text/font properties.
To change the font or the size of a UILabel in a Storyboard or . XIB file, open it in the interface builder. Select the label and then open up the Attribute Inspector (CMD + Option + 5). Select the button on the font box and then you can change your text size or font.
I think its a bug in Xcode 5.0
You can temporary fix it by right click on the text file -> open as -> preview, and then right click -> open as -> source code again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With