Note that this question continues from Is it possible to coax Visual Studio 2008 into using italics for comments?
If the long question title got you, here's the problem:
How to convert the style property of the Consolas Italic font to Bold without actually modifying any of its actual glyphs? That is, we want the font to be still the same (i.e., Italic) we merely want the OS to believe that it's now a Bold font.
Please just don't mention the name of a tool (Ex: fontforge), but describe the steps to achieve this or point to such a description.
Alright, I've successfully used FontForge to create a copy of Consolas (although this should work with any font) with the bold style actually being italics.
These are the steps that I followed:
Install FontForge. It's a lot easier to do this on linux than on windows/cygwin. I used a Ubuntu VM ("sudo apt-get install fontforge").
Open Consola.ttf (the "normal" style font) in FontForge.
Select Element -> Font Info.
Change the Fontname, Family Name, and Name for Humans, all to the same thing. I used 'ConsolasVS'.
Click Ok. Click 'Yes' to let FontForge generate a new GUID for the font.
Select File -> Generate Fonts. Make sure you've got "TrueType" selected. Uncheck "Validate before saving". Click Save.
Now open Consolai.ttf (the italic style font) in FontForge.
Go back to Element -> Font Info.
Change the Font names as before, and where it currently says "Italic", change that to "Bold".
Go to the OS/2 tab, change the font weight to "700 Bold".
Go to the Mac tab, change the style set to Bold.
Click Ok. Allow a new GUID to be generated again.
File -> Generate Fonts, as before.
Copy your two new ttf files into your \Windows\FONTS\ folder.
You can now have nice italic comments with Consolas in VS2008. Hooray!
I did the italics-as-bold trick on Consolas back in July 2007 and posted a screenshot of it on my blog.
I used FontLab which does a great job but a custom tool to copy and set the header would be the best bet as you can't modify and redistribute Consolas and FontLab costs $699.
If you want to go down the FontLab route the open up the regular and italic versions and go into the File > Font Info... menu option and use the Names and Copyright section.
In there set them both fonts Family Name to a new name then flip the checkboxes on the italic version to indicate bold instead of italic and select Normal from the Weight list box and Italic in the Style Name list box.
Save and install :)
Related
I downloaded & installed Visual Studios 2022. After creating a new project, and playing with the IDE for some time, I noticed that my font size was set to bold everywhere in the editor. Keywords, operators, punctuation, strings, variables, functions, classes, everything! Obviously I tried to change the size of the font, but it always reverts back to being bold.
Did I do something to cause this? How can I change it to not use bold font everywhere?
This is due to Microsoft changing the default font in Visual Studio 2022 from Consolas to Cascadia Code: a font which is designed to make text easier to read for people with disabilities like Character Dysmorphia or Dyslexia. You can change this back to "Consolas", the VS 2019 font by going to
Tools > Options > Environment > Fonts and Colors > "Show settings for: Text Edit" > Font: "Consolas"
SO THERE ARE A COUPLE OF ISSUES THAT CAUSE THE FONT TO RENDER OVERLY BOLD
I know that this answer isn't as popular as the other answer, but there was more to this problem than just changing the font. Originally, I tried changing the font, and it didn't work. It turned out, I had somehow turned on an option called "Windows High Contrast" which renders the font as an "ANSI Standardized Terminal Emulators" where there is an option of font that is not only more saturated & brighter, but bolder as well. Only then did changing the font back to the Original Microsoft Consoles font provide the experience I had expected.
Even Here the Story Doesn't End
I later found out about a feature called Power-lines, which is a really awesome looking feature, and provides a great command-line experience. And Cascadia Code supports Power-lines, Consoles does not.
Also I have to read code in a foreign language occasionally, and Slavic/Asian Languages render very nicely in Cascadia Code. So after over 6 months of grappling with fonts. I found that Cascadia Code actually has a variable font-weight, such that 300 and 400 are valid weights, but so 350, or 565 (too bold).
So for me, what worked, was to change Cascadia Codes weight to 350. Its actually kind of cool to be able to pick a font's boldness using a dynamic weight, rather than being restricted to increments of 100.
Tools
Options
Environment
Fonts and Colors
Text Edit
Font Weight: 350
Image Showing Windows Terminal w/ Power Lines Support
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.
This feature is completely broken, so you have to edit the theme file manually. It's located here:
~/Library/Developer/FileMerge/UserData/FontAndColorThemes/Default.xccolortheme
The file itself is plaintext XML. Even though it's pretty straightforward, I recommend backing it up first.
For example, if you want to increase the font size from "11.0" to "14.0", just do a find and replace.
You might be tempted to copy in a theme from Xcode. Don't bother. The font sizes don't appear to take effect, and FileMerge expects a white background, so darker themes won't work correctly.
The other answers didn't work for me (as I didn't have any theme files), but the following did:
Open FileMerge
Go to Preferences
Click the 'Set...' button under 'Font'
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).
For me also the font panel settings have no effect at all. Same problem in XCode "Font & Colors" preferences.
For your colors problem, I would try quitting FileMerge, archiving the preference file, and relaunching:
mv ~/Library/Preferences/com.apple.FileMerge.plist ~/Library/Preferences/com.apple.FileMerge.plist.backup
FileMerge has a XCFontAndColorCurrentTheme setting:
defaults read com.apple.FileMerge XCFontAndColorCurrentTheme
I've tried setting that:
defaults write com.apple.FileMerge XCFontAndColorCurrentTheme "Presentation.xccolortheme"
But I don't see a difference. So maybe Apple is in the middle of revising this feature.
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.
None of this helped in my case on Big Sur, but this did the job. Requires sudo throughout so be careful.
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"
Edit (in xcode for example) ~/Library/Preferences/com.apple.FileMerge.plist. Select the new theme by setting the XCFontAndColorCurrentTheme value to fileComp.xccolortheme
Edit the font values in new theme file fileComp.xccolortheme. Quit and restart FileMerge each time to apply.
The settings path is Tools / Options / Environment / Fonts and Colors /Enrivonment/ Font. I'm talking about the Environment that I emphasized in bold in the settings path.
Notice how it doesn't tell you what the default font is; it just says Automatic. And the font size is disabled until you pick a specific font.
If I want to change the font size, it makes me pick the font first. But I have no reason to change the font, just the font size. Soo, what's the default Environment font?
It's probably the same as in Visual Studio 2015, which also hides it.
It turned out to be Leelawadee UI for Windows 10 Professional.
For other OS versions, you can put the focus on the font dropdown, and up and down arrow, or press the first letter of the font, or press Home to go back to Automatic (the first dropdown option). Thereby, you can keep your eye on the Sample window to determine the default font. If you get on a font, then hit the Home key, and the Sample doesn't change (even a little bit), that's your default font. Please leave a comment if you find one!
Does anyone know how to change the background color, font size, and other appearance-based settings in Notepad++? The default is white but I am trying to change it into a dark gray or something else.
Go to Settings -> Style Configurator
Select Theme: Choose whichever you like best (the top two are easiest to read by most people's preference)
You may need admin access to do it on your system.
Create a folder 'themes' in the Notepad++ installation folder i.e. C:\Program Files (x86)\Notepad++
Search or visit pages like http://timtrott.co.uk/notepad-colour-schemes/ to download the favourite theme. It will be an XML file.
Note: I prefer Neon any day.
Download the themes from the site and drag them to the themes folder.
Note: I was unable to copy-paste or create new files in 'themes' folder so I used drag and that worked.
Follow the steps provided by #triforceofcourage to select the new theme in Notepad++ preferences.
From version v8 released 2021-06-07 Notepad++ has additional Dark Mode option.
To enable it go to Settings -> Preferences -> Enable dark mode
Effect:
Next step:
Go to Settings -> Style Configurator
Select Theme: Choose whichever you like best (over half of styles here are dark, but each is different).
Hint: click on theme list and use keyboard arrows 🔼 and 🔽 to switch between themes and test all of them.
Effect after all steps (Obsydian theme here):
There seems to have been an update some time in the past 3 years which changes the location of where to place themes in order to get them working.
Previosuly, themes were located in the Notepad++ installation folder. Now they are located in AppData:
C:\Users\YOUR_USER\AppData\Roaming\Notepad++\themes
My answer is an update to #Amit-IO's answer about manually copying the themes.
In Explorer, browse to: %AppData%\Notepad++.
If a folder called themes does not exist, create it.
Download your favourite theme from wherever (see Amit-IO's answer for a good list) and save it to %AppData%\Notepad++\themes.
Restart Notepad++ and then use Settings -> Style Configurator. The new theme(s) will appear in the list.
If anyone wants to enable dark mode, you may follow the below steps
Open your Notepad++, and select “Settings” on the menu bar, and choose “Style configurator”.
Select theme “Obsidian” (you can choose other dark themes)
Click on Save&Colse
Notepad++ changed in the past couple of years, and it requires a few extra steps to set up a dark theme.
The answer by Amit-IO is good, but the example theme that is needed has stopped being maintained. The DraculaTheme is active. Just download the XML and put it in a themes folder. You may need Admin access in Windows.
C:\Users\YOUR_USER\AppData\Roaming\Notepad++\themes
https://draculatheme.com/notepad-plus-plus
I have just installed the latest version Notepad++ website (currently it is v8.1) which provides an explicit dark mode setting.
Go to "Setting" -> "Preferences..." -> "Dark Mode" -> check the "Enable dark mode" tick box. The editor might need to be restarted to take effect completely.
https://notepad-plus-plus.org/downloads/
If you are not able to add the theme , a workaround is that go to
USER/Appdata/LocalRoaming/Notepad++
make sure you save whatever the data is there in stylers.xml as back up before
There you will find a stylers.xml you can edit that only , with any xml format you need.
( https://raw.githubusercontent.com/dracula/notepad-plus-plus/master/Dracula.xml )
Sometimes even after adding the file , notepadd++ doesn't pick up the theme
To revert back just edit back stylers.xml with the backup file.
After restarting it , you can see notepad ++ has taken that style as default
How can I disable the font smoothing in the text editor of Visual Studio? On some machines I use, this works, but, not in most of them.
The text in the editor on the left is not really sharp. But the font in Windows is.
There is an extension called Text Sharp that allows you to completely disable font smoothing (ClearType) for Visual Studio:
https://visualstudiogallery.msdn.microsoft.com/7aafa2ea-8c54-4da8-922e-d26bf018514d
I'm using this combined with the Source Code Pro font for very readable code.
Well, the characters are at least readable. The code itself may be a different story. :)
In Visual Studio 2019 v16.5.4 (possibly lower), there is a new feature under the Text Editor -> Advanced settings called "Text rendering method". This appears to be defaulted to "ClearType" upon installation. On my machine, I've disabled ClearType at the OS level, yet after a fresh install/update, noticed that my fonts were being smoothed.
Simply switch this setting to "Aliased" to get pixel-perfect font rendering back.
Again, this assumes you have already disabled ClearType at the system level. I am unsure if VS settings would ignore/override the system-level ClearType settings or not.
In my case the problem was that I had the text size to 120%, I just change it to 100%.
Is an option located in Display Settings above the Resolution selector. It says:
"Change the size of the text, apps, and other items"
set the value to:
100% (Recommended)
This happened to me when I added a new LCD monitor to my setup.
According to blogs.msdn.com and this post on SuperUser, you may have to disable it in many places, but for VStudio two are enough:
Control Panel > Display > Adjust ClearType Text
Control Panel > System > Adjust the appearance and performance of Windows > Visual Effects > Smooth edges of screen fonts
Don't use Consolas as it always uses ClearType, as Alex K. noted in the comments.
Prefer Lucida Console which is a fixed font (they are bold in VStudio's font list in Tools > Options > Environment > Fonts and Colors) and appears not to suffer from the effects of ClearType or smoothed edges.
For those willing to disable anti-aliasing/smooth edges/cleartype on VS Code as of today, there's no official option inside the VS Code program to do it. Instead, I have found this method that works for me, and it's thanks to this article: https://medium.com/kasun-kodagoda/fix-text-becomes-blurry-when-vs-code-application-loses-focus-issue-on-windows-d95697b2f927
Here are the steps:
<img src="https://i.stack.imgur.com/L2i9S.png" alt="..." />
Disable anti-aliasing VSCode Image:
Right click on VS Code program and go to Proprieties.
In the "target" section of the app, add the following lines: --disable-gpu --enable-use-zoom-for-dsf
Apply the changes and that's it.
I hope it's useful.
For me it helped to switch to "Consolas" font and then back to "Courier New" in Tools->Options->Environment->Fonts and Colors. Don't forget to press "OK" after switching to Consolas.