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? As in break out of onum and typeset in the normal numbers? I'm using TeXlive 2008 on vista, the pdf reports that I'm using XeTeX version; 2008.05.21 15:21. \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] Pdf; http://filebin.ca/rpctwz/testbackup.pdf or http://filebin.ca/rpctwz Thanks :) Mohamed % file % engine=xetex \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] \starttext \title {Introduction} \startlines 123456789 {\os 123456789} \stoplines {\sc On the \CONTEXT\ mailing list, occasionally a user asks if we can post a complete document with the associated style. One reason for not honouring this request is that we want users to cook up their own styles. Besides that, there are a couple of styles in the regular \CONTEXT\ distribution.} {\it When browsing through this document, a \CONTEXT\ user may wonder what style was used to achieve its look and feel. We hope that while reading the text and playing with the examples, the reader will accomplish the skills to define more than just simple layouts.} {\sl When browsing through this document, a \CONTEXT\ user may wonder what style was used to achieve its look and feel. We hope that while reading the text and playing with the examples, the reader will accomplish the skills to define more than just simple layouts.} {\it\sc This document is not easy reading. Occasionally we spend some time explaining features not described in the manuals. The design of this document is to a large extent determined by its purpose, and as a result not always functional. Also the order of presenting features, tips and tricks is kind of random and unstructured. The idea is that the visual effects will draw you to the right trick. Also, if you realy want to benefit from these features, there is no way but to read the whole story.} {\bf In spite of all its shortcomings, I hope that you enjoy reading this (yet unfinished) manual. Keep in mind that this manual is far from finished.} {\bi In spite of all its shortcomings, I hope that you enjoy reading this (yet unfinished) manual. Keep in mind that this manual is far from finished.} {\ss\sc In spite of all its shortcomings, I hope that you enjoy reading this (yet unfinished) manual. Keep in mind that this manual is far from finished.} \stoptext
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 \@EA \redotruefontna... \dotruefontname ... \??ff \fontclass #1\endcsname \else \@EA \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
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 -----------------------------------------------------------------
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
On Sat, Oct 11, 2008 at 10:10 PM, Mohamed Bana
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
Thanks. Works fine on Texlive 2008; This is XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7) ... ConTeXt ver: 2008.05.21 15:21 MKII fmt: 2008.9.8 int: english/english Wolfgang Schuster wrote:
On Sat, Oct 11, 2008 at 10:10 PM, Mohamed Bana
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 ___________________________________________________________________________________
Hi all! It's been a while!
I haven't been able to use ConTeXt since last spring, when my laptop
was stolen. I got a shiny new one a week ago (don't look at me -- it's
the insurance company's fault!) and now that I'm FINALLY back to
ConTeXt, I understand that a lot of time has passed since then and
that much must have changed.
So I would like to follow-up on this below.
By the way, I've installed the minimals and it works flawlessly. It
was a real pleasure to have ConTeXt set up and work in 5min. :-) (It
wasn't you guys' fault before, but mine).
That being said, I still use mkii and XeTeX. The typescripts quoted
below work for me also, but I would like to know again how to, or just
if I still can, combine this with \definefontfeature.
The thing is, I need more than oldstyle or smallcaps. I need frac=yes
for one document, and dlig=yes for another (those are the historical
ligatures contained in my font).
When I try to use my own set of features, something seems to stop
working: the trep feature. I get all the ugly apostrophes.
I made a dummy document using the typescript definition quoted below,
changed the font (I use Garamond Premier Pro) and I added the
following to use instead of default:
\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?
Can anyone help?
Thanks a lot in advance! It's very nice to be back to ConTeXt!
Jeff
On Tue, Oct 14, 2008 at 08:07, Wolfgang Schuster
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 ___________________________________________________________________________________
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
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
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 ___________________________________________________________________________________
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
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 ___________________________________________________________________________________
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 xxxx 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, xxxx=yes, xxxx=yes] \definefontsynonym[a font name][a physical font][features=myfontfeatures] in LuaTeX and XeTeX.
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 xxxx 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, xxxx=yes, xxxx=yes]
\definefontfeature [oldstyle] [script=latn,language=dflt,liga=yes,kern=yes,tlig=yes,onum=yes] \definefontfeature [myoldstyle] [oldstyle] [xxxx=yes,xxxx=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 -----------------------------------------------------------------
participants (8)
-
Hans Hagen
-
Jeff Smith
-
Mohamed Bana
-
Mohamed Bana
-
Mohamed Bana
-
Mojca Miklavec
-
Wolfgang Schuster
-
Yue Wang