Subject: bug#24582: 25.1; liga incorrect work (dublicate)

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 11 Aug 2020 15:55:13 +0200

YAMAMOTO Mitsuharu <[email-masked]> writes:

>> Please see the attached screenshot.
>>> So the problem is text alignment due to display of characters such
>>> as ⇒, is that right?
>> Yes
>
> I could reproduce it with Hasklig 11pt.  Does the following patch work
> for you?

This was more than three years ago, but there was no followup.  The
patch still applies to Emacs 28, and it compiles and runs on Macos
without any immediately adverse effects.

Alan, does this patch look reasonable to you?

> -     WIDTH_FRAC_SCALE.  For synthetic monospace fonts, they represent
> +     WIDTH_FRAC_SCALE.  For monospace fonts, non-zero `width_frac'
> +     means `width_int' is further adjusted to a multiple of the
> +     (rounded) font width, and `width_frac' represents adjustment per
> +     unit character.  For synthetic monospace fonts, they represent

[...]

> +/* If FONT is monospace and WIDTH can be regarded as a multiple of its
> +   width where the multiplier is greater than 1, then return the
> +   multiplier.  Otherwise return 0.  */
> +static int
> +macfont_monospace_width_multiplier (struct font *font, CGFloat width)
> +{

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no