turn off antialiasing of text

Hi

Previously antialiased text can look pretty ugly when converted to bilevel .
Is it possible to turn off antialiasing of text? There seems to be no
setting. I tried using the Wx backend but it antialiased, too.

I am using matplotlib 0.98; tried wxPython 2.6 and 2.8, matplotlib 0.91.4.

I would not mind permanently deactivating antialiasing in text.py or so.

bye,

Felix

···

--
View this message in context: http://www.nabble.com/turn-off-antialiasing-of-text-tp18257145p18257145.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

It's certainly not exposed as an option to the user, and I don't think there's an easy way to hack this in. We can tell freetype to give us 1-bit monochrome bitmaps, but matplotlib currently expects 8-bit greyscale, so things don't really work. It's doable, but it requires some non-trivial code changes, and this isn't an oft-requested feature.

One thing you could try is generating a PDF and then converting that using a tool that has a no-antialiasing option. It should produce a better result since it's working from the glyph outlines.

There may also be a way to force this in the Cairo backend (which uses Cairo for the text rendering). But I don't know much about Cairo...

Cheers,
Mike

fkjt79 wrote:

···

Hi

Previously antialiased text can look pretty ugly when converted to bilevel .
Is it possible to turn off antialiasing of text? There seems to be no
setting. I tried using the Wx backend but it antialiased, too.

I am using matplotlib 0.98; tried wxPython 2.6 and 2.8, matplotlib 0.91.4.

I would not mind permanently deactivating antialiasing in text.py or so.

bye,

Felix
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

thank you for the suggestions. from what I can find about cairo i suppose it
has the same problem. I think I will add non-antialiased text afterwards,
either manually or maybe automated.

regards,

Felix

···

--
View this message in context: http://www.nabble.com/turn-off-antialiasing-of-text-tp18257145p18319326.html
Sent from the matplotlib - users mailing list archive at Nabble.com.