lout-users
[Top][All Lists]
Advanced

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

Re: 3.13: Word baselines


From: Valeriy E. Ushakov
Subject: Re: 3.13: Word baselines
Date: Mon, 15 Feb 1999 12:55:20 +0300

On Mon, Feb 15, 1999 at 03:19:43AM -0500, Chip Salzenberg wrote:

> This patch makes 3.13 behave as I think it must -- making various
> words on the same line share a common baseline.

It's not that simple.  @Eq relies on the fact that the hmark goes
through the middle of the word.  So moving the hmark to the baseline
(which is a good thing) is only half of the solution.

The other pieces are necessary.  First, a proposed @WShift symbol
(tentative name), that would apply implicit @VShift to every word in
it's right parameter.  Second, x-height should be exported as a length
unit, say `x', so that @Eq could use 0.5x @WShift to move the mark
where it expects it to be.

@WShift also necessary, for example, for Tibetan typesetting (my
louttib package), where letters share the common "headline" not the
baseline, but fonts usually have some conventional baseline.
Currently, louttib just insert @VShift before every word in its
output:

    # Shift tibetan word to line up heads of tibetan letters with
    # XHeight of the surrounding european text.  When inline tibetan
    # is requested transliterator applies this to every word.  The
    # whole phrase can not be shifted because of implicit @OneRow that
    # prevents phrase from being split across multiple lines.

    # -0.41f will make hmark to go through the heads of tibetan
    # letters.  This will allow us to line-up tibetan text of
    # different sizes heads to heads.

    # Then every word is vshifted +0.3y. `y' unit is set to the font
    # size of surrounding roman text.  So this will line up heads of
    # tibetan letters with approximately XHeight of the roman text.

    def @_w right word {               -0.41f @VShift word }

    # weird way to do math ;-)
    def @_i right word { +0.3y @VShift -0.41f @VShift word }


And generated code looks like this, with @_i (or @_w for displayed)
inserted before every word:

@address@hidden "o\360-" @_i "\173\41\174-" @_i "ok\42-" @_i "z\42c\174.."}}


With @WShift I could write in @_LoutTib the style for Tibetan to be:

    1f @YUnit                           # remember roman font size
    # ... font selection &c
    +0.3y  @WShift                      # <- to align with roman
    -0.41f @WShift                      # <- to align along the headline
    @Body


Hmm, this could even be generalazied to a hook similar to @Enclose for
galley components...  Have to think about it.


Just my $0.02.

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


reply via email to

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