How to change FileMerge's font/settings/preferences?

Viewed 2115

For some time now, I can't change FileMerge's font. Then it suddenly started using a Helvetica-like font (sans serif, variable width) for files it doesn't recognize (like typescript source files). That could be changed temporarily to monaco by changing the font to ... Helvetica. Yes, it's very weird.

But now, it shows all text white on white, and only the changed section is visible because of the different background and I cannot change it. I've tried to locate all the pref files, and reinstalled Xcode, but the text remains white on white.

Does anyone know how to change that, or where which (pref) file to change?

It could be a write permission issue, since I'm running it from a non-admin account.

Thanks.

7 Answers

The other answers didn't work for me (as I didn't have any theme files), but the following did:

  1. Open FileMerge
  2. Go to Preferences
  3. Click the 'Set...' button under 'Font'
  4. Click the top of the Fonts window so that it gets focus (this is the key step - if the Fonts window doesn't get focus the changes won't stick). If the Fonts window has focus, you should see your changes reflected in the FileMerge Preferences window live as you make them.

The solution was to delete the folder ~/Library/Developer/FileMerge. It did not solve the font problem (typescript files rendered with proportional font of different size, which causes problems for long files).

In addition to the answers already given, if those do not work, check that the files you are comparing are plain text and not rich text. If they're rich text, file merge will get the font attributes from the files themselves, hence you will not be able to affect the size of the font. You could instead open the files in a text editor and either convert them to plain text, or increase the size of the font manually.

You should create theme folder

mkdir -p ~/Library/Developer/FileMerge/UserData/FontAndColorThemes/

copy Theme file from Xcode.app package

cp "/Applications/Xcode.app/Contents/SharedFrameworks/DVTUserInterfaceKit.framework/Versions/A/Resources/FontAndColorThemes/Default (Light).xccolortheme" ~/Library/Developer/FileMerge/UserData/FontAndColorThemes/

And change font size inside of this file. ~/Library/Developer/FileMerge/UserData/FontAndColorThemes/Default.xccolortheme

it works on Big Sur version.

None of this helped in my case on Big Sur, but this did the job. Requires sudo throughout so be careful.

  1. Make a copy of a theme within the xcode bundle:

sudo cp "/Applications/Xcode.app/Contents/SharedFrameworks/DVTUserInterfaceKit.framework/Versions/A/Resources/FontAndColorThemes/Default (Light).xccolortheme" "/Applications/Xcode.app/Contents/SharedFrameworks/DVTUserInterfaceKit.framework/Versions/A/Resources/FontAndColorThemes/fileComp.xccolortheme"

  1. Edit (in xcode for example) ~/Library/Preferences/com.apple.FileMerge.plist. Select the new theme by setting the XCFontAndColorCurrentTheme value to fileComp.xccolortheme

Specify the new theme file

  1. Edit the font values in new theme file fileComp.xccolortheme. Quit and restart FileMerge each time to apply.
Related