Re: ligature selections (was Re: undo and combining characters)

From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Wed Apr 24 2002 - 03:41:32 EDT

  • Next message: F J Franklin: "Re: The preference file and plugins?"

     --- Paul Rohr <paul@abisource.com> wrote: > At 03:54
    AM 4/24/02 +0100, Andrew Dunbar wrote:
    > > --- Paul Rohr <paul@abisource.com> wrote:
    > >> Yep. That's what we'd need to implement. Doing
    > the
    > >> math for this may not
    > >> be too hard, though. Two simple suggestions:
    > >>
    > >> 1. Take the width of the ligature and divide by
    > the
    > >> number of characters it
    > >> represents. This might not be pretty, but
    > the
    > >> overall effect should be
    > >> self-explanatory.
    > >
    > >Umm no because you're assuming ligatures always
    > have
    > >two halves being on the left and the right. This
    > is
    > >not so! lam+alef do work this way, others such as
    > >anything involving mim, or lam+jim have the two
    > halves
    > >displayed vertically.
    >
    > Correct. This approach assumes that we're doing
    > either cluster or stacked
    > boundaries.
    >
    > To be clear, even divisions won't *ever* look pretty
    > enough to reproduce in
    > a Unicode manual (except by accident). This
    > approach just gives clear
    > visual feedback that you only selected "a third" of
    > the glyph. No more, no
    > less.

    I don't think the feedback will be as clear as you
    suggest in many cases. Arabic fonts tend to be small
    and have skinny letters. It's hard to tell just what
    is and what isn't selected.

    > >For Indian languages it gets
    > >even more complicated. A vowel can actually have a
    > >part drawn on the left of the consonant and a part
    > >drawn on the right. I don't even know if the fonts
    > >encode information that would make highlighting
    > these
    > >cases possible...
    >
    > Right. Without a ton of shaping and composition
    > information from the fonts,
    > you can't properly highlight just the right portions
    > of such complex glyphs.

    Pango should be able to do this - I have no idea if it
    does it at this point though - you should be able to
    tell it somehow that you want certain codepoints
    "normal" and certain ones "highlighted".

    I've used editors that get this right for combining
    characters but I haven't seen it for ligatures.
    I think Yudit was one such.

    > However, you can still show the user that they got
    > "one half" or "one third"
    > of this mess. In this respect, it may actually be
    > more useful than the
    > slightly smarter guesstimate in the following
    > approach.
    >
    > >> 2. Take the widths of the "standalone" glyphs,
    > and
    > >> use them to
    > >> proportionally subdivide the width of the
    > >> ligature. However, I'm not
    > >> sure whether the results would be "good
    > enough"
    > >> in real life. You'd
    > >> have to test.
    > >
    > >That wouldn't work at all. For example, alef is
    > only
    > >one pixel wide, lam and lam+alef are about the same
    > >width.
    >
    > OK, so the math may take more than a morning to get
    > right. For this
    > particular screw case, say that:
    >
    > width(lam) == 13 pixels
    > width(alef) == 1 pixel
    > width(lam+alef) == 13 pixels
    >
    > If subdividing 13 into 12 + 1 doesn't look right,
    > you tweak the math so it's
    > 11 + 2. (GUI hackers who've done enough
    > pixel-twiddling are familiar with
    > this kind of hackish math.)
    >
    > The goal isn't to be precise here -- for that, as we
    > keep saying, you want
    > lots of font information -- but to do a good enough
    > job to give the user a
    > decent sense of what's going on.

    I wonder if Pango has this ability or if it'd make a
    good suggestion for them? CCing Owen and Havoc...

    Andrew Dunbar.

    > Paul,
    > trying to defend his math

    =====
    http://linguaphile.sourceforge.net http://www.abisource.com

    __________________________________________________
    Do You Yahoo!?
    Everything you'll ever need on one web page
    from News and Sport to Email and Music Charts
    http://uk.my.yahoo.com



    This archive was generated by hypermail 2.1.4 : Wed Apr 24 2002 - 03:42:51 EDT