ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fonthandling/protrusion question: handling of left margin
@ 2014-07-18 11:11 Rob Heusdens
  2014-07-18 12:37 ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Heusdens @ 2014-07-18 11:11 UTC (permalink / raw)
  To: ntg-context

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fonthandling/protrusion question: handling of left margin
  2014-07-18 11:11 Fonthandling/protrusion question: handling of left margin Rob Heusdens
@ 2014-07-18 12:37 ` Hans Hagen
  2014-07-18 12:52   ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2014-07-18 12:37 UTC (permalink / raw)
  To: ntg-context

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fonthandling/protrusion question: handling of left margin
  2014-07-18 12:37 ` Hans Hagen
@ 2014-07-18 12:52   ` Wolfgang Schuster
  2014-07-18 12:57     ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2014-07-18 12:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 18.07.2014 um 14:37 schrieb Hans Hagen <pragma@wxs.nl>:

> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fonthandling/protrusion question: handling of left margin
  2014-07-18 12:52   ` Wolfgang Schuster
@ 2014-07-18 12:57     ` Hans Hagen
  2014-07-18 13:10       ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2014-07-18 12:57 UTC (permalink / raw)
  To: Wolfgang Schuster, mailing list for ConTeXt users

On 7/18/2014 2:52 PM, Wolfgang Schuster wrote:
>
> Am 18.07.2014 um 14:37 schrieb Hans Hagen <pragma@wxs.nl>:
>
>> 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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fonthandling/protrusion question: handling of left margin
  2014-07-18 12:57     ` Hans Hagen
@ 2014-07-18 13:10       ` Wolfgang Schuster
  2014-07-18 13:17         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2014-07-18 13:10 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


Am 18.07.2014 um 14:57 schrieb Hans Hagen <pragma@wxs.nl>:

> On 7/18/2014 2:52 PM, Wolfgang Schuster wrote:
>> 
>> Am 18.07.2014 um 14:37 schrieb Hans Hagen <pragma@wxs.nl>:
>> 
>>> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fonthandling/protrusion question: handling of left margin
  2014-07-18 13:10       ` Wolfgang Schuster
@ 2014-07-18 13:17         ` Hans Hagen
  2014-07-18 19:26           ` Jan Tosovsky
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2014-07-18 13:17 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 7/18/2014 3:10 PM, Wolfgang Schuster wrote:
>
> Am 18.07.2014 um 14:57 schrieb Hans Hagen <pragma@wxs.nl>:
>
>> On 7/18/2014 2:52 PM, Wolfgang Schuster wrote:
>>>
>>> Am 18.07.2014 um 14:37 schrieb Hans Hagen <pragma@wxs.nl>:
>>>
>>>> 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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fonthandling/protrusion question: handling of left margin
  2014-07-18 13:17         ` Hans Hagen
@ 2014-07-18 19:26           ` Jan Tosovsky
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Tosovsky @ 2014-07-18 19:26 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users', 'Wolfgang Schuster'

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-07-18 19:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-18 11:11 Fonthandling/protrusion question: handling of left margin Rob Heusdens
2014-07-18 12:37 ` Hans Hagen
2014-07-18 12:52   ` Wolfgang Schuster
2014-07-18 12:57     ` Hans Hagen
2014-07-18 13:10       ` Wolfgang Schuster
2014-07-18 13:17         ` Hans Hagen
2014-07-18 19:26           ` Jan Tosovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).