You are not logged in.

#1 2020-03-24 11:28:08

cycoe
Member
Registered: 2016-07-17
Posts: 2

How to render Unifont clearly

I want a sharp bitmap font, so i chose `Unifont` at last. But I met some problem about font rendering.

I have turned off all switches about hinting in the `~/.Xresources`, but left antialias on
```
Xft.dpi: 144
Xft.antialias: 1
Xft.rgba: none
Xft.lcdfilter: lcdnone
Xft.autohint: 0
Xft.hinting: 0
Xft.hintstyle: hintnone
```

The edge of font was smoothed and blurred, and this is not I want. After turning off  antialias, characters became very ugly.

So, what i want is to make Unifont sharp and readable. As I know, the game `CDDA` also uses `Unifont` for its UI, and Unifont under CDDA is always rendered sharp without blurring with any font size I tested. Who can help me? Thx a lot!

Offline

#2 2020-03-24 13:34:57

seth
Member
Registered: 2012-09-03
Posts: 49,994

Re: How to render Unifont clearly

You will not get a bitmap font to render precisely at arbitrary sizes. Everything that's not a provided bitmap size will be interpolated and that's gonna look shit.
Are you sure "CDDA" uses a bitmap version of Unifont? Because they're also ttf versions and those will look better on arbitrary font sizes.

bdf-unifont ships only a 16px version, so you *have* to set the client to use 16px as fontsize (not "pt"! - in doub't you'll have to calculate the pt. At 144dpi it'd be 8pt)

Also please specify which client you're trying to use the font in, because many won't care about the xft resource. Also adjsut "xrandr --dpi 144".

Online

#3 2020-03-24 14:38:48

cycoe
Member
Registered: 2016-07-17
Posts: 2

Re: How to render Unifont clearly

seth wrote:

You will not get a bitmap font to render precisely at arbitrary sizes. Everything that's not a provided bitmap size will be interpolated and that's gonna look shit.
Are you sure "CDDA" uses a bitmap version of Unifont? Because they're also ttf versions and those will look better on arbitrary font sizes.

bdf-unifont ships only a 16px version, so you *have* to set the client to use 16px as fontsize (not "pt"! - in doub't you'll have to calculate the pt. At 144dpi it'd be 8pt)

Also please specify which client you're trying to use the font in, because many won't care about the xft resource. Also adjsut "xrandr --dpi 144".

Thanks a lot for reply. I must say sorry that its my mistake that lead you to misunderstand.

The Unifont I use and that CDDA use are both Truetype version Unifont with bitmap embedded (Actually I use the same font file with CDDA). The difference is that CDDA can render clearly at arbitrary sizes, while I get blurred font in my client if I use antialiasing, and get a shit if without antialiasing.

The font is rendered clearly at 16px, because at this size it use the embedded bitmap. The clients I use are some GTK applicatiions, and I tried these in *lxappearance*

Offline

#4 2020-03-24 14:56:29

seth
Member
Registered: 2012-09-03
Posts: 49,994

Re: How to render Unifont clearly

some GTK applications

https://wiki.archlinux.org/index.php/Fo … figuration

If the problem remains, can you please post a link to the actual font?

Online

Board footer

Powered by FluxBB