Re: [NTG-context] XeTeX old style numerals

2008-10-19 Thread Mohamed Bana
I ought to mention small caps doesn't work with the last approach.

Wolfgang Schuster wrote:
 On Sat, Oct 11, 2008 at 10:10 PM, Mohamed Bana [EMAIL PROTECTED] wrote:
 So ... can someone provide a sample file of a document that uses old
 style by default?

 Clearly the following doesn't work;
 
 The fast way (works only for MkII):
 
 \definefontfeature[default][deault][script=latn,onum=yes]
 
 \definetypeface[myface][rm][Xserif][Minion Pro]
 % i've also tried
 %\definetypeface[myface][rm][Xserif][Warnock Pro]
 \definetypeface[myface][ss][Xsans][Myriad Pro]
 \definetypeface[myface][tt][Xmono][Consolas]
 \setupbodyfont[myface, 11pt]
 
 The better way (works for MkII and MkIV):
 
 \starttypescript [serif] [minion-pro]
   \setups[font:fallback:serif]
   \definefontsynonym [Serif]   [MinionPro-Regular]
 [features=default]
   \definefontsynonym [SerifBold]   [MinionPro-Bold]   
 [features=default]
   \definefontsynonym [SerifItalic] [MinionPro-Italic] 
 [features=default]
   \definefontsynonym [SerifBoldItalic] [MinionPro-BoldItalic] 
 [features=default]
 \stoptypescript
 
 \starttypescript [serif] [minion-pro-os]
   \setups[font:fallback:serif]
   \definefontsynonym [Serif]   [MinionPro-Regular]
 [features=oldstyle]
   \definefontsynonym [SerifBold]   [MinionPro-Bold]
 [features=oldstyle]
   \definefontsynonym [SerifItalic] [MinionPro-Italic]
 [features=oldstyle]
   \definefontsynonym [SerifBoldItalic] [MinionPro-BoldItalic]
 [features=oldstyle]
 \stoptypescript
 
 \starttypescript [serif] [minion-pro,minion-pro-os]
   \definefontsynonym [MinionPro-Regular][file:MinionPro-Regular]
 [features=default]
   \definefontsynonym [MinionPro-Bold]   [file:MinionPro-Bold]
 [features=default]
   \definefontsynonym [MinionPro-Italic] [file:MinionPro-It]
 [features=default]
   \definefontsynonym [MinionPro-BoldItalic] [file:MinionPro-BoldIt]
 [features=default]
 \stoptypescript
 
 \starttypescript [minion-pro,minion-pro-os]
   \definetypeface [minion-pro] [rm] [serif] [\typescriptone] [default]
 \stoptypescript
 
 %\usetypescript[minion-pro]
 \usetypescript[minion-pro-os]
 \setupbodyfont[minion-pro]
 
 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  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___
 

___
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
___


Re: [NTG-context] XeTeX old style numerals

2008-10-18 Thread Mojca Miklavec
On Sat, Oct 18, 2008 at 11:19 PM, Jeff Smith wrote:

 \definefontfeature[bodyfeatures][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes,trep=yes,dlig=yes]

 I get the onum and dlig working with this, but, like I said, the trep
 doesn't work. If I am not mistaken, it's this feature that makes the
 apostrophe look like the comma. Am I right?

Short answer: tlig, not trep.

Long answer:

See the folder fonts/misc/xetex/fontmapping.

Hans invented tlig and trep as a short word for tex ligatures and tex
replacements. That's still a bit unstable area of ConTeXt, but at the
beginning it indeed included all the replacements and all the
ligatures of Knuthian TeX. But that was too much for my taste (many
useless conversions like `?, `! and all the quotation marks, as well
as some really nasty ones as a side effect: it kept converting grave
accent into quotation mark for example).

With some consensus we decided to keep only three of them: endash,
emdash and apostrophe. In LuaTeX these might still be split (tlig for
endash and emdash and trep for apostrophe). In XeTeX it seemed to much
overhaul to split three replacements into (three :) files, so I made
only a single one: tlig.[map|tec]

You can use it as mapping=tlig in plain XeTeX. What ConTeXt does is
a conversion from tlig=yes into mapping=tlig. trep used to map to
tex-text (so did tlig) a while ago, now I guess that it doesn't do
anything at all.

I find it a bit unlucky situation that the behaviour is a bit
different, but introducing a new file trep.map with only a single
replacement would be even more weird  confusing to me.

Mojca
___
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
___


Re: [NTG-context] XeTeX old style numerals

2008-10-18 Thread Jeff Smith
Thank you Mojca for this quick reply! I didn't expect one right away,
so I'm glad I'm not the only one not wanting to leave ConTeXt aside
even during the weekend. ;-) So tlig it is.

Thanks again!
Jeff

On Sat, Oct 18, 2008 at 17:56, Mojca Miklavec
[EMAIL PROTECTED] wrote:
 On Sat, Oct 18, 2008 at 11:19 PM, Jeff Smith wrote:

 \definefontfeature[bodyfeatures][method=node,script=latn,language=dflt,liga=yes,onum=yes,kern=yes,trep=yes,dlig=yes]

 I get the onum and dlig working with this, but, like I said, the trep
 doesn't work. If I am not mistaken, it's this feature that makes the
 apostrophe look like the comma. Am I right?

 Short answer: tlig, not trep.

 Long answer:

 See the folder fonts/misc/xetex/fontmapping.

 Hans invented tlig and trep as a short word for tex ligatures and tex
 replacements. That's still a bit unstable area of ConTeXt, but at the
 beginning it indeed included all the replacements and all the
 ligatures of Knuthian TeX. But that was too much for my taste (many
 useless conversions like `?, `! and all the quotation marks, as well
 as some really nasty ones as a side effect: it kept converting grave
 accent into quotation mark for example).

 With some consensus we decided to keep only three of them: endash,
 emdash and apostrophe. In LuaTeX these might still be split (tlig for
 endash and emdash and trep for apostrophe). In XeTeX it seemed to much
 overhaul to split three replacements into (three :) files, so I made
 only a single one: tlig.[map|tec]

 You can use it as mapping=tlig in plain XeTeX. What ConTeXt does is
 a conversion from tlig=yes into mapping=tlig. trep used to map to
 tex-text (so did tlig) a while ago, now I guess that it doesn't do
 anything at all.

 I find it a bit unlucky situation that the behaviour is a bit
 different, but introducing a new file trep.map with only a single
 replacement would be even more weird  confusing to me.

 Mojca
 ___
 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
 ___

___
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
___


Re: [NTG-context] XeTeX old style numerals

2008-10-11 Thread Mohamed Bana
So ... can someone provide a sample file of a document that uses old 
style by default?

Clearly the following doesn't work;

\definetypeface[myface][rm][Xserif][Minion Pro]
% i've also tried
%\definetypeface[myface][rm][Xserif][Warnock Pro]
\definetypeface[myface][ss][Xsans][Myriad Pro]
\definetypeface[myface][tt][Xmono][Consolas]
\setupbodyfont[myface, 11pt]

Thanks

Hans Hagen wrote:
 Mohamed Bana wrote:
 Mojca Miklavec wrote:
 On Fri, Sep 19, 2008 at 8:07 PM, Mohamed Bana wrote:
   
 Hi guys,

 Why doesn't this definition use the old style numerals that come with the 
 font?
  It seems to use the latin modern font when I try to use \os.  Small caps 
 are
 working fine.
 
 \os is kind of special because it's related to the fact that good old 
 tex and the cm fonts have oldstyles in some math font and therefore some 
   effort is needed to use it in text
 
 we might consider mapping \os to something
 
 \def\os{\groupedcommand{\setfontfeature{oldstyle}}{}}
 
 which in mkiv will make
 
 1234567890 {\os 1234567890} 1234567890
 
 work
 

___
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
___


Re: [NTG-context] XeTeX old style numerals

2008-09-21 Thread Hans Hagen
Yue Wang wrote:
 The problem is that that's only a dirty trick that is not supposed to
 work and might stop working in the future, so I would rather try not
 to rely on it. A better interface for XeTeX typescripts (something
 similar to fontspec) is missing heavily.

 
 I prefer use opentype features  than add some non-standard
 definition like fontspec.

i have no clue what you mean here

 so I dont think fontspec do a good job.

 You can always use
 \definefontfeature
  [myfontfeatures]
  [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,onum=yes,
 =yes, =yes]

\definefontfeature
  [oldstyle]
  [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,onum=yes]

\definefontfeature
  [myoldstyle]
  [oldstyle]
  [=yes,=yes]

 \definefontsynonym[a font name][a physical font][features=myoldstyle]


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XeTeX old style numerals

2008-09-20 Thread Hans Hagen
Mohamed Bana wrote:
 Mojca Miklavec wrote:
 On Fri, Sep 19, 2008 at 8:07 PM, Mohamed Bana wrote:
   
 Hi guys,

 Why doesn't this definition use the old style numerals that come with the 
 font?
  It seems to use the latin modern font when I try to use \os.  Small caps 
 are
 working fine.

\os is kind of special because it's related to the fact that good old 
tex and the cm fonts have oldstyles in some math font and therefore some 
  effort is needed to use it in text

we might consider mapping \os to something

\def\os{\groupedcommand{\setfontfeature{oldstyle}}{}}

which in mkiv will make

1234567890 {\os 1234567890} 1234567890

work


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XeTeX old style numerals

2008-09-20 Thread Yue Wang

 The problem is that that's only a dirty trick that is not supposed to
 work and might stop working in the future, so I would rather try not
 to rely on it. A better interface for XeTeX typescripts (something
 similar to fontspec) is missing heavily.


I prefer use opentype features  than add some non-standard
definition like fontspec.
so I dont think fontspec do a good job.


You can always use
\definefontfeature
 [myfontfeatures]
 [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,onum=yes,
=yes, =yes]

\definefontsynonym[a font name][a physical font][features=myfontfeatures]

in LuaTeX and XeTeX.
___
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
___


Re: [NTG-context] XeTeX old style numerals

2008-09-19 Thread Mojca Miklavec
On Fri, Sep 19, 2008 at 8:07 PM, Mohamed Bana wrote:
 Hi guys,

 Why doesn't this definition use the old style numerals that come with the 
 font?
  It seems to use the latin modern font when I try to use \os.  Small caps are
 working fine.

 I'd like all the numbers in the document to be typeset in old style numerals
 unless I tell it otherwise, btw how do I achieve the latter?

I didn't tell you that:

\definefontfeature
 [default]
 [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,onum=yes]

(the important setting is only onum=yes)

The problem is that that's only a dirty trick that is not supposed to
work and might stop working in the future, so I would rather try not
to rely on it. A better interface for XeTeX typescripts (something
similar to fontspec) is missing heavily.



Concerning your first problem: I have tried patching Xsans definitions with

\definefontfeature
  [oldstyle]
  [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,onum=yes]

\starttypescript[Xserif][all][name]
\definefontsynonym [DummyOldStyle]  [name:\typescripttwo]   [features=oldstyle]
%\definefontsynonym [DummyOldStyle]  [name:'\typescripttwo']
[features=oldstyle]
\definefontsynonym [OldStyle]   [DummyOldStyle]
\stoptypescript

\definetypeface[myface][rm][Xserif][Warnock Pro]
\setupbodyfont[myface, 11pt]

\starttext
{\os 123456789}
\stoptext

but I have no idea why it fails.

kpathsea: Invalid fontname `name:Warnock', contains ':'
! Font \thedefinedfont=name:Warnock not loadable: Metric (TFM) file or installe
d font not found.
to be read again
   P
argument name:Warnock P
 ro
\dotruefontname ... #1\endcsname *#2#3\fi \else #1
  \ifx #2\empty \else *#2#3\...

\dotruefontname ... \??ff \fontclass #1\endcsname
  \else [EMAIL PROTECTED] 
\redotruefontna...

\dotruefontname ... \??ff \fontclass #1\endcsname
  \else [EMAIL PROTECTED] 
\redotruefontna...

\symbolicsizedfont ...ntname {\glyphfontfile {#3}}
   at \currentfontbodyscale ...
l.32 {\os
  123456789}

The alternative fails with

kpathsea: Invalid fontname `name:Warnock Pro*oldstyle', contains ':'
! Font \thedefinedfont=name:Warnock Pro*oldstyle at 11.0pt not loadable: Metr
ic (TFM) file or installed font not found.
recently read \scaledfont

\symbolicsizedfont ...ntfontbodyscale \scaledfont
  \thedefinedfont
l.32 {\os
  123456789}


Mojca
___
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
___