Announcement

Collapse
No announcement yet.

FreeType 2.7 Bringing DirectWrite/ClearType-Like Rendering -- Much Better Looking Fonts On Linux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by slacka View Post

    Yes, opening FontConfig is easy. But it's not like there is a single magic setting that gives you Ubuntu like rendering. And whatever tweaks/configure options Ubuntu uses, it's not just the latest version of FreeType either as I have never been able to get Arch to look as nice as Ubuntu has looked for years now.

    Canonical has invested some seriously manpower in getting a professional looking rendering system and a simple tweak doesn't give you their results.
    The Ubuntu patches are in the AUR.

    Comment


    • #22
      All of us going on about what we like and don't like is pointless. We all have different eyes, different hardware, different lighting, some of us create and use color profiles, most don't, etc., etc.

      You can't configure font rendering in any single way to look best for everyone in all conditions. (My fonts look worse at the end of the day than at the beginning. Bet yours do, too.)

      Would not hurt, though, to have a good GUI tool so we could manipulate the options in freetype/fontconfig and see the results in real time.

      Comment


      • #23
        Have they accepted the patches that Ubuntu has been using for like the past 10 years yet? Or is this another half-assed attempt to duplicate the work of the patches? I don't understand why they don't accept those patches. They supposedly made a "huge improvement" to the subpixel rendering a few years ago IIRC but it still didn't even come close to how nice fonts look with the subpixel rendering patches. Say what you want about Ubuntu but their font setup is the absolute best and it's something I sorely miss when trying other distros. Probably one of the main reasons I'll never switch distros. Pretty much ever other distro's fonts look worse than non-aliased Windows XP.

        Comment


        • #24
          There are, I think, at least three different font rendering engines shipping with Win10, which is part of its problem.
          v40 shoots for the best one: DirectWrite

          dafuq? Fonts look awful on Windows, why would we want to bring that to Linux?
          Depends on the font and the used rendering mechanism. I personally find the DirectWrite (used by Steam, Chrome, Edge and Firefox without the whitelist) looks perfectly fine. GDI and its' ClearType mutations should be purged though.

          Better than, worse than, or equal to Infinality?
          On par with newer fonts, possibly slightly worse on older fonts, depending on the font of course.

          It seems I'll be sticking with version 2.6.5 for some time.
          You don't need to. The newer release incorporates an environment variable to toggle things. Just put `FREETYPE_PROPERTIES=truetype:interpreter-version=35` in some global environment script. By the way, even the "old way" of rendering things will color fringe, this can only be properly controlled if the rendering toolkit uses linear alpha blending and gamma correction for rendering text, which no toolkit does by default. Qt5 and Skia at least have the (compile-time) capability, cairo doesn't.

          Ubuntu has specific patches to various libraries, I never managed to get the same look on Arch Linux and its derivatives without installing Ubuntu patched libraries, I don't know if they are still around in the repositories. Infinality was decent but not completely on par with Ubuntu.
          Say what you want about Ubuntu but their font setup is the absolute best and it's something I sorely miss when trying other distros.
          Canonical has invested some seriously manpower in getting a professional looking rendering system and a simple tweak doesn't give you their results.
          Getting the Ubuntu look involves compiling in subpixel rendering and globally selecting slight hinting (and maybe setting lcddefault as the LCD filter if you haven't done that). Done. They really didn't invest much here

          You can't configure font rendering in any single way to look best for everyone in all conditions. (My fonts look worse at the end of the day than at the beginning. Bet yours do, too.)
          No, but it's possible to find perfectly acceptable compromises that work in the vast majority of cases

          Have they accepted the patches that Ubuntu has been using for like the past 10 years yet?
          The only rendering-related patch that Ubuntu applies is to enable subpixel rendering that FreeType disables by default because it's still patented.

          The whole thing isn't really that new at all! FreeType's "light" autohinting already does something very similar: it only hints in one direction, vertically. Whether you use bytecode hinting or autohinting at this point typically doesn't make much of a difference anymore.
          So v40 is just slight hinting. But forced?
          Well, yes, but v40 is what's used by the native TrueType hinting interpreter. "slight" refers to the autohinter that does its' own thing regardless of what the hinting in the font says or doesn't. This means that full/medium and slight will look at lot more alike but not completely identical (depending on the font). See below.

          Slight hinting is vertical only hinting, which is exactly what they claim the new algorithm is. This really leaves me to wonder if there will be any difference between slight, medium and full hinting now.
          The principal difference is that TrueType hinting is explicit and deliberate, while the autohinter is luck and clever guesswork. Aside, plenty of TrueType fonts snap stems to full pixels vertically (e.g. Source * Pro, Acumin, google it), while others and the autohinter snap the outer edge of a stem to the grid but drag the inner edge along to preserve the actual thickness. You can tell the former by looking for aliasing when displaying a text waterfall. So when using hintmedium/full, you will encouter fonts that seem to look sharper (and "harder-edged") and others that will look smoother. Using the autohinter ("slight"), all fonts will look smooth.

          The *actual* problem with FreeType has been something completely different: LCD filtering and gamma correction. The LCD filter makes sure that color fringes are avoided while still providing a mostly sharp text image. Gamma correction is needed to basically adjust the boldness, particularly to avoid too thin strokes. Both have patent issues and therefore have bad fallback implementations in many distributions by default, e.g. Fedora.
          You're mixing things up. Subpixel rendering is still patented and therefore disabled in default FT builds, except on Ubuntu and I think Debian. Without subpixel rendering, you get plain old grayscale rendering. Gamma correction is not patented and must be done by the rendering library that blends text onto surfaces (read: the screen). Actually, it must compose the bitmap produced by FT onto a surface using linear alpha blending and then use gamma correction to produce correct output for sRGB screens (LAB+GC). Gamma correction will usually result in thinner strokes, emboldening is needed to counter the effect. Also, LAB+GC is critical to reduce color fringes of subpixel rendering to a minimum. Windows and Mac OS X have been doing LAB+GC for ages, Qt5 and Skia can do it, too, if you compile that option, but cairo can't, so no toolkit does it by default on Linux. That's why font rendering on Linux has never been correct and will never look better than on other systems until this is done universally. There is no way around this. Read https://www.freetype.org/freetype2/d...he-auto-hinter for a more extensive explanation. The freetype2-demo tools can be used to preview how a font is rendered correctly, as they used LAB+GC internally. Take their rendering as the reference
          Last edited by mudig; 17 July 2016, 06:45 PM.

          Comment


          • #25
            Originally posted by slacka View Post

            Yes, opening FontConfig is easy. But it's not like there is a single magic setting that gives you Ubuntu like rendering. And whatever tweaks/configure options Ubuntu uses, it's not just the latest version of FreeType either as I have never been able to get Arch to look as nice as Ubuntu has looked for years now.

            Canonical has invested some seriously manpower in getting a professional looking rendering system and a simple tweak doesn't give you their results.
            I feel you, no matter how much I played with fontconfig and Infinality patches I was never able to get any other distribution to look exactly like Ubuntu when it comes to system fonts and web fonts. And those people who claim Ubuntu did only a few tweaks are not correct, I used Ubuntu patched libraries on Arch Linux and still I didnt get exactly the same look, there must be more to it.

            Comment


            • #26
              Originally posted by mudig View Post
              Getting the Ubuntu look involves compiling in subpixel rendering and globally selecting slight hinting (and maybe setting lcddefault as the LCD filter if you haven't done that). Done. They really didn't invest much here
              Not true, I used Ubuntu patches on Arch Linux and fontconfig tweaks and it never looked exactly like Ubuntu, it was close but not identical. If it was that easy than people wouldnt complain so much about fonts on Linux, that Ubuntu font rendering is excellent is something nearly everyone agrees with therefore they would use those tweaks and enjoy, but obviously they do not copy the Ubuntu look completely.

              Comment


              • #27
                This is good news, font rendering in linux is kinda messy as is.

                Comment


                • #28
                  Hello, the subject interests me a little... I did a small comparison between FreeType vanilla-master/pre-2.7 (red frame) and FreeType 2.6.3-ubuntu (green frame) on Arch Linux.

                  You can see the comparison here : http://imgur.com/zwwY9O4

                  The difference is subtle, but Ubuntu's font rendering is still, indeed, superior (look closely at the 'M' in particular).
                  Last edited by kilbith; 17 July 2016, 08:47 PM.

                  Comment


                  • #29
                    I don't know about you guys, but I feel like the font rendering in Ubuntu is better than Windows.

                    Comment


                    • #30
                      http://www.antigrain.com/research/font_rasterization/ Are we there yet?

                      Comment

                      Working...
                      X