You are not logged in.

#1 2016-01-21 13:55:27

matthew.piziak
Member
Registered: 2016-01-21
Posts: 4

Perfectly pixelmapped fonts - misrendered in some applications

Hello,

This is my first post on the Arch forums. Please let me know if I'm following procedure incorrectly.

In IntelliJ, the font PragmataPro Mono renders like this:

t4uui.png

Note the perfectly mapped pixels.  The IntelliJ setting Appearance & Behavior > Appearance > Antialiasing > Editor is set to No antialiasing.

In Emacs, the same font is antialiased:

huO9b.png

If I add an ~/.Xresources file containing "Emacs.font: PragmataPro Mono-12:antialias=false", then Emacs looks like this:

1aGkq.png

The font is automatically bitmapped, but not according to the font's specification. I get similar rendering issues in other applications, but not IntelliJ, which I suspect performs its own rendering to a certain extent.

I am using Xfce, but have replicated the issue in other desktop environments.

How can I replicate IntelliJ's rendering in Emacs?

I have also asked this question on Unix StackExchange one week ago.

Offline

#2 2016-01-21 16:30:12

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Perfectly pixelmapped fonts - misrendered in some applications

Old Ubuntu bug looks interesting, because:

* "Xft is typically set to 96 dpi resulting in a 1.3333 scale factor; so a font size of 8 becomes 10.666667"
* You're not specifying "pixelsize" - but maybe emacs does that itself, I'm too lazy to check.
* Try the patch enclosed in that bug?

You're turning antialias off - how about "autohint"? Maybe autohint is what's distorting the font (or maybe I'm assuming Xft & fontconfig are overly similar).

Personally, I'd say just use vim & fontconfig wink

Last edited by brebs (2016-01-21 16:33:03)

Offline

#3 2016-01-21 16:37:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,822

Re: Perfectly pixelmapped fonts - misrendered in some applications

I assume you are using emacs in GUI mode wink  It depends on GTK3.
I am not skilled in managing fonts, but you may want to investigate whether GTK3 is "helping" you


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#4 2016-01-21 21:30:55

matthew.piziak
Member
Registered: 2016-01-21
Posts: 4

Re: Perfectly pixelmapped fonts - misrendered in some applications

I have tried "Emacs.font:PragmataPro Mono:antialias=false:pixelsize=12:autohint=false", but the problem persists. The glyphs are aligned to pixels and they are correctly 12 pixels high, so it doesn't appear to be a scaling issue.

This font (PragmataPro) is hand-hinted. Many glyphs even change their characteristics between zoom levels (dot vs slash in the zero, for example). It is this information which does not seem to be making it to the screen.

I am not sure about GTK3. I will have to learn more about that first to see if that is where the issue lies.

Offline

#5 2016-01-22 14:01:51

charli3
Member
Registered: 2015-06-01
Posts: 45

Re: Perfectly pixelmapped fonts - misrendered in some applications

I wonder if editing your fonts.conf to enable the 'hintfull' hintstyle would do the trick...hinting.

Offline

#6 2016-01-23 05:47:35

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Perfectly pixelmapped fonts - misrendered in some applications

Moving to "Applications and Desktop Environments".

Offline

#7 2017-06-17 23:29:16

matthew.piziak
Member
Registered: 2016-01-21
Posts: 4

Re: Perfectly pixelmapped fonts - misrendered in some applications

I can't get this working in xfce terminal or gnome-terminal either. I thought that this blog post would be my salvation, but so far no luck.

Offline

Board footer

Powered by FluxBB