ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Arthur Reutenauer <arthur.reutenauer@normalesup.org>
To: Mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Greek in luatex
Date: Sun, 16 Sep 2007 01:22:48 +0200	[thread overview]
Message-ID: <20070915232248.GA24842@phare.normalesup.org> (raw)
In-Reply-To: <073BCD9E-D500-4FDC-BA74-46D703D8B4C2@uni-bonn.de>

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

>                         there were a couple of problems that I just  
> couldn't resolve, especially regarding the characters with an iota  
> subscript:

  Indeed. This is a problem with the Fontforge code applying the GSUB
features: the 'grbl' feature is defined by two lookups, one being a list
of single substitutions (h -> eta) and the other a list of ligature
substitutions (h bar -> eta with subscribed iota).  Now, since the latter
has to take precedence to avoid conflicts, I explicitely put it before
the other, but it seems that Fontforge ignores this and applies the list
of single substitutions before the other (this is confirmed by the cache
file BosporosU@greek-babel.tma where the lookup with the single
substitutions, called "GreelBabelLookupSimple", appears first in the
gsub table).

  Note that this doesn't happen for substitutions *inside* a lookup (so
things like "greater eta bar" and "eta bar" don't conflict since they're
both ligature substitutions and I put the former before in the list, and
the substitutions are correctly applied.  As a far as I understand, this
behaviour is actually compliant with the Opentype specifications and is
quite widespread among typesetting engines and so it is not (only)
Fontforge's fault; but, needless to say, it is nevertheless annoying.
(In more crude terms: Opentype does not specify anything in that respect,
so manufacturers of typesetting software can do whatever they want ...)

  Thomas: to solve the problem at hand, you can try the new feature
file I send along with a small test (I simply define a new feature that is
to be applied after 'grbl', to deal specifically with the subscribed iotas).

	Arthur

[-- Attachment #2: greek-babel-extended.fea --]
[-- Type: text/plain, Size: 8742 bytes --]

# An Opentype feature to replace the Babel input scheme

# Not quite complete; some rhos with breathings and accents are missing (where
# are they?) and the final sigma isn't accounted for.

lookup GreekBabelLookupSimple {
    lookupflag 0 ;
	sub a	by alpha ;
	sub b	by beta ;
	sub g	by gamma ;
	sub d	by delta ;
	sub e	by epsilon ;
	sub z	by zeta ;
	sub h	by eta ;
	sub j	by theta ;
	sub i	by iota ;
	sub k	by kappa ;
	sub l	by lambda ;
	sub m	by mu ;
	sub n	by nu ;
	sub x	by xi ;
	sub o	by omicron ;
	sub p	by pi ;
	sub r	by rho ;
	sub c	by sigmafinal ;
	sub s	by sigma ;
	sub t	by tau ;
	sub u	by upsilon ;
	sub f	by phi ;
	sub q	by chi ;
	sub y	by psi ;
	sub w	by omega ;
	sub A	by Alpha ;
	sub B	by Beta ;
	sub G	by Gamma ;
	sub D	by Delta ;
	sub E	by Epsilon ;
	sub Z	by Zeta ;
	sub H	by Eta ;
	sub J	by Theta ;
	sub I	by Iota ;
	sub K	by Kappa ;
	sub L	by Lambda ;
	sub M	by Mu ;
	sub N	by Nu ;
	sub X	by Xi ;
	sub O	by Omicron ;
	sub P	by Pi ;
	sub R	by Rho ;
	sub C	by Uni03C2 ;
	sub S	by Sigma ;
	sub T	by Tau ;
	sub U	by Upsilon ;
	sub F	by Phi ;
	sub Q	by Chi ;
	sub Y	by Psi ;
	sub W	by Omega ;
	sub semicolon	by periodcentered ;
} GreekBabelLookupSimple ;

lookup GreekBabelLookupMultiple {
    lookupflag 1 ;
	# sub s 'space by sigmafinal ;
	sub greater  a by uni1F00 ;
	sub greater  A by uni1F08 ;
	sub greater  e by uni1F10 ;
	sub greater  E by uni1F18 ;
	sub greater  h by uni1F20 ;
	sub greater  H by uni1F28 ;
	sub greater  i by uni1F30 ;
	sub greater  I by uni1F38 ;
	sub greater  o by uni1F40 ;
	sub greater  O by uni1F48 ;
	sub greater  u by uni1F50 ;
	# sub greater  U by uni1F58 ;
	sub greater  w by uni1F60 ;
	sub greater  W by uni1F68 ;
	sub greater grave a by uni1F02 ;
	sub greater grave A by uni1F0A ;
	sub greater grave e by uni1F12 ;
	sub greater grave E by uni1F1A ;
	sub greater grave h by uni1F22 ;
	sub greater grave H by uni1F2A ;
	sub greater grave i by uni1F32 ;
	sub greater grave I by uni1F3A ;
	sub greater grave o by uni1F42 ;
	sub greater grave O by uni1F4A ;
	sub greater grave u by uni1F52 ;
	# sub greater grave U by uni1F5A ;
	sub greater grave w by uni1F62 ;
	sub greater grave W by uni1F6A ;
	sub greater quotesingle a by uni1F04 ;
	sub greater quotesingle A by uni1F0C ;
	sub greater quotesingle e by uni1F14 ;
	sub greater quotesingle E by uni1F1C ;
	sub greater quotesingle h by uni1F24 ;
	sub greater quotesingle H by uni1F2C ;
	sub greater quotesingle i by uni1F34 ;
	sub greater quotesingle I by uni1F3C ;
	sub greater quotesingle o by uni1F44 ;
	sub greater quotesingle O by uni1F4C ;
	sub greater quotesingle u by uni1F54 ;
	sub greater quotesingle U by uni1F5C ;
	sub greater quotesingle w by uni1F64 ;
	sub greater quotesingle W by uni1F6C ;
	sub greater asciitilde a by uni1F06 ;
	sub greater asciitilde A by uni1F0E ;
	sub greater asciitilde e by uni1F16 ;
	sub greater asciitilde E by uni1F1E ;
	sub greater asciitilde h by uni1F26 ;
	sub greater asciitilde H by uni1F2E ;
	sub greater asciitilde i by uni1F36 ;
	sub greater asciitilde I by uni1F3E ;
	sub greater asciitilde o by uni1F46 ;
	sub greater asciitilde O by uni1F4E ;
	sub greater asciitilde u by uni1F56 ;
	sub greater asciitilde U by uni1F5E ;
	sub greater asciitilde w by uni1F66 ;
	sub greater asciitilde W by uni1F6E ;
	sub less  a by uni1F01 ;
	sub less  A by uni1F09 ;
	sub less  e by uni1F11 ;
	sub less  E by uni1F19 ;
	sub less  h by uni1F21 ;
	sub less  H by uni1F29 ;
	sub less  i by uni1F31 ;
	sub less  I by uni1F39 ;
	sub less  o by uni1F41 ;
	sub less  O by uni1F49 ;
	sub less  u by uni1F51 ;
	sub less  U by uni1F59 ;
	sub less  w by uni1F61 ;
	sub less  W by uni1F69 ;
	sub less grave a by uni1F03 ;
	sub less grave A by uni1F0B ;
	sub less grave e by uni1F13 ;
	sub less grave E by uni1F1B ;
	sub less grave h by uni1F23 ;
	sub less grave H by uni1F2B ;
	sub less grave i by uni1F33 ;
	sub less grave I by uni1F3B ;
	sub less grave o by uni1F43 ;
	sub less grave O by uni1F4B ;
	sub less grave u by uni1F53 ;
	sub less grave U by uni1F5B ;
	sub less grave w by uni1F63 ;
	sub less grave W by uni1F6B ;
	sub less quotesingle a by uni1F05 ;
	sub less quotesingle A by uni1F0D ;
	sub less quotesingle e by uni1F15 ;
	sub less quotesingle E by uni1F1D ;
	sub less quotesingle h by uni1F25 ;
	sub less quotesingle H by uni1F2D ;
	sub less quotesingle i by uni1F35 ;
	sub less quotesingle I by uni1F3D ;
	sub less quotesingle o by uni1F45 ;
	sub less quotesingle O by uni1F4D ;
	sub less quotesingle u by uni1F55 ;
	sub less quotesingle U by uni1F5D ;
	sub less quotesingle w by uni1F65 ;
	sub less quotesingle W by uni1F6D ;
	sub less asciitilde a by uni1F07 ;
	sub less asciitilde A by uni1F0F ;
	sub less asciitilde e by uni1F17 ;
	sub less asciitilde E by uni1F1F ;
	sub less asciitilde h by uni1F27 ;
	sub less asciitilde H by uni1F2F ;
	sub less asciitilde i by uni1F37 ;
	sub less asciitilde I by uni1F3F ;
	sub less asciitilde o by uni1F47 ;
	sub less asciitilde O by uni1F4F ;
	sub less asciitilde u by uni1F57 ;
	sub less asciitilde U by uni1F5F ;
	sub less asciitilde w by uni1F67 ;
	sub less asciitilde W by uni1F6F ;
	sub grave a by uni1F70 ;
	sub quotesingle a by uni1F71 ;
	sub grave e by uni1F72 ;
	sub quotesingle e by uni1F73 ;
	sub grave h by uni1F74 ;
	sub quotesingle h by uni1F75 ;
	sub grave i by uni1F76 ;
	sub quotesingle i by uni1F77 ;
	sub grave o by uni1F78 ;
	sub quotesingle o by uni1F79 ;
	sub grave u by uni1F7A ;
	sub quotesingle u by uni1F7B ;
	sub grave w by uni1F7C ;
	sub quotesingle w by uni1F7D ;
	sub grave A by uni1FBA ;
	sub quotesingle A by uni1FBB ;
	sub grave E by uni1FC8 ;
	sub quotesingle E by uni1FC9 ;
	sub grave H by uni1FCA ;
	sub quotesingle H by uni1FCB ;
	sub grave I by uni1FDA ;
	sub quotesingle I by uni1FDB ;
	sub grave U by uni1FEA ;
	sub quotesingle U by uni1FEB ;
	sub grave W by uni1FFA ;
	sub quotesingle W by uni1FFB ;
	sub greater  a bar by uni1F80 ;
	sub greater  A bar by uni1F88 ;
	sub greater  h bar by uni1F90 ;
	sub greater  H bar by uni1F98 ;
	sub greater  w bar by uni1FA0 ;
	sub greater  W bar by uni1FA8 ;
	sub greater grave a bar by uni1F82 ;
	sub greater grave A bar by uni1F8A ;
	sub greater grave h bar by uni1F92 ;
	sub greater grave H bar by uni1F9A ;
	sub greater grave w bar by uni1FA2 ;
	sub greater grave W bar by uni1FAA ;
	sub greater quotesingle a bar by uni1F84 ;
	sub greater quotesingle A bar by uni1F8C ;
	sub greater quotesingle h bar by uni1F94 ;
	sub greater quotesingle H bar by uni1F9C ;
	sub greater quotesingle w bar by uni1FA4 ;
	sub greater quotesingle W bar by uni1FAC ;
	sub greater asciitilde a bar by uni1F86 ;
	sub greater asciitilde A bar by uni1F8E ;
	sub greater asciitilde h bar by uni1F96 ;
	sub greater asciitilde H bar by uni1F9E ;
	sub greater asciitilde w bar by uni1FA6 ;
	sub greater asciitilde W bar by uni1FAE ;
	sub less  a bar by uni1F81 ;
	sub less  A bar by uni1F89 ;
	sub less  h bar by uni1F91 ;
	sub less  H bar by uni1F99 ;
	sub less  w bar by uni1FA1 ;
	sub less  W bar by uni1FA9 ;
	sub less grave a bar by uni1F83 ;
	sub less grave A bar by uni1F8B ;
	sub less grave h bar by uni1F93 ;
	sub less grave H bar by uni1F9B ;
	sub less grave w bar by uni1FA3 ;
	sub less grave W bar by uni1FAB ;
	sub less quotesingle a bar by uni1F85 ;
	sub less quotesingle A bar by uni1F8D ;
	sub less quotesingle h bar by uni1F95 ;
	sub less quotesingle H bar by uni1F9D ;
	sub less quotesingle w bar by uni1FA5 ;
	sub less quotesingle W bar by uni1FAD ;
	sub less asciitilde a bar by uni1F87 ;
	sub less asciitilde A bar by uni1F8F ;
	sub less asciitilde h bar by uni1F97 ;
	sub less asciitilde H bar by uni1F9F ;
	sub less asciitilde w bar by uni1FA7 ;
	sub less asciitilde W bar by uni1FAF ;
	sub grave a bar by uni1FB2 ;
	sub quotesingle a bar by uni1FB4 ;
	sub grave h bar by uni1FC2 ;
	sub quotesingle h bar by uni1FC4 ;
	sub grave w bar by uni1FD2 ;
	sub quotesingle w bar by uni1FD4 ;
	sub asciitilde a by uni1FB6 ;
	sub asciitilde a bar by uni1FB7 ;
	sub asciitilde h by uni1FC6 ;
	sub asciitilde h bar by uni1FC7 ;
	sub asciitilde w by uni1FD6 ;
	sub asciitilde w bar by uni1FD7 ;
	sub greater r by uni1FE4 ;
	sub less r by uni1FE5 ;
	sub less R by uni1FEC ;
} GreekBabelLookupMultiple ;

lookup GreekBabel2LookupMultiple {
    lookupflag 1 ;
	sub alpha bar by uni1FB3 ;
	sub eta bar by uni1FC3 ;
	sub omega bar by uni1FF3 ;
} GreekBabel2LookupMultiple ;

feature grbl {

    script DFLT ;
	language dflt ;
	    lookup GreekBabelLookupMultiple ;
	    lookup GreekBabelLookupSimple ;

    script latn;
	language dflt ;
	    lookup GreekBabelLookupMultiple ;
	    lookup GreekBabelLookupSimple ;
} grbl ;

feature grb2 {

    script DFLT ;
	language dflt ;
	    lookup GreekBabel2LookupMultiple ;

    script latn;
	language dflt ;
	    lookup GreekBabel2LookupMultiple ;
} grb2 ;


[-- Attachment #3: subscribed_iotas.tex --]
[-- Type: text/x-tex, Size: 378 bytes --]

% For Thomas Schmitz.
% Deal with subscribed iotas
\installfontfeature[otf][grbl]
\installfontfeature[otf][grb2]

\definefontfeature
   [greek-babel]
   [mode=node,language=dflt,script=latn,
    grbl=yes,grb2=yes,featurefile=greek-babel-extended.fea]

\font\bosphoros=name:BosporosU*greek-babel at 20pt

\starttext

\catcode`\~=11
\catcode`\|=11

\bosphoros
a| h| w|

\stoptext

[-- Attachment #4: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2007-09-15 23:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-01 10:56 Thomas A. Schmitz
2007-09-11  6:47 ` Thomas A. Schmitz
2007-09-11 10:12   ` Hans Hagen
2007-09-13  1:15   ` Arthur Reutenauer
2007-09-13  7:03     ` Taco Hoekwater
2007-09-13 10:24       ` Arthur Reutenauer
2007-09-13 11:38         ` Taco Hoekwater
2007-09-13 12:54           ` Thomas A. Schmitz
2007-09-13 18:36           ` Arthur Reutenauer
2007-09-13 18:49             ` Hans Hagen
2007-09-13 19:24             ` Hans Hagen
2007-09-13 19:45               ` Arthur Reutenauer
2007-09-13 20:20                 ` Hans Hagen
2007-09-14  0:24                   ` Arthur Reutenauer
2007-09-13 20:38                 ` Thomas A. Schmitz
2007-09-13 21:05                   ` Hans Hagen
2007-09-13 21:52                     ` Taco Hoekwater
2007-09-15 23:22                   ` Arthur Reutenauer [this message]
2007-09-16  6:56                     ` Taco Hoekwater
2007-09-16  8:22                     ` Taco Hoekwater
2007-09-16 13:01                       ` Thomas A. Schmitz
2007-09-16 23:12                         ` Hans Hagen
2007-09-16 13:08                       ` Arthur Reutenauer
2007-09-16 13:44                         ` Thomas A. Schmitz
2007-09-17  8:48                     ` Hans Hagen
2007-09-13 17:42       ` Hans Hagen
2007-09-13  9:45     ` Thomas A. Schmitz
2007-09-13 10:49       ` Arthur Reutenauer
2007-09-13 12:51         ` Thomas A. Schmitz
2007-09-13 14:25         ` Taco Hoekwater
2007-09-13 17:51       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070915232248.GA24842@phare.normalesup.org \
    --to=arthur.reutenauer@normalesup.org \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).