lua-users home
lua-l archive

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


On Thu, Dec 6, 2012 at 12:00 PM, Hans Hagen <pragma@wxs.nl> wrote:
> On 12/6/2012 8:22 PM, Jay Carlson wrote:
>
>> I'll call it likely non-conformant and a bad example to draw lessons
>> from. As a rule of thumb, display of NFC (generally, precomposed when >
>> possible) and NFD (decomposed) should be indistinguishable, especially
>> in the case of single combining marks; the fact that it is not makes > me
>> suspect there are other bugs lurking around. The display itself is
>> a bug if you consider crappy typography to be a bug (and I suspect
>> you do, based on your complaint about the aesthetics of the
>> decomposed case).
>
> It has to do with resolution: in a precomposed glyph the glyph is one and
> snapping on the grid which can have a relation to screen pixels and/or
> anti-aliasing involves the whole shape (possibly driven by hinting). When
> composing, the shapes are independent and snapping is less related as there
> are 'moves' involved. So, at low resolutions things can easily look bad. If
> you have 1920 pixels / 100 glyphs you have less than 20 pixels per glyph.
> Add some margins and spacing and you have way less. In that respect it's
> already a miracle that things on the average look quite ok (partly thanks to
> subpixels juggling).
>
> (When bitmap fonts were still the fashion one had to explicitly generate
> them for the output device and also make sure to compensate for a built-up
> of inaccuracy as well as snapping on the device grid. With outline fonts and
> cross platform portable floating point this is less an issue today.)
>
> Hans

That may affect the aesthetics of composed characters but it's
actually beside the point. Often the component glyphs going into a
composed character DON'T look like the precomposed glyph -- especially
accents over capital letters.

If a font offers a precomposed glyph for a given composed character,
failing to use it is a shortcoming of the renderer. As I said before,
composed characters should be treated as ligatures by a good font
renderer, with precomposed glyphs being preferred to assembling
component glyphs if they're available. It will ALWAYS be a superior
visual result.

/s/ Adam