SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] fonts pixelated in rotated text

From: Michael D. <md...@st...> - 2008年04月25日 18:08:39
They don't look non-antialiased to me (in your attachment or a file I 
generated locally). Remember, the rotation happens in raster (not 
vector) space, because that was the path of least resistance, but is a 
bit of a hack.
The difference is that the trunk appears slightly darker than 0.91.x. 
(And 0.90.x, if I recall correctly, didn't support non-90 degree 
rotations of text at all). 0.91.x is using spline36 interpolation, 
trunk is using spline16. I *think* I changed it because I thought 
spline16 looked slightly cleaner (though technically less accurate), and 
of course is faster, but I'm not sure anymore -- SVN blame isn't helping 
me remember. It could have just been the example I was using at the 
time looked better.
In any case, you should be able to change this line in _backend_agg.cpp:2197
 filter.calculate(agg::image_filter_spline16());
to any of the interpolation kernels that Agg offers, and experiment 
until you find something suitable.
Cheers,
Mike
John Hunter wrote:
> On the trunk, it appears that font anti-aliasing is turned off on
> rotated text, as in this example:
>
> n [26]: import datetime
>
> In [27]: dt = datetime.date.today()
>
> In [28]: dates = [dt-datetime.timedelta(days=i) for i in range(10)]
>
> In [29]: plot(dates, range(10))
> Out[29]: [<matplotlib.lines.Line2D object at 0x98f96ac>]
>
> # after rotation the fonts are pixelated
> In [34]: gcf().autofmt_xdate ()
>
> In [35]: draw()
> 
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save 100ドル. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /