Fonthandling/protrusion question: handling of left margin
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. Greetings, Rob
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 Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
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 }, } Wolfgang
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 Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
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
On 7/18/2014 3:10 PM, Wolfgang Schuster wrote:
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
probably intended (not sure about hanging) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2014-07-18 Hans Hagen wrote:
On 7/18/2014 3:10 PM, Wolfgang Schuster wrote:
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
probably intended (not sure about hanging)
I've reported something related some time ago: http://tracker.luatex.org/view.php?id=884 Jan
participants (4)
-
Hans Hagen
-
Jan Tosovsky
-
Rob Heusdens
-
Wolfgang Schuster