pgajdos at suse.cz
2012-Jun-18 17:32 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
JFYI, http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=79e36baebba4532dff92ca1ca43c4dc2f779fd32 Petr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120618/35f191a6/attachment.pgp>
Akira TAGOH
2012-Jun-19 01:11 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
Thanks for letting us know. I suppose we''ll support that feature in 2.10+. On Tue, Jun 19, 2012 at 2:32 AM, <pgajdos at suse.cz> wrote:> JFYI, > > http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=79e36baebba4532dff92ca1ca43c4dc2f779fd32 > > Petr > > _______________________________________________ > Fontconfig mailing list > Fontconfig at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fontconfig >-- Akira TAGOH
Infinality
2012-Jun-20 03:39 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
Currently subpixel hinting is enabled (when compiled in) whenever anything but FT_RENDER_MODE_MONO is requested. It may be possible to add a flag to freetype to indicate that subpixel hinting should be turned on, however I''m not sure there''s much value in that, given that rendering antialiased fonts without subpixel hinting doesn''t produce more accurate or desirable results. For legacy fonts, subpixel hinting should always produce better results, and for modern fonts the differences will likely be subtle, but in the favor of the subpixel hinted renderings. The only reason I could see to implement such a flag would be for people who have gotten used to the way that the native freetype TT hinter renders legacy fonts with antialiasing, which is definitely not the way the designers intended them to appear (due to DELTAP and SHPIX dents in the outlines among other things). So, I guess my point is that you may not need to do anything to fontconfig to support subpixel hinting. I''m willing to hear other people''s opinions on this too. Thanks, Erik On 06/18/2012 08:11 PM, Akira TAGOH wrote:> Thanks for letting us know. I suppose we''ll support that feature in 2.10+. > > On Tue, Jun 19, 2012 at 2:32 AM, <pgajdos at suse.cz> wrote: >> JFYI, >> >> http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=79e36baebba4532dff92ca1ca43c4dc2f779fd32 >> >> Petr >> >> _______________________________________________ >> Fontconfig mailing list >> Fontconfig at lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/fontconfig >> > >
Akira TAGOH
2012-Jun-20 07:19 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
Hi, One concern on this matter is how it affects to the visibility when mixing up the fonts with/without ClearType bytecode. I may be wrong because I''m not checking that myself. but just heard one get tired easily to keep looking in that situation. dunno. Other than that, it may be useful for buggy fonts. As Windows still has an option to turn off (right?), it just sounds not so bad idea to me. having said that the flag might be deprecated in the future though. On Wed, Jun 20, 2012 at 12:39 PM, Infinality <infinality at infinality.net> wrote:> Currently subpixel hinting is enabled (when compiled in) whenever anything > but FT_RENDER_MODE_MONO is requested. ?It may be possible to add a flag to > freetype to indicate that subpixel hinting should be turned on, however I''m > not sure there''s much value in that, given that rendering antialiased fonts > without subpixel hinting doesn''t produce more accurate or desirable results. > ?For legacy fonts, subpixel hinting should always produce better results, > and for modern fonts the differences will likely be subtle, but in the favor > of the subpixel hinted renderings. ?The only reason I could see to implement > such a flag would be for people who have gotten used to the way that the > native freetype TT hinter renders legacy fonts with antialiasing, which is > definitely not the way the designers intended them to appear (due to DELTAP > and SHPIX dents in the outlines among other things). > > So, I guess my point is that you may not need to do anything to fontconfig > to support subpixel hinting. ?I''m willing to hear other people''s opinions on > this too. > > Thanks, > Erik > > > > On 06/18/2012 08:11 PM, Akira TAGOH wrote: >> >> Thanks for letting us know. I suppose we''ll support that feature in 2.10+. >> >> On Tue, Jun 19, 2012 at 2:32 AM, ?<pgajdos at suse.cz> wrote: >>> >>> JFYI, >>> >>> >>> http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=79e36baebba4532dff92ca1ca43c4dc2f779fd32 >>> >>> Petr >>> >>> _______________________________________________ >>> Fontconfig mailing list >>> Fontconfig at lists.freedesktop.org >>> http://lists.freedesktop.org/mailman/listinfo/fontconfig >>> >> >> > >-- Akira TAGOH
Infinality
2012-Jun-20 20:11 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/20/2012 02:19 AM, Akira TAGOH wrote:> Hi, > > One concern on this matter is how it affects to the visibility when > mixing up the fonts with/without ClearType bytecode. I may be wrong > because I''m not checking that myself. but just heard one get tired > easily to keep looking in that situation. dunno.As far as I know, there really isn''t bytecode that is specific to Cleartype. Bytecode is bytecode. The Cleartype flag (or the phrase "designed for Cleartype") generally means that the font doesn''t contain the legacy hacks used in fonts like Arial, Courier New, etc., which are problematic when being displayed with antialiasing on a TT rasterizer that is following specs. The subpixel hinting functionality works around the issues with the legacy fonts, while allowing modern fonts to render as though they are "designed for Cleartype". Or am I not understanding what you mean here?> > Other than that, it may be useful for buggy fonts. > > As Windows still has an option to turn off (right?),The choices you get in Windows (as far as I know) are to have Cleartype on or off. In fontconfig this would correspond to the below configurations. A link to a corresponding image is above each configuration. (Don''t pay attention to the text in it, because it''s the same across all images): http://www.infinality.net/images/cleartype-on.png <!-- cleartype on --> <match target="font"> <edit name="rgba" mode="assign"> <const>rgb</const> </edit> <edit name="hinting" mode="assign"> <bool>true</bool> </edit> <edit name="autohint" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>true</bool> </edit> <edit name="hintstyle" mode="assign"> <const>hintfull</const> </edit> </match> http://www.infinality.net/images/cleartype-off.png <!-- cleartype off --> <match target="font"> <edit name="rgba" mode="assign"> <const>none</const> </edit> <edit name="hinting" mode="assign"> <bool>true</bool> </edit> <edit name="autohint" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>false</bool> </edit> <edit name="hintstyle" mode="assign"> <const>hintfull</const> </edit> </match> Since the subpixel hinting is automatically set to be off whenever FT_RENDER_MODE_MONO (i.e. antialias=false) is requested, no additional fontconfig configuration would be required to turn "Cleartype" off. That way you can still get the default Windows XP look, where Cleartype is off, and it renders MONO, but still uses the native TT hinter. If you want Cleartype on, you just set antialias=true. What you don''t get anymore is antialiasing with the native TT rendering: http://www.infinality.net/images/aa-native-tt.png If you look at the Times New Roman "2, 3", Arial "r, g, b, e, O" (12px to 17px) and others, you can see artifacts ranging from vanishing stems to dents in the outline. This is because these particular fonts were never designed to render with both antialiasing and TT hinting. So, my argument is that this form of rendering is wrong, was never intended, and shouldn''t be accommodated into fontconfig rules. But, like I said, some people may have gotten used to this rendering, as incorrect and wrong as it is, and will be upset if it isn''t possible to do this anymore. Of course, it is possible if you don''t compile Freetype with subpixel hinting enabled. So, I figure that minority of people can still have their way if they want to. Sorry for the long explanation, but as you know, stuff related to fonts is always more complex than you''d link at first glance. ;) Erik
Behdad Esfahbod
2012-Jun-20 20:20 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/20/2012 04:11 PM, Infinality wrote:> What you don''t get anymore is antialiasing with the native TT rendering: > > http://www.infinality.net/images/aa-native-tt.pngIncidentally I find that one the best of the three. But then again, I can''t stand non-AA, I can''t stand color fringing... behdad
Infinality
2012-Jun-20 20:30 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/20/2012 03:20 PM, Behdad Esfahbod wrote:> On 06/20/2012 04:11 PM, Infinality wrote: >> What you don''t get anymore is antialiasing with the native TT rendering: >> >> http://www.infinality.net/images/aa-native-tt.png > Incidentally I find that one the best of the three. But then again, I can''t > stand non-AA, I can''t stand color fringing... > > > behdadAh... there is another option I didn''t show, which will certainly prevent fringing. You could call it "Grayscale Cleartype". Some might not like it because it''s not as sharp though. http://www.infinality.net/images/aa-subpixel-tt.png <match target="font"> <edit name="rgba" mode="assign"> <const>none</const> </edit> <edit name="hinting" mode="assign"> <bool>true</bool> </edit> <edit name="autohint" mode="assign"> <bool>false</bool> </edit> <edit name="antialias" mode="assign"> <bool>true</bool> </edit> <edit name="hintstyle" mode="assign"> <const>hintfull</const> </edit> <edit name="lcdfilter" mode="assign"> <const>lcddefault</const> </edit> </match>
Behdad Esfahbod
2012-Jun-20 20:34 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/20/2012 04:30 PM, Infinality wrote:> > Ah... there is another option I didn''t show, which will certainly prevent > fringing. You could call it "Grayscale Cleartype". Some might not like it > because it''s not as sharp though.Thanks Eric. My feeling is that some gamma correction applied to this one would actually make it look pretty decent. behdad> http://www.infinality.net/images/aa-subpixel-tt.png > <match target="font"> > <edit name="rgba" mode="assign"> > <const>none</const> > </edit> > <edit name="hinting" mode="assign"> > <bool>true</bool> > </edit> > <edit name="autohint" mode="assign"> > <bool>false</bool> > </edit> > <edit name="antialias" mode="assign"> > <bool>true</bool> > </edit> > <edit name="hintstyle" mode="assign"> > <const>hintfull</const> > </edit> > <edit name="lcdfilter" mode="assign"> > <const>lcddefault</const> > </edit> > </match> >
Infinality
2012-Jun-20 20:37 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/20/2012 03:34 PM, Behdad Esfahbod wrote:> On 06/20/2012 04:30 PM, Infinality wrote: >> Ah... there is another option I didn''t show, which will certainly prevent >> fringing. You could call it "Grayscale Cleartype". Some might not like it >> because it''s not as sharp though. > Thanks Eric. My feeling is that some gamma correction applied to this one > would actually make it look pretty decent. > > behdad > >Agreed, and something else that can dramatically reduce the subpixel fringing is by changing the FIR filter values in the Freetype LCD filter. There is a setting in my other freetype patch to do that. Freetype Default "06 25 44 25 06" Stronger Gibson "11 22 38 22 11" I use the second one for exactly the same reason... I hate fringing. The second FIR value reduces the fringes to the point where I don''t notice them at all. Thanks, Erik
Raimund Steger
2012-Jun-20 22:33 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
Hi, Infinality wrote:> [...] > > The choices you get in Windows (as far as I know) are to have Cleartype > on or off. In fontconfig this would correspond to the belowWindows has another option that disables AA for those erroneous cases that you mentioned (mostly, the MS Web Fonts at low pixel sizes), and uses grid-aligned grayscale AA otherwise, but no ClearType. This used to be the only AA setting before ClearType was introduced (up until Windows 2000), and it is still supported at least in Windows 7, although some newer Microsoft applications ignore it. It''s what I use and have also configured in fontconfig, with the slight alteration that I don''t use grid alignment. (But since it will likely still be possible to use such a configuration, I see no issue whatsoever.) Raimund -- Worringer Str 31 Duesseldorf 40211 Germany +49-179-2981632 icq 16845346
Infinality
2012-Jun-21 00:13 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
Interesting.... I was aware that "Font Smoothing" in Windows 95/98 would do native TT hinting and AA (at least on bold fonts), but I wasn''t aware it was even possible to do that on any Windows afterwards. (And in fact I thought everyone had forgotten about it. ;) ) On 06/20/2012 05:33 PM, Raimund Steger wrote:> Hi, > > > Infinality wrote: >> [...] >> >> The choices you get in Windows (as far as I know) are to have Cleartype >> on or off. In fontconfig this would correspond to the below > > Windows has another option that disables AA for those erroneous cases > that you mentioned (mostly, the MS Web Fonts at low pixel sizes), and > uses grid-aligned grayscale AA otherwise, but no ClearType. This used > to be the only AA setting before ClearType was introduced (up until > Windows 2000), and it is still supported at least in Windows 7, > although some newer Microsoft applications ignore it. It''s what I use > and have also configured in fontconfig, with the slight alteration > that I don''t use grid alignment. > (But since it will likely still be possible to use such a > configuration, I see no issue whatsoever.) > > Raimund > > >
Akira TAGOH
2012-Jun-21 02:22 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On Thu, Jun 21, 2012 at 5:11 AM, Infinality <infinality at infinality.net> wrote:> As far as I know, there really isn''t bytecode that is specific to Cleartype. > ?Bytecode is bytecode. ?The Cleartype flag (or the phrase "designed for > Cleartype") generally means that the font doesn''t contain the legacy hacks > used in fonts like Arial, Courier New, etc., which are problematic when > being displayed with antialiasing on a TT rasterizer that is following > specs. ?The subpixel hinting functionality works around the issues with the > legacy fonts, while allowing modern fonts to render as though they are > "designed for Cleartype". ? Or am I not understanding what you mean here?Well, the question was how it looks when rendering the text with mixing up "ClearType" fonts and legacy fonts, because it seems that there is/was? the case in Windows that one is smooth and one is jaggy when ClearType is turning on. As you said the above, I guess it won''t happens?> The choices you get in Windows (as far as I know) are to have Cleartype on > or off. ?In fontconfig this would correspond to the below configurations. ?A > link to a corresponding image is above each configuration. ?(Don''t pay > attention to the text in it, because it''s the same across all images):Thanks. that would be useful. it may be a good idea to add those configuration as reference in fontconfig.> If you look at the Times New Roman "2, 3", Arial ?"r, g, b, e, O" (12px to > 17px) and others, you can see artifacts ranging from vanishing stems to > dents in the outline. ?This is because these particular fonts were never > designed to render with both antialiasing and TT hinting. ?So, my argument > is that this form of rendering is wrong, was never intended, and shouldn''t > be accommodated into fontconfig rules.I agreed. the subpixel hinting looks good at this point.> Sorry for the long explanation, but as you know, stuff related to fonts is > always more complex than you''d link at first glance. ?;)Thanks for kindly explanation. that''s really useful :) -- Akira TAGOH
Infinality
2012-Jun-21 02:56 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/20/2012 09:22 PM, Akira TAGOH wrote:> On Thu, Jun 21, 2012 at 5:11 AM, Infinality > <infinality at infinality.net> wrote: >> As far as I know, there really isn''t bytecode that is specific to >> Cleartype. >> Bytecode is bytecode. The Cleartype flag (or the phrase "designed for >> Cleartype") generally means that the font doesn''t contain the legacy >> hacks >> used in fonts like Arial, Courier New, etc., which are problematic when >> being displayed with antialiasing on a TT rasterizer that is following >> specs. The subpixel hinting functionality works around the issues >> with the >> legacy fonts, while allowing modern fonts to render as though they are >> "designed for Cleartype". Or am I not understanding what you mean >> here? > Well, the question was how it looks when rendering the text with > mixing up "ClearType" fonts and legacy fonts, because it seems that > there is/was? the case in Windows that one is smooth and one is jaggy > when ClearType is turning on. > As you said the above, I guess it won''t happens?Well, it depends on what you mean by "legacy fonts". If you are talking about bitmap (non-tt) fonts then those would of course always render jaggy. Any ttf fonts with (semi-good) instructions should render with subpixel hinting under Freetype like they would with Windows w/Cleartype. (The goal is to render them similarly to the MS rasterizer, and potentially even better!)> >> The choices you get in Windows (as far as I know) are to have >> Cleartype on >> or off. In fontconfig this would correspond to the below >> configurations. A >> link to a corresponding image is above each configuration. (Don''t pay >> attention to the text in it, because it''s the same across all images): > Thanks. that would be useful. it may be a good idea to add those > configuration as reference in fontconfig.Yes, that might be worth mentioning somewhere. I know that some major distros like OpenSUSE are planning on using subpixel hinting by default now that it''s in Freetype. Other distros have packages that are available too. More people will likely be using subpixel hinting now that it''s in Freetype, so having documentation as to "what settings do what" might be good. If you need me to help you out with that, I''d be more than willing. I do have my git repo of "fontconfig-infinality" which contains TT fonts that I know work well with subpixel hinting. Perhaps that could be somehow incorporated into fontconfig itself, now that subpixel hinting is in Freetype?? Thanks, Erik -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120620/af06cfec/attachment.html>
pgajdos at suse.cz
2012-Jun-21 07:12 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On Wed, Jun 20, 2012 at 03:11:03PM -0500, Infinality wrote:> if you don''t compile Freetype with subpixel hinting enabled. So, I > figure that minority of people can still have their way if they want > to.Definitely +1. Petr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120621/42850d94/attachment.pgp>
Akira TAGOH
2012-Jun-21 07:27 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On Thu, Jun 21, 2012 at 11:56 AM, Infinality <infinality at infinality.net> wrote:> Well, it depends on what you mean by "legacy fonts".? If you are talking > about bitmap (non-tt) fonts then those would of course always render jaggy. > Any ttf fonts with (semi-good) instructions should render with subpixel > hinting under Freetype like they would with Windows w/Cleartype.? (The goal > is to render them similarly to the MS rasterizer, and potentially even > better!)Right. and I thought it wasn''t a bitmap font.> Yes, that might be worth mentioning somewhere.? I know that some major > distros like OpenSUSE are planning on using subpixel hinting by default now > that it''s in Freetype.? Other distros have packages that are available too. > More people will likely be using subpixel hinting now that it''s in Freetype, > so having documentation as to "what settings do what" might be good.? If you > need me to help you out with that, I''d be more than willing.? I do have my > git repo of "fontconfig-infinality" which contains TT fonts that I know work > well with subpixel hinting.? Perhaps that could be somehow incorporated into > fontconfig itself, now that subpixel hinting is in Freetype??Yes, that sounds good to me. any helps are welcome :)> > Thanks, > Erik > >-- Akira TAGOH
pgajdos at suse.cz
2012-Jun-21 07:33 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On Wed, Jun 20, 2012 at 09:56:14PM -0500, Infinality wrote:> like OpenSUSE are planning on using subpixel hinting by default now that it''sHmm, I have packaged fontconfig-infinality for users that are able to compile Freetype with subpixel rendering. We surely cannot ship this library with subpixel hinting support compiled in if this is covered by patents as described for example here: http://en.wikipedia.org/wiki/Subpixel_rendering#Patents So strict lawyer''s clarification is needed here.> in Freetype.? Other distros have packages that are available too.? More people > will likely be using subpixel hinting now that it''s in Freetype, so having > documentation as to "what settings do what" might be good.? If you need me toDefinitely.> help you out with that, I''d be more than willing.? I do have my git repo of > "fontconfig-infinality" which contains TT fonts that I know work well with > subpixel hinting.? Perhaps that could be somehow incorporated into fontconfig > itself, now that subpixel hinting is in Freetype??Yes. I guess it would be great something like two "styles" (using your language from fontconfig-infinality) at least for linux one using subpixel hinting and one that doesn''t. What do you think? Thanks a lot for you work, Petr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120621/bd5b0f54/attachment.pgp>
Infinality
2012-Jun-23 14:10 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
On 06/21/2012 02:33 AM, pgajdos at suse.cz wrote:> On Wed, Jun 20, 2012 at 09:56:14PM -0500, Infinality wrote: >> like OpenSUSE are planning on using subpixel hinting by default now that it''s > Hmm, I have packaged fontconfig-infinality for users that are able to > compile Freetype with subpixel rendering. We surely cannot ship this > library with subpixel hinting support compiled in if this is covered > by patents as described for example here: > > http://en.wikipedia.org/wiki/Subpixel_rendering#Patents > > So strict lawyer''s clarification is needed here.I''m certainly no lawyer, but my understanding is that subpixel related patents have expired: http://www.freetype.org/patents.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/fontconfig/attachments/20120623/e1c7478c/attachment.html>
Werner LEMBERG
2012-Jun-23 16:20 UTC
[Fontconfig] FreeType now includes Infinality subpixel support
> I''m certainly no lawyer, but my understanding is that subpixel related > patents have expired: > http://www.freetype.org/patents.htmlAFAIK, patents related to the bytecode interpreter have expired, but not the stuff related to the colour filtering. Werner