Hello Hans,

I compared tex-text and trep, tlig. Since you map features=default to
trep and tlig, and both of them further to tex-text (twice), tex-text
could be split in two parts as well, so that you can make one-to-one
mapping.

Should I make those changes and seny you the two files? (Twice 300
bytes to be added to ConTeXt + souce, which is approximately the same
as written below.)

1.) TREP

function fonts.initializers.base.otf.texquotes(tfm,value)
    tfm.characters[0x0022] = table.fastcopy(tfm.characters[0x201D])
    tfm.characters[0x0027] = table.fastcopy(tfm.characters[0x2019])
    tfm.characters[0x0060] = table.fastcopy(tfm.characters[0x2018])
end

Corresponding lines from XeTeX:

U+0022;  ;  ;   >;U+201D;  ; " -> right double quote
U+0027;  ;  ;  <>;U+2019;  ; ' -> right single quote
U+0060;  ;  ;  <>;U+2018;  ; ` -> left single quote

2.) TLIG

{ "endash", "hyphen hyphen" },
U+002D U+002D; ;  ;  <>;U+2013;  ; -- -> en dash

{ "emdash", "hyphen hyphen hyphen" },
U+002D U+002D U+002D;<>;U+2014;  ; --- -> em dash

{ "quotedblright", "quotesingle quotesingle" },
U+0027 U+0027; <>;U+201D;  ; '' -> right double quote

{ "quotedblleft", "grave grave" },
U+0060 U+0060; <>;U+201C;  ; `` -> left double quote

{ "quotedblbase", "comma comma" }
U+002C U+002C; <>;U+201E;  ; ,, -> DOUBLE LOW-9 QUOTATION MARK

missing from tex-text (not needed so far)

{ "quotedblleft", "quoteleft quoteleft" },
0x2018 0x2018 <> 0x201C ; 2x left single quote -> left double quote

{ "quotedblright", "quoteright quoteright" },
0x2019 0x2019 <> 0x201D ; 2x right single quote -> right double quote

3.) Only in XeTeX's tex-text (Do people need it?):

U+0021 U+0060; <>;U+00A1;  ; !` -> inverted exclam
U+003F U+0060; <>;U+00BF;  ; ?` -> inverted question

U+003C U+003C; <>;U+00AB;  ; << -> LEFT POINTING GUILLEMET
U+003E U+003E; <>;U+00BB;  ; >> -> RIGHT POINTING GUILLEMET



Plus, there's a little problem with this patch that I have sent you
(it's not in stable yet, so it might make sense to fix it before
releasing):

\definefontsynonym[Dummy]          [name:\typescripttwo]   [features=default]
\definefontsynonym[DummyItalic]    [name:\typescripttwo/I] [features=default]
\definefontsynonym[DummyBold]      [name:\typescripttwo/B] [features=default]
\definefontsynonym[DummyBoldItalic][name:\typescripttwo/BI][features=default]

\definefontsynonym[DummyCaps]      [name:\typescripttwo]   [features=smallcaps]


The problem is that "features=default" implies "script=latn", which is
not always desired. A copy of mapping=tex-text comes from tlig & trep
substitution.
I assume that script=latn;language=dflt;+liga;+kern; is always on by
default (were needed), so basically mapping=tex-text is the only thing
that really needs to be added.

[Iwona-Bold.otf]:script=latn;language=dflt;+liga;+kern;mapping=tex-text;mapping=tex-text;


Some (non-latin) fonts complain when one requests non-existing features.

Also, it might be handy to be able to define
    \definetypeface[basic][rm][Xserif][whatever][script=arab,language=...]
(for now forget that one, interface needs to be extended once and properly).


    \definefontsynonym[a][file:Iwona-Bold.otf][mapping=tex-text]
doesn't work, so the only way seems to be
    \definefontfeature[xetex][mapping=tex-text]
    \definefontsynonym[a][file:Iwona-Bold.otf][xetex]

I have tried to use
    \definefontfeature[xetex][mapping=tex-text]
    \definefontfeature[caps][+smcp]
    \definefontsynonym[a][file:Iwona-Bold.otf][features={xetex,caps}]
but that didn't work.

Mojca
_______________________________________________
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to