Am 18.07.2014 um 14:57 schrieb Hans Hagen
On 7/18/2014 2:52 PM, Wolfgang Schuster wrote:
Am 18.07.2014 um 14:37 schrieb Hans Hagen
: On 7/18/2014 1:11 PM, Rob Heusdens wrote:
Short question about the font feature protrusion. This handles certain characters that get shifted into the right margin to make a more visable straight right margin. But can this font feature also handle left margin? For example, sentences that start in the left margin and begin with a quotation, there you would want the same effect also in the left margin. I currently use \kern-1ex to achieve the same effect for a sentence that commences on the left margin and starts with a quotation.
\setupfontprotrusion[mine][vector=quality,right=10,left=40] \definefontfeature[default][default][protrusion=mine] \setupalign[hanging]
\showframe
\starttext \input tufte \stoptext
... wondering why only the first and last line
On the first and last line are shifted because you don’t have protrusion values for letters at the begin of the other lines as can be seen in this table (from font-ext.lua):
vectors['alpha'] = {
[byte("A")] = { .05, .05 }, [byte("F")] = { 0, .05 }, [byte("J")] = { .05, 0 }, [byte("K")] = { 0, .05 }, [byte("L")] = { 0, .05 }, [byte("T")] = { .05, .05 }, [byte("V")] = { .05, .05 }, [byte("W")] = { .05, .05 }, [byte("X")] = { .05, .05 }, [byte("Y")] = { .05, .05 },
[byte("k")] = { 0, .05 }, [byte("r")] = { 0, .05 }, [byte("t")] = { 0, .05 }, [byte("v")] = { .05, .05 }, [byte("w")] = { .05, .05 }, [byte("x")] = { .05, .05 }, [byte("y")] = { .05, .05 },
}
ah, yes, those tables are probably flushed from my memory by now
BTW, is it intended that protrusion doesn’t work for indented lines? \setupfontprotrusion[mine][vector=punctuation,left=2] \definefontfeature[default][default][protrusion=mine] \setupalign[hanging] \starttext “Text” Text \blank \setupindenting[yes,medium] “Text” Text \stoptext Wolfgang