Re: How to prevent Chromium from scaling bitmapped fonts?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 12 Mar 2016 15:04:27 +0100
Raimund Steger <rs@xxxxxxxx> wrote:
> [...]
> FC_DEBUG tells me that Chromium first looks up Terminus with FcFontSort. Afterwards, the pixel size from the CSS is looked up with FcFontMatch but the result isn't used; what's used is the upscaled 12px version. That's really weird. I think I need some more time to figure out what's going on here.

OK I've now looked at the source and I think I get it.

In Chromium's world, different font sizes can't differ in font file but only in rendering settings. That's what the FcFontMatch is for.

This means you could only get around it by using a TTF wrapper that contains all of your sizes in one file.

I. e. download the Terminus source and use:

  fonttosfnt -o terminus.ttf *n.bdf
  fonttosfnt -o terminus_bold.ttf *b.bdf

Copy the resulting TTFs somewhere where fontconfig finds them.

You might then have the problem that Chromium doesn't prefer the TTFs and still lands on the PCFs. I think you could at this point get rid of the PCFs as most apps will do fine with the TTFs. The more conservative approach could be to apply a rule that assigns fontformat=TrueType to the pattern if prgname=chromium.

Raimund



-- 
Worringer Str 31 Duesseldorf 40211 DE  home: rs@xxxxxxxx
+49-179-2981632 icq 16845346           work: rs@xxxxxxxxxxxxxxx
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux