How to increase font size in the Xcode editor?
Solution 1
Update! - Behold Xcode 9 to the rescue! Now you can use cmd + to increase the fonts with Xcode 9. It took 5 Major releases for you to get it, Apple! But better late than never.
figured it out - however it was not very intuitive.
First some Pain Points
When You try to change the font size directly using edit -> format -> font, nothing happens! - Not a good UX ... moreover why play dumb when you can tell user that they are using default or "System-owned" theme and they cannot change it? - Bad Design and more bad UX ... Why keep this option (Cmd t) alive, which by the way is most standard way to increase font size across most well behaved mac apps, if you do not want user to change the font this way?
In Xcode preferences, when you try to change the font size by clicking on "fonts and colors", thats when XCode gives a pop-up saying what needs to be done. Also making a duplicate and then changing the fonts and colors is a lot of work rather than giving a button that says "Restore to Defaults" if Apple is so worried about the user messing up the default settings!
The solution is that - you need to duplicate the theme and then modify the copy you just made and apply that copy - phew!
Solution 2
For Xcode 4.1
Still a huge pain. Poor UI design (But my mindset does not seem to match the mindset of software engineers that make 100+ character variable and method names. Enough of my complaining)
I'll modify a previous post for the current version.
- Close any projects you have open in Xcode (Otherwise the Font window will be inaccessible while a project is open.)
- Go to XCode > Preferences > Fonts & Color
- From the 'Theme' box select the theme you want to modify (or select the theme you want to modify and click the "+" button at the bottom of the theme list to clone it first for backup, for there is no undo option)
In the source editor box there is a list of types of text that you may set the font for: Plain text Comments Documentation Comments . . .
Select any or all items from the source editor list and the name and size of the font for that particular text will show up in the 'Font' window below the 'Source Editor' window. (If you happen to skip highlighting one of these, you will be able to get to the Font Inspector and select new sizes, but will wonder why the changes you make are not being applied!)
- In the 'Font' window, click the small, almost hidden, and surely poorly design 'T' icon to the right of the font name and size.
- Voila! In only 14 keystrokes you are able to get the Font inspector window!
- Your existing font will be preselected in the font inspector. Whatever changes you make now will be applied to the text types you selected in the 'Source Editor' window. e.g. All Fonts > Menlo > Regular > 14
- Close the windows you opened on this hunt for the holy grail.
Congratulations. Your may now read your code. Wasn't that painless?
Solution 3
Easisest solution:
Close any open projects.
Xcode > Preferences > Font & Colors
Make sure to press CMD+A to select all possible text types. Then change the font size from the picker.
Solution 4
- Go to XCode > Preferences > Fonts & Color
- Double click on a font entry to get the Font inspector window
- Select all font entries with sizes you'd like to increase/decrease
- In the Font inspector window select the same font (e.g. All Fonts > Menlo > Regular > 14)
Watch out because there's no undo!
Solution 5
You can use this plugin to change the font size using ⌘ +
or ⌘ -
(Control -
and Control +
in the latest versions of Xcode. The plugin developers changed the shortcut to avoid conflict with Interface Builder hotkeys):
Tawseef Patel
iOS Developer Other Interests: Rails, Product Design, Interaction Design, Design Sketching
Updated on November 15, 2021Comments
-
Tawseef Patel over 2 years
To increase font-size in Xcode is a pain.
-
Tawseef Patel almost 15 yearssome links that I found when you google for "xcode increase font size" where users are getting frustrated over this issue. <br> The person who asked the question might well have gulped down a 6-pack and has declared XCode as the worst IDE ever!!!! - iphonedevsdk.com/forum/iphone-sdk-tools-utilities/… <br>Here thread ends with a suggestion is to reinstall the Leopard cos the Updates might have corrupted the fonts!!!! - iphonedevsdk.com/forum/iphone-sdk-development/…
-
matt over 12 years+1 for #4 "select any or all". I would never have thought that I could select all of the entries and then change the font.
-
tribalvibes over 12 yearshow about the line spacing too? how could they put so much excruciating detail into the "provisioning" of the product and screw up something as basic as a human readable default text display?
-
mattoc over 12 yearsThanks! I'd like to add that if you have other files opened when you change the Font & Colour preferences the changes won't propagate to them. After quitting and reopening Xcode, new buffers should use the selected style.
-
Wytze about 12 yearsJust a tiny tip: you can select all the different text types, and change the font size for all of them in one stroke.
-
Marco Medrano almost 12 yearsAgree with @Dev comment, JIC there is a better IDE for MAC, it is AppCode, it is not free but is worth!
-
dtbarne almost 12 years+1 for "But my mindset does not seem to match the mindset of software engineers that make 100+ character variable and method name"
-
Matt Montag over 11 yearsTip: try not to have many large documents open when you go to change all the font styles at once.
-
Gleno almost 11 yearsI hope this answer gets more love, because it's certainly the easiest. :)
-
Cosmin almost 11 yearsYou can make a backup copy of the theme first, otherwise you can overwrite it.
-
Arash Saidi almost 11 yearsIn most IDE's you have to change font and font size in settings. It's probably because changes to font impacts other aspects of the scheme. I don't know the reasons though, and it should be easier.
-
original_username over 10 yearsCould you add "Step 0. Close any projects you have open in Xcode"? I don't know if it's expected behavior or my error, however in Xcode Version 5.1 (5B130a), I can't change fonts if there are any projects currently open.
-
Matt Logan about 10 years14 is indeed a really nice size.
-
Jorge Leitao about 10 yearsI think there is a backup: you can add a new theme from a set of template themes (which are the ones are added by default)
-
mdelvecchio over 9 yearsagreed, i didn't find this very painful -- much easier than editing VS.NET's text editor.
-
Bill about 9 yearsYou're the best. Closing your open projects was the key.
-
polyclick about 9 yearsCheck plugin answer below, should deserve more upvotes! github.com/zats/AdjustFontSize-Xcode-Plugin
-
Xinan almost 9 years"select any or all" - that's the whole point of this question and this answer!
-
wulftone almost 9 yearsThis worked, however it took several tries before the thing would accept any font changes... jeez. I wish we didn't have to use xcode for editing. /me investigates alternative ways to compile xcode projects...
-
kmiklas over 8 yearsSteve Jobs just rolled over in his grave. Any reason that we can't use the conventional ctrl+ or ctrl- to increase/decrease font size, respectively?
-
Thomas Dignan over 8 yearsThis is the right answer. Its like other answerers just didn't get stuck on this. They must have been using macs for a long time to pick up on how this shitty UI works.
-
roopunk over 8 yearsI had to make a duplicate of this theme before I could edit it.
-
SoTm over 8 yearsHaving some problems in code 7.2.1. Should it work here?
-
Jameo over 8 yearsNote - CMD-A did not work for me. I had to Shift highlight each one, or alternatively highlight the first one, and scroll all the way down and shift click the last one to quickly select all.
-
Joshua Pinter over 8 yearsCommand + A worked just fine and I didn't have to duplicate the theme before editing. Not sure why others are having issues.
-
jDutton about 8 yearsFor Xcode 7.2+ the key bindings changed to to
Control -
andControl +
. This confused me. I thought my plugin was broken for awhile. -
Steven R. Loomis over 7 yearslink now says "Plugins manipulating UI (like this one) are not supported by Xcode 8"
-
Dani about 7 yearsThis didn't work for me. What I did is select the "Presentation" theme instead of default. Xcode 8.3.2. Sad!
-
asmaier over 6 yearsIt worked for the fonts under Source Editor, but not for the fonts unser Console. Under Console I had to select each font individually.
-
msphn over 5 years2019 and still useful :D
-
Jichao about 5 yearssave my day :DDDD
-
Andrew Stoddart almost 3 yearsWarning don't follow this advice if you don't want all font families and typefaces to be the same. Some things like Documentation and Keywords have different fonts and bolding by default. Follow advice in other answers - use cmd + to preserve this