ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* optical bounds with hanging diacritics
@ 2018-11-24 21:02 Pablo Rodriguez
  2018-11-25 18:26 ` luigi scarso
  2018-11-26 23:33 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2018-11-24 21:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

Hans,

I added lfbd values for GFS Didot (attached) to get hanging diacritics
in Greek.

The attached PDF document is the optput from the following code:

    \showframe
    \setuplayout[topspace=1cm, height=middle, footer=0cm, header=0cm]
    \definefontfeature[default][default]
        [protrusion=quality, opbd=yes, script=grek]
    \definefontfamily[mainface][rm][GFS Didot]
    \setupbodyfont[mainface, 325pt]
    \setupalign[hanging]
    \starttext
    Α\\Ἀ\\Α\\Ἁ\\Α\\Ἂ\\Α\\Ἃ\\Α\\Ἄ\\Α\\Ἅ\\Α\\Ἆ\\Α\\Ἇ

    Ἐ\\Ε\\Ἑ\\Ε\\Ἒ\\Ε\\Ἓ\\Ε\\Ἔ\\Ε\\Ἕ\\Ε

    Ἠ\\Η\\Ἡ\\Η\\Ἢ\\Η\\Ἣ\\Η\\Ἤ\\Η\\Ἥ\\Η\\Ἦ\\Η\\Ἧ\\Η

    Ἰ\\Ι\\Ἱ\\Ι\\Ἲ\\Ι\\Ἳ\\Ι\\Ἴ\\Ι\\Ἵ\\Ι\\Ἶ\\Ι\\Ἷ\\Ι

    Ὀ\\Ο\\Ὁ\\Ο\\Ὂ\\Ο\\Ὃ\\Ο\\Ὄ\\Ο\\Ὅ\\Ο

    Ρ\\Ῥ

    Ὑ\\Υ\\Ὓ\\Υ\\Ὕ\\Υ\\Ὗ\\Υ

    Ὠ\\Ω\\Ὡ\\Ω\\Ὢ\\Ω\\Ὣ\\Ω\\Ὤ\\Ω\\Ὥ\\Ω\\Ὦ\\Ω\\Ὧ\\Ω
    \stoptext

BTW, to get pure lfbd values, I had to replace line 361 from
font-imp-quality lua with:

   local p = d/1000

Raw lfbd and rtbd values from the font could be set with
protrusion=opentype (or a similar option).

I hope it is clear now why raw values from the font are needed.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

[-- Attachment #2: GFSDidot-Regular.otf --]
[-- Type: application/vnd.oasis.opendocument.formula-template, Size: 181268 bytes --]

[-- Attachment #3: left-bounds.pdf --]
[-- Type: application/pdf, Size: 30870 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: optical bounds with hanging diacritics
  2018-11-24 21:02 optical bounds with hanging diacritics Pablo Rodriguez
@ 2018-11-25 18:26 ` luigi scarso
  2018-11-25 19:40   ` Pablo Rodriguez
  2018-11-26 23:33 ` Hans Hagen
  1 sibling, 1 reply; 5+ messages in thread
From: luigi scarso @ 2018-11-25 18:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 307 bytes --]

On Sun, Nov 25, 2018 at 7:24 PM Pablo Rodriguez <oinos@gmx.es> wrote:

> Hans,
>
> I added lfbd values for GFS Didot (attached) to get hanging diacritics
> in Greek.
>
> The attached PDF document is the optput from the following code:
>

the pdf is too big .. I have unlocked it for this time...

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 685 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: optical bounds with hanging diacritics
  2018-11-25 18:26 ` luigi scarso
@ 2018-11-25 19:40   ` Pablo Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2018-11-25 19:40 UTC (permalink / raw)
  To: ntg-context

On 11/25/18 7:26 PM, luigi scarso wrote:
> On Sun, Nov 25, 2018 at 7:24 PM Pablo Rodriguez wrote:
> 
>     Hans,
> 
>     I added lfbd values for GFS Didot (attached) to get hanging diacritics
>     in Greek.
> 
>     The attached PDF document is the optput from the following code:
> 
> 
> the pdf is too big .. I have unlocked it for this time...

Sorry, Luigi, I forgot that we had a maximum size for the message
(attachments included).

The PDF document isn’t that big (30KB). The font with the OT lfbd values
is a bigger file (177KB).

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: optical bounds with hanging diacritics
  2018-11-24 21:02 optical bounds with hanging diacritics Pablo Rodriguez
  2018-11-25 18:26 ` luigi scarso
@ 2018-11-26 23:33 ` Hans Hagen
  2018-11-27 16:08   ` Pablo Rodriguez
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2018-11-26 23:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

On 11/24/2018 10:02 PM, Pablo Rodriguez wrote:
> Hans,
> 
> I added lfbd values for GFS Didot (attached) to get hanging diacritics
> in Greek.
> 
> The attached PDF document is the optput from the following code:
> 
>      \showframe
>      \setuplayout[topspace=1cm, height=middle, footer=0cm, header=0cm]
>      \definefontfeature[default][default]
>          [protrusion=quality, opbd=yes, script=grek]
>      \definefontfamily[mainface][rm][GFS Didot]
>      \setupbodyfont[mainface, 325pt]
>      \setupalign[hanging]
>      \starttext
>      Α\\Ἀ\\Α\\Ἁ\\Α\\Ἂ\\Α\\Ἃ\\Α\\Ἄ\\Α\\Ἅ\\Α\\Ἆ\\Α\\Ἇ
> 
>      Ἐ\\Ε\\Ἑ\\Ε\\Ἒ\\Ε\\Ἓ\\Ε\\Ἔ\\Ε\\Ἕ\\Ε
> 
>      Ἠ\\Η\\Ἡ\\Η\\Ἢ\\Η\\Ἣ\\Η\\Ἤ\\Η\\Ἥ\\Η\\Ἦ\\Η\\Ἧ\\Η
> 
>      Ἰ\\Ι\\Ἱ\\Ι\\Ἲ\\Ι\\Ἳ\\Ι\\Ἴ\\Ι\\Ἵ\\Ι\\Ἶ\\Ι\\Ἷ\\Ι
> 
>      Ὀ\\Ο\\Ὁ\\Ο\\Ὂ\\Ο\\Ὃ\\Ο\\Ὄ\\Ο\\Ὅ\\Ο
> 
>      Ρ\\Ῥ
> 
>      Ὑ\\Υ\\Ὓ\\Υ\\Ὕ\\Υ\\Ὗ\\Υ
> 
>      Ὠ\\Ω\\Ὡ\\Ω\\Ὢ\\Ω\\Ὣ\\Ω\\Ὤ\\Ω\\Ὥ\\Ω\\Ὦ\\Ω\\Ὧ\\Ω
>      \stoptext
> 
> BTW, to get pure lfbd values, I had to replace line 361 from
> font-imp-quality lua with:
> 
>     local p = d/1000

two issues:

- no 1000 but units
- we need to be able to go less extreme, so we keep factor

so something

local p = lfactor * d/units

> Raw lfbd and rtbd values from the font could be set with
> protrusion=opentype (or a similar option).
> 
> I hope it is clear now why raw values from the font are needed.

fwiw it looks a  bit too excessive to me (i'm not sure if graphical 
elements like those accents which are part of the character needs that 
much protrusion)

> Many thanks for your help,
> 
> Pablo
> 
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: optical bounds with hanging diacritics
  2018-11-26 23:33 ` Hans Hagen
@ 2018-11-27 16:08   ` Pablo Rodriguez
  0 siblings, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2018-11-27 16:08 UTC (permalink / raw)
  To: ntg-context

On 11/27/18 12:33 AM, Hans Hagen wrote:
> On 11/24/2018 10:02 PM, Pablo Rodriguez wrote:
>> [...]
>> BTW, to get pure lfbd values, I had to replace line 361 from
>> font-imp-quality lua with:
>>
>>     local p = d/1000
> 
> two issues:
> 
> - no 1000 but units
> - we need to be able to go less extreme, so we keep factor
> 
> so something
> 
> local p = lfactor * d/units

Many thanks for your reply, Hans.

The new definition is fine for me.

BTW, I have an issue issue with the font feature. I cannot have both
default and the opbd as font features, such as in:

    \setuplayout[topspace=1cm, height=middle, footer=0cm, header=0cm]
    \definefontfeature[newfeature]
        [protrusion=opentype, opbd=yes, script=grek]
    \definefontfamily[mainface][rm]
        [GFS Didot][features={default, newfeature}]
    \setupbodyfont[mainface, 325pt]
    \setupalign[hanging]
    \starttext
    Α\\Ἇ
    \stoptext

I guess this may be related to "script=grek", but I don’t know whehter
I’m doing something wrong.

>> I hope it is clear now why raw values from the font are needed.
> 
> fwiw it looks a  bit too excessive to me (i'm not sure if graphical 
> elements like those accents which are part of the character needs that 
> much protrusion)

I agree. These are excessive values, but this is rather a very
particular case.

Hanging diacritics are used only in poetry, not in prose:
https://www.researchgate.net/publication/2417759_From_Unicode_to_Typography_a_Case_Study_the_Greek_Script
(section “1.6.2 Hanging Diacritics” on page 21).

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-11-27 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-24 21:02 optical bounds with hanging diacritics Pablo Rodriguez
2018-11-25 18:26 ` luigi scarso
2018-11-25 19:40   ` Pablo Rodriguez
2018-11-26 23:33 ` Hans Hagen
2018-11-27 16:08   ` Pablo Rodriguez

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).