[Pkg-fonts-devel] Bug#882506: Bug#882506: Bug#882506: fonts-noto-mono: glitch with "fi" and "fl" sequences

Adam Borowski kilobyte at angband.pl
Thu Nov 23 23:40:55 UTC 2017


On Thu, Nov 23, 2017 at 11:08:10PM +0000, Medical Wei wrote:
> Rather than saying it is a bug it is actually a ligature [1] feature to
> squish texts together. There should be the software using the font to
> disable the feature if you need alignment.

If this shows in a font that's supposed to be monospaced, it is a bug.  The
font must not make replacements that change the length of a string (ie,
anything with wcwidth = 0 must not advance, wcwidth = 1 must advance by 1,
wcwidth = 2 must advance by 2[1]).

That is, a font must never squish "fi" and "fl" into one position; a
ligature can be used but only if it is rendered into a width of two
(FiraCode has a lot of ligatures obeying this constraint, although its
implementation causes unrelated problems).  If you want the ligature to be
squished, Unicode provides a way to do so: U+FB01 U+FB02 (fi fl).

The above obviously applies only to monospaced, variable-spaced has no
concept of a character cell, thus anything goes.

> > Package: fonts-noto-mono
> > Version: 20171026-2
> >
> > The sequences "fi" and "fl" are displayed incorrectly with Noto Sans
> > Mono (working with size 11 here, pressed for time, can't remember if so
> > with other sizes).
> >
> > Specifically, "f" followed by either "i" or "l" get squished together,
> > taking the width of a single character. Very annoying, not just
> > visually, but also aligning code to 80 chars.


[1]. There are some normative issues with wcwidth: see the yellow text on
https://www.unicode.org/reports/tr11/tr11-34.html which says current
implementations abuse a property that is not supposed to be used this way.
-- 
< darkling> When all you have is a hammock, every problem looks like a nap.



More information about the Pkg-fonts-devel mailing list