How to increase font size in the Xcode editor?

190,568

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

  1. 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?

  2. 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.

  1. Close any projects you have open in Xcode (Otherwise the Font window will be inaccessible while a project is open.)
  2. Go to XCode > Preferences > Fonts & Color
  3. 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)
  4. 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 . . .

  5. 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!)

  6. In the 'Font' window, click the small, almost hidden, and surely poorly design 'T' icon to the right of the font name and size.
  7. Voila! In only 14 keystrokes you are able to get the Font inspector window!
  8. 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
  9. 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:

  1. Close any open projects.

  2. Xcode > Preferences > Font & Colors

  3. Make sure to press CMD+A to select all possible text types. Then change the font size from the picker.

enter image description here

Solution 4

  1. Go to XCode > Preferences > Fonts & Color
  2. Double click on a font entry to get the Font inspector window
  3. Select all font entries with sizes you'd like to increase/decrease
  4. 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):

https://github.com/zats/AdjustFontSize-Xcode-Plugin

Share:
190,568
Tawseef Patel
Author by

Tawseef Patel

iOS Developer Other Interests: Rails, Product Design, Interaction Design, Design Sketching

Updated on November 15, 2021

Comments

  • Tawseef Patel
    Tawseef Patel over 2 years

    To increase font-size in Xcode is a pain.

  • Tawseef Patel
    Tawseef Patel almost 15 years
    some 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
    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
    tribalvibes over 12 years
    how 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
    mattoc over 12 years
    Thanks! 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
    Wytze about 12 years
    Just 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
    Marco Medrano almost 12 years
    Agree with @Dev comment, JIC there is a better IDE for MAC, it is AppCode, it is not free but is worth!
  • dtbarne
    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
    Matt Montag over 11 years
    Tip: try not to have many large documents open when you go to change all the font styles at once.
  • Gleno
    Gleno almost 11 years
    I hope this answer gets more love, because it's certainly the easiest. :)
  • Cosmin
    Cosmin almost 11 years
    You can make a backup copy of the theme first, otherwise you can overwrite it.
  • Arash Saidi
    Arash Saidi almost 11 years
    In 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
    original_username over 10 years
    Could 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
    Matt Logan about 10 years
    14 is indeed a really nice size.
  • Jorge Leitao
    Jorge Leitao about 10 years
    I 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
    mdelvecchio over 9 years
    agreed, i didn't find this very painful -- much easier than editing VS.NET's text editor.
  • Bill
    Bill about 9 years
    You're the best. Closing your open projects was the key.
  • polyclick
    polyclick about 9 years
    Check plugin answer below, should deserve more upvotes! github.com/zats/AdjustFontSize-Xcode-Plugin
  • Xinan
    Xinan almost 9 years
    "select any or all" - that's the whole point of this question and this answer!
  • wulftone
    wulftone almost 9 years
    This 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
    kmiklas over 8 years
    Steve 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
    Thomas Dignan over 8 years
    This 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
    roopunk over 8 years
    I had to make a duplicate of this theme before I could edit it.
  • SoTm
    SoTm over 8 years
    Having some problems in code 7.2.1. Should it work here?
  • Jameo
    Jameo over 8 years
    Note - 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
    Joshua Pinter over 8 years
    Command + A worked just fine and I didn't have to duplicate the theme before editing. Not sure why others are having issues.
  • jDutton
    jDutton about 8 years
    For Xcode 7.2+ the key bindings changed to to Control - and Control +. This confused me. I thought my plugin was broken for awhile.
  • Steven R. Loomis
    Steven R. Loomis over 7 years
    link now says "Plugins manipulating UI (like this one) are not supported by Xcode 8"
  • Dani
    Dani about 7 years
    This didn't work for me. What I did is select the "Presentation" theme instead of default. Xcode 8.3.2. Sad!
  • asmaier
    asmaier over 6 years
    It worked for the fonts under Source Editor, but not for the fonts unser Console. Under Console I had to select each font individually.
  • msphn
    msphn over 5 years
    2019 and still useful :D
  • Jichao
    Jichao about 5 years
    save my day :DDDD
  • Andrew Stoddart
    Andrew Stoddart almost 3 years
    Warning 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