I'm using Proggy (ProggyCleanTTSZ 12 in .Xdefaults) font in Emacs. I'm not happy with how my OS (Ubuntu 10.10) applies anti-aliasing to it. How do I disable it?
You can set font options in your .Xdefaults (or .Xresources - whichever you are using). This allows you to disable anti-aliasing in emacs, but still have it enabled elsewhere.
emacs*font: ProggyCleanTTSZ-12:antialias=false
See also the fontconfig user guide
Font rendering is generally handled by the OS libraries rather than the application, so you need to tell Ubuntu not to anti-alias that particular font. It's been a few years since I worked much on Linux, but if things haven't changed, you can configure this by editing a file (maybe something like /etc/fonts/fonts.conf or ~/.fonts.conf or something similar).
https://wiki.ubuntu.com/Fonts#Manual_Font_Smoothing might help.
Related
My syntax highlighting colors suddenly look like this:
It looks as if the contrast or brightness has been lowered, or that it has been grayed out.
I can still use everything normally.
My colors used to look like this:
My setup:
VSCode 1.75.1
Ubuntu 22.04 (Gnome)
One Dark Pro theme (but I have it with every theme)
Every file gives the same issue, including files in Home directory (to make sure it's not write permissions)
Does anybody know what could be causing and how I could fix this?
I fixed it. I used to have the Adobe "Source Code Variable" configured as a custom font on Windows, and synced my settings to Ubuntu.
I didn't have the font installed but installed it a bit ago.
After changing to another font it is normal again. Seems like this specific font makes it look low in contrast.
Setting variable: editor.fontFamily
I'm having a problem with NetBeans fonts on my computer which for some reason are getting distorted. I decided to open this question because all searches I made ended up on how to change the fonts of the text editor but not of the IDE itself. As you can see on this printscreen, it is kinda hard to read because of this missing parts of the characters. I was having exactly the same problem with burp suite then I increase the font-size (didn't found a option there to change font-family) and it solved a little bit. I think that if I change these configurations it will be easier for me to read. Thanks in advance.
The solution came from http://wiki.netbeans.org/FaqFontSize
There's 2 options to do:
Run netbeans with the additional --fontsize X parameter from the commandline
Edit the netbeans.conf file located in the %NETBEANS_INSTALLATION_DIRECTORY\etc directory and at the part that says netbeans_default_options=.... append --fontsize X (Be sure that the option -J-Dsun.java2d.dpiaware is set to true. Netbeans will ignore the --fontsize instruction if is false).
This should change the default GTK font size. As noted in the link, it may not work in Gnome desktop environments because the font there is controlled by Gnome.
The netbeans.conf file for 10.x seems to have a slightly different syntax than previous versions.
In 8.2, adding "--fontsize x" worked. I couldn't get it to work in 10.0.
But adding "--fontsize x" to the start cmd works fine and doesn't compromise the font crispness when using a HD screen.
I would like to know how to get similar font rendering in GNU Emacs as in GVim as shown in the screenshot below. It seems Emacs has an inferior way of rendering fonts by default. I've tried installing the Infinality font patches but I got the same results. I am running GNU Emacs 24.3 on my Arch Linux virtual machine. I have no Desktop Environment and am using OpenBox as my window manager.
A lot of forum posts I dug up seemed to hint at the libxft library that Emacs uses needing patching in the past, but not anymore. According to Emacs it has been compiled --with-xft so that shouldn't be an issue. Below is a screenshot from both applications and a zoomed in view to highlight the difference in rendering.
In my experience, Emacs does not reliably read font settings from font config or from Gnome, so you may need to change Emacs' font rendering settings.
Notably, the colored pixels around the font in GVim indicate that GVim uses subpixel rendering, whereas the absence of these pixels in Emacs shows that it only uses hinting. The absence of subpixel rendering often makes fonts look blurry.
Find out GVims preferences
Find out what font rendering settings GVim uses. I presume it takes the standard ones from Gnome, so install Gnome Tweaktool to inspect the font settings from Gnome.
Tell Emacs about your font preferences
Now create an .Xresources file that tells Emacs about these settings. The following is represents my font settings, adapt it according to what you have found out in Gnome Tweaktool:
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
As far as I know, the lcdfilter setting isn't available in Gnome Tweaktool, so just leave it on lcddefault. After creating the file
Exit Emacs with C-x C-c
Load these settings with:
$ xrdb -merge ~/.Xresources
Verify that the settings were loaded:
$ xrdb -query | grep Xft
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
Restart Emacs
Now check whether the fonts look the same now. Note that GVim may use a different font renderer (e.g. Cairo, Harfbuzz or whatever), so expect some slight differences anyway.
Check that the settings are permanent
Log out of your desktop
Log in again
Use above xrdb -query command to verify the presence of your font settings
There is alllll kinds of information out there about emacs color schemes, font locks, etc but I am having trouble getting where I want to be. Basically I would like to know what are some of the best font faces to set in order to have a nice solid color theme which is a good cross language solution. I am ending up with lots of language syntax (parens, brackets, operators, etc) not highlighted in some places when I expect them to be.
Below are the faces I am currently setting:
font-lock-builtin-face
font-lock-comment-face
font-lock-comment-delimiter-face
font-lock-doc-face
font-lock-doc-string-face
font-lock-function-name
font-lock-keyword-face
font-lock-negation-char-face
font-lock-preprocessor-face
font-lock-string-face
font-lock-type-face
font-lock-variable-name-face
What if any major faces am I missing here?
Don't do it like this. Choose a colour-theme that looks "okay" and when you're doing some work and find something unsatisfactory, customise that face to suite your taste.
I once knew someone who actually did an xlsfonts and opened an xterm for each one to decide which one he wanted to use while coding. Not thing kind of way I'd like to spend my time. :)
zenburn is a beautiful color theme. I use the terminus font on debian.
anyhow, I give up trying to use best font in GUI system. I revert to Raster Font, use in DOS Prompt / if it is in Linux, a TTY. Now that is so simple :)
My main workstation is Windows. There is (off course) native Win32 GUI version of Emacs, but I prefer to run it in DOS Command Prompt, using I am using emacs -nw. Using a few trick (write app that draw black border around screen edges), a found it able to make an illusion that it is in a console mode.
I love console mode :)
I recently declared .emacs bankrupcy and reorganized my init stuff. In
the process, I ripped out all the hacky font selection stuff I had
accrued over the years, figuring there are probably easier ways to
accomplish what I want in the most modern version of emacs.
GNU Emacs 23.0.91.1 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
on a GNU/Linux System (Ubuntu 8.10).
Let's
ignore, for the moment, the fact that I also run emacs under Mac OS X
(GUI+Terminal) and occasionally on Windows and just focus on the X11
case:
(Background: The font 6x13 has been part of X11 for as long as I can remember. (a.k.a
misc-fixed semi-condensed ...). It's a bitmap font.)
I want emacs to always use the X11 bitmap font 6x13. (This gives me two buffers next to eachother on my netbook.)
I don't want to see DejaVu Sans Mono 16pt or whatever the heck comes up by default on my netbook (it's huge!)
I want every new frame and window to use this font.
I want derived faces (like org-mode-column) to use 6x13 font and not mysteriously switch back to DejaVu Sans Mono
I don't care what GNOME and X11 think the logical DPI of my screen is. I want 6x13.
When I remote into my netbook (NX Machine) I don't want to see 6x10. I want 6x13.
In case there's any doubt: I want 6x13.
What's the canonical way to do to make this happen?
And before some smart-aleck tells me about menu: Options>>Set Default
Font: the resulting dialog box doesn't even offer bitmap fonts, so
there's no way to choose 6x13. Furthermore, it doesn't solve the
problem with org-mode: table-views still come up with the wrong font.
I control this stuff from my .Xresources file.
Personally I have
emacs.reverseVideo: true
emacs.font: 7x13bold
(And I quite agree... long live the bitmap fonts! I'll take my xterm with
XTerm*foreground: green
XTerm*background: black
XTerm*font: 7x13bold
...
over the Gnome terminal any day).
If you're playing with .Xresources from within a session, xrdb command is useful to reload them.
You want to set the default frame parameters in your .emacs.
find out the name of the font you want to use
add the needed value to the default-frame-alist.
The easiest way, actually, is to use customize and customize default-frame-alist, but can also use elisp and write
(setq default-frame-alist
'(font . "-*-*-medium-r-normal--16-*-*-*-*-*-fontset-hiramin_w6"))
That's stolen from my emacs, you'll need to find the full font name (xfontsel?) for the font you want.
See also the EmacsWiki on setting fonts and faces.
For anyone reading this with a recent Linux distribution you will have to install 6x13 first (yes, sounds obvious..). There are instructions here for Ubuntu/Debian which should work on other distros too if you skip the apt-getting of random fonts. Install the "FixedSC" .tgz from there (it unpacks to /usr/local/share/fonts) then follow the instructions to add it to the font cache so it will appear in the Gnome Font selection dialog.