Re: Zero-width chars remapped, why?

Subject: Re: Zero-width chars remapped, why?
From: WJCarpenter (bill-abisource@carpenter.ORG)
Date: Wed Aug 15 2001 - 12:31:46 CDT

ms> This is a fundamental design flaw. I hope Bill Carpenter will fix
ms> and/or defend this otherwise I think we should disable it for Unix
ms> at least.

* I agree there is a design bug there (more below).

* Due to "day job" constraints, I am unlikely to be able to personally
  do anything about this for quite some time. There was some interest
  from others when this was discussed a couple weeks ago on this
  list. Perhaps a volunteer (with an actual knowlege of fonts,
  instead of my clumsy guesswork) will come forward. It is probably
  not a hard piece of work.

* Any particular user/admin for AbiWord can disable it. There is no
  GUI for it, but you can manually edit the preferences file and set
  RemapGlyphsMasterSwitch="0", which will turn it off.

ms> It was orginally put in place to do smart quote remapping but as
ms> Unix has no smart quote glyphs anyway it is quite useless on that

I completely disagree with this (perhaps you are mixing up two
distinct features). In fact, the opposite is true. It is on Unix
(motto: Home of the Dumb Fonts) where this is most usefull. If you
have a document with Unicode curly quotes in it (very common when
importing an MSWord document), this feature (with the default
settings) makes them appear on the screen with straight quote marks on
Unix. If you disable this feature, you will see nothing: no curly
quotes, no straight quotes, no nothin'. There is also some minor
cursor motion goofiness.

The feature was intended to do the following:

  When the font in use does not have a glyph for a given character,
  substitute a different glyph for display/print purposes.

Instead, the implementation actually does this:

  When the font in use has a zero-width glyph for a given character,
  substitute a different glyph for display/print purposes.

The bug was in assuming that "zero-width" meant "missing", which gives
miserable results for the Unicode combining characters. The fix idea
kicked around a few weeks ago was to make new methods on the AbiWord
font classes that would answer "isGlyphMissingFromFont" for any
particular character code point. In some platform/font technologies,
that question is easily answered. For others, the implementation
might have to fall back to "isGlyphZeroWidth", but at least we would
come out ahead on platforms where you could tell the difference.

bill@carpenter.ORG (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3

This archive was generated by hypermail 2b25 : Wed Aug 15 2001 - 14:21:35 CDT