freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress update on adjustments database branch.


From: Brad Neimann
Subject: Re: Progress update on adjustments database branch.
Date: Mon, 12 Jun 2023 17:41:33 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

Hi Craig,

Really excited to see this! The demos look great.

- When the assumptions the algorithm makes are broken, it can do extreme modifications to the glyph's shape.  For example, this is what happens when you tell it that the double quotes character should be adjusted with the "one glyph stacked on another" mode:
https://imgur.com/a/JrUTMrQ
The algorithm arbitrarily chose one of the quotes as being higher, and pushed it until it cleared the other one by a pixel.  This would happen in practice if someone mapped codepoint i to double quotes in their font.  How much of an issue is this?  Do any fonts do this?  I could prevent it by limiting the distance it can push something up by a pixel or two.

From my experience in the language construction community, people do make fonts for artificial languages where characters are placed in Latin codepoints. (An example of this would be Mark Rosenfelder’s font for his ‘Verdurian’ language: see http://www.zompist.com/znakora.html for details.) Though decidedly an edge case, such characters might be severely affected by this bug. I feel sure there are fonts for natural languages with similar problems, though I’m having trouble finding any — it seems that almost everything Unicode-compatible these days!

As a fix, I think limiting the maximum distance sounds fine to me. Alternately, you could insert a preliminary check, and only move if e.g. the contours are located vertically above each other. (Perhaps you could take the centroids of the contours, and only move if their separation along the x-axis is less than a certain amount of pixels?)

- Werner previously suggested that a gap of less than one pixel, instead of one full pixel as I'm currently doing, might be better in some cases.  Does anyone know of such a case?

Perhaps that might work for more bulky diacritics, like rings ⟨åů⟩ and hooks ⟨ảẻỉỏủ⟩. Then again, one could question whether those even need any adjustment at all. (And in fact, as far as I can tell, uppercase ⟨Å⟩ often has the ring touching the letter.)

Regards,
Brad


reply via email to

[Prev in Thread] Current Thread [Next in Thread]