Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Martin van Es
On Thursday, May 4, 2023 6:28:47 PM CEST Werner LEMBERG wrote:
> Below 12ppem, essentially *all* fonts, whether they are serif or
> sans-serif, look exactly the same – there are simply not enough
> possibilities to position the pixels differently and still maintain
> legibility.  You might simply use a single bitmap font instead.

That's where my roots are and what got replaced when I discovered hinting in 
well-designed ttf's like Verdana. And hinted Ubuntu (before the regression) is 
different enough to make that my preferred desktop font for the moment.

Oh well, taste...

Martin





Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Werner LEMBERG
> Below 12ppem, essentially *all* fonts, whether they are serif or
> sans-serif, look exactly the same

I mean: with bi-level rendering.


Werner



Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Werner LEMBERG

> [...] I also think nothing beats a well hinted font @9 points on a
> full-HD laptop screen which are still plenty around?

For my old eyes, this is too crisp, too much contrast.  I much prefer
anti-aliased subpixel hinting.  It's also more 'natural', that is, you
need less distortion from the real glyph shapes and advance widths.

Below 12ppem, essentially *all* fonts, whether they are serif or
sans-serif, look exactly the same – there are simply not enough
possibilities to position the pixels differently and still maintain
legibility.  You might simply use a single bitmap font instead.


Werner


Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Martin van Es
On Thursday, May 4, 2023 5:14:10 PM CEST Werner LEMBERG wrote:
> > I'm curious if they have motivation to make bad fonts with no
> > hinting?  does it somehow help when/if anti-aliasing is turned on?
> 
> 
> The relation between cost and benefit is no longer given: The
> percentage of people who actually use a low-DPI screen together with
> fonts rendered as monochrome is very near to zero.

I think you're right, but I also think nothing beats a well hinted font @9 
points on a full-HD laptop screen which are still plenty around?

Martin





Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread James Cloos
> "C" == Craig   writes:

C> I'm curious if they have motivation to make bad fonts with no
C> hinting?  does it somehow help when/if anti-aliasing is turned on?

i presume that the motivation is that:

werner's ttfautohint, which uses the same code as freetype, is the
only floss option to add automated instructions to a sfnt.

hiring someone to do manual instructing is expensive(!) and modern
monitors tend to have enough pixel density that unhinted or autohinted
grayscale looks fine.

-JimC
-- 
James Cloos  OpenPGP: 0x997A9F17ED7DAEA6



Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Werner LEMBERG

> I'm curious if they have motivation to make bad fonts with no
> hinting?  does it somehow help when/if anti-aliasing is turned on?

The relation between cost and benefit is no longer given: The
percentage of people who actually use a low-DPI screen together with
fonts rendered as monochrome is very near to zero.  Adding B/W hints
to fonts is *extremely* expensive because only a very small group of
experts is able to do it properly.

Apple ships OSX without hinting support since more than ten years,
IIRC.  The resolution of hand-held devices is normally higher than
200dpi – at such high DPI values it is simply not possible at all to
*see* the effects of B/W hinting.

For special devices that use very low DPI values (say, a small LCD
screen of a terminal at a supermarket counter) it is more
straightforward to create a set of bitmap strokes for the smallest
ppem values, doing 'normal' hinting for larger sizes.


Werner


Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Craig
possibly, but the last few people that care about non-antialiased fonts 
are probably on this email list.


I'm curious if they have motivation to make bad fonts with no hinting?  
does it somehow help when/if anti-aliasing is turned on?


-craig

On 5/4/23 06:20, Paul Menzel wrote:

Dear Martin, dear Craig,


Am 04.05.23 um 15:05 schrieb Craig:
this was exactly my observation as well... remove fonts-liberation2. 
it's increasingly

difficult with containerization/snaps, etc.

r,
-craig

On 5/4/23 03:33, Martin van Es wrote:

On Thursday, May 4, 2023 9:52:43 AM CEST Werner LEMBERG wrote:

I think you misremember, for the reason mentioned above – just to be
sure I've checked now that this variation font has no B/W hinting
instructions.  Its hinting was certainly equally bad with an older
version of FreeType.
Ok, I solved the problem. There were many coincidences playing a 
role in the

original report.

For starters the (real) regression in fonts-ubuntu triggered my 
attention, but
unlucky testing against Liberation Sans revealed a change in hinting 
between
fonts-liberation and fonts-liberation2, which wasn't installed on my 
reference
system. fonts-liberation2 lacks proper hinting (which showed on my 
23.04
system) but fonts-liberation is properly hinted (on the 22.04 
machine). Once

installed, fonts-liberation2 overrides all Liberation fonts, except for
Liberation Sans Narrow.

Removing fonts-liberation2 and downgrading fonts-ubuntu to fonts-
ubuntu_0.83-6ubuntu1_all.deb seems to solve all the reported problems.

My apologies for the noise and thanks for adding your thoughts to this!


Are the Ubuntu folks aware of this problem? If not, please create an 
issue in their (or Debian’s?) bug tracker [1].



Kind regards,

Paul


[1]: https://bugs.launchpad.net/





Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Paul Menzel

Dear Martin, dear Craig,


Am 04.05.23 um 15:05 schrieb Craig:
this was exactly my observation as well... remove fonts-liberation2. 
it's increasingly

difficult with containerization/snaps, etc.

r,
-craig

On 5/4/23 03:33, Martin van Es wrote:

On Thursday, May 4, 2023 9:52:43 AM CEST Werner LEMBERG wrote:

I think you misremember, for the reason mentioned above – just to be
sure I've checked now that this variation font has no B/W hinting
instructions.  Its hinting was certainly equally bad with an older
version of FreeType.
Ok, I solved the problem. There were many coincidences playing a role 
in the

original report.

For starters the (real) regression in fonts-ubuntu triggered my 
attention, but
unlucky testing against Liberation Sans revealed a change in hinting 
between
fonts-liberation and fonts-liberation2, which wasn't installed on my 
reference

system. fonts-liberation2 lacks proper hinting (which showed on my 23.04
system) but fonts-liberation is properly hinted (on the 22.04 
machine). Once

installed, fonts-liberation2 overrides all Liberation fonts, except for
Liberation Sans Narrow.

Removing fonts-liberation2 and downgrading fonts-ubuntu to fonts-
ubuntu_0.83-6ubuntu1_all.deb seems to solve all the reported problems.

My apologies for the noise and thanks for adding your thoughts to this!


Are the Ubuntu folks aware of this problem? If not, please create an 
issue in their (or Debian’s?) bug tracker [1].



Kind regards,

Paul


[1]: https://bugs.launchpad.net/



Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Craig
this was exactly my observation as well... remove fonts-liberation2.  
it's increasingly

difficult with containerization/snaps, etc.

r,
-craig

On 5/4/23 03:33, Martin van Es wrote:

On Thursday, May 4, 2023 9:52:43 AM CEST Werner LEMBERG wrote:

I think you misremember, for the reason mentioned above – just to be
sure I've checked now that this variation font has no B/W hinting
instructions.  Its hinting was certainly equally bad with an older
version of FreeType.

Ok, I solved the problem. There were many coincidences playing a role in the
original report.

For starters the (real) regression in fonts-ubuntu triggered my attention, but
unlucky testing against Liberation Sans revealed a change in hinting between
fonts-liberation and fonts-liberation2, which wasn't installed on my reference
system. fonts-liberation2 lacks proper hinting (which showed on my 23.04
system) but fonts-liberation is properly hinted (on the 22.04 machine). Once
installed, fonts-liberation2 overrides all Liberation fonts, except for
Liberation Sans Narrow.

Removing fonts-liberation2 and downgrading fonts-ubuntu to fonts-
ubuntu_0.83-6ubuntu1_all.deb seems to solve all the reported problems.

My apologies for the noise and thanks for adding your thoughts to this!


Martin








Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Martin van Es
On Thursday, May 4, 2023 9:52:43 AM CEST Werner LEMBERG wrote:
> I think you misremember, for the reason mentioned above – just to be
> sure I've checked now that this variation font has no B/W hinting
> instructions.  Its hinting was certainly equally bad with an older
> version of FreeType.

Ok, I solved the problem. There were many coincidences playing a role in the 
original report.

For starters the (real) regression in fonts-ubuntu triggered my attention, but 
unlucky testing against Liberation Sans revealed a change in hinting between 
fonts-liberation and fonts-liberation2, which wasn't installed on my reference 
system. fonts-liberation2 lacks proper hinting (which showed on my 23.04 
system) but fonts-liberation is properly hinted (on the 22.04 machine). Once 
installed, fonts-liberation2 overrides all Liberation fonts, except for 
Liberation Sans Narrow.

Removing fonts-liberation2 and downgrading fonts-ubuntu to fonts-
ubuntu_0.83-6ubuntu1_all.deb seems to solve all the reported problems.

My apologies for the noise and thanks for adding your thoughts to this!


Martin





Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Werner LEMBERG

>> This is B/W monochrome rendering with full hinting.  As can be
>> seen, the result is just fine.  I'm quite confident that the
>> problem is *not* with FreeType.
> 
> This is a regression from 22.10 to 23.04 and Ubuntu(-mono) has seen
> some changes since 22.10, so let's compare the same font, because I
> do suspect weird (libfreetype?) behaviour on Ubuntu 23.04 which I
> can't explain.
> 
> Attached is a screenshot of OpenSans-VariableFont_wdth,wght.ttf
> using the same commandline.

Well, all variation fonts I'm aware of have *zero* TrueType hints for
B/W rendering!  In case you are using Ubuntu VF (I've seen the demo on
https://design.ubuntu.com/font but didn't find the place where to
download it), I'm very confident that the same is true for this font.
In other words, if you want good B/W rendering of the Ubuntu font,
don't use the VF incarnation of it.

> Attached is a screenshot of OpenSans-VariableFont_wdth,wght.ttf
> using the same commandline. It clearly shows bad hinting and I'm
> convinced this looked better hinted on 22.04 [...]

I think you misremember, for the reason mentioned above – just to be
sure I've checked now that this variation font has no B/W hinting
instructions.  Its hinting was certainly equally bad with an older
version of FreeType.

You might try to enforce auto-hinting in B/W mode, which should
improve things slightly.  However, be warned that the results are
*far* from good in many cases; we actually don't support auto-hinting
in B/W mode.


Werner


Re: Hinting regression in Ubuntu 23.04

2023-05-04 Thread Martin van Es
On Wednesday, May 3, 2023 3:45:21 PM CEST Werner LEMBERG wrote:
> I've just tested a self-compiled version of current git, together with
> the `ftview` demo program, using UbuntuMono-R.ttf (version 0.8, last
> modified 2011-09-26).  Attached is a screenshot of the following call
> 
>   ftview -kA5 -e unic 16 UbuntuMono-R.ttf
> 
> This is B/W monochrome rendering with full hinting.  As can be seen,
> the result is just fine.  I'm quite confident that the problem is
> *not* with FreeType.

This is a regression from 22.10 to 23.04 and Ubuntu(-mono) has seen some 
changes since 22.10, so let's compare the same font, because I do suspect 
weird (libfreetype?) behaviour on Ubuntu 23.04 which I can't explain.

Attached is a screenshot of OpenSans-VariableFont_wdth,wght.ttf using the same 
commandline. It clearly shows bad hinting and I'm convinced this looked better 
hinted on 22.04, so I suspect it will look correct on your system too?

https://fonts.google.com/specimen/Open+Sans

I also attach the hinted non-AA ftinspect view of the same font.

ftview and ftinspect were compiled against freetype 2.13.0. As far as I can 
tell, I'm using libfreetype 2.13.0 to render fonts on my system (I don't know 
whether that's important for ftview and ftinspect?)



Martin

Re: Hinting regression in Ubuntu 23.04

2023-05-03 Thread Werner LEMBERG

> Ubuntu 23.04 has a regression in hinted font rendering and possibly
> RGB subpixel rendering. I already tried replacing libfreetype with
> the last known good version of 22.10 and compiled 2.13.0 to see if
> that made any improvements but it didn't (as far as I can tell).

I don't use Ubuntu, so I can't help.

> I do understand that distro specific issues are not FreeType's
> concern but both Ubuntu developers and other contributors to the
> issue (including me) are failing to understand what's happing and
> why e.g. MS's Verdana is rendered using perfect hinting?

I've just tested a self-compiled version of current git, together with
the `ftview` demo program, using UbuntuMono-R.ttf (version 0.8, last
modified 2011-09-26).  Attached is a screenshot of the following call

  ftview -kA5 -e unic 16 UbuntuMono-R.ttf

This is B/W monochrome rendering with full hinting.  As can be seen,
the result is just fine.  I'm quite confident that the problem is
*not* with FreeType.

In general, I recommend that you play around with the demo programs.
If you prefer a nifty graphical interface you might try `ftinspect`,
which was greatly enhanced in FreeType version 2.13.0.



Werner