[NTG-context] font features in the wiki
Dear list, since Hans has asked me for an addition to the wiki, I was thinking of adding a complete explanation of font features. I must admit that https://wiki.contextgarden.net/Featuresets wouldn’t be the best way that I would choose to explain this. Of course, I don’t want to impose my view on this topic. I wonder whether it would make sense that I start a new article on font features and when finished, see the way to merge the contents from the featureset. I’m especially asking Idris, Hraban and MHB. Of course, I might be wrong and I’m happy to be corrected about my proposal on font features in the wiki. 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features
On 11/3/22 19:24, Hans Hagen via ntg-context wrote: You're going way too complex. Access to features and info has alwaye been part of mkic (and therefore lmtx). You can peek into the s-font* styles for all kind of ways to get overviews. Anyway, the following helper operates on the current font: Thank you, Hans! Yes, I had a hunch that most of this was unnecessary because the information is already there. I also thought it would be convenient to have a helper script that could display everything before I decide whether I want to add a font to my texmf-font tree... Will play with this and then wikify! All best Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features
On 11/3/2022 2:03 PM, Thomas A. Schmitz via ntg-context wrote: On 11/3/22 13:27, Henning Hraban Ramm via ntg-context wrote: If it works for you, then it’s a problem of my installation, otherwise a regression in current LMTX... No, I get the same error message, this looks promising but doesn't work. And at the risk of sounding grumpy, but all of this is too much manual intervention; I would like to have a completely automated script. So I'll show what I have and add a few comments: local Feature_Table = { } local Parsed_Features = { } local My_Font = environment.arguments["font"] local Font_Features = os.resultof("otfinfo -f " .. My_Font) for Feature_Sigla, Feature_Name in string.gmatch(Font_Features, "(%S-)\t(.-)\n") do Feature_Table[Feature_Sigla] = Feature_Name end COMMENTS Expectation: this should return a list of all features and their descriptions as a lua table. If you run the file as context test.cld --font="/path/to/font" this works, and you get a table Feature_Table={ ["aalt"]="Access All Alternates", ["c2sc"]="Small Capitals From Capitals"} etc. CODE for name, _ in pairs(Feature_Table) do Context_Name = "f:" .. name Parsed_Features[name] = Context_Name context.definefontfeature( { Context_Name }, { name="yes" } ) end COMMENTS This should produce a lua table with ConTeXt fontfeatures and define those features. The table appears to be correct: Parsed_Features={ ["aalt"]="f:aalt", ["c2sc"]="f:c2sc"} etc. So I expected that this should be equivalent to \definefontfeature [f:aalt] [aalt=yes] and return a list of defined features. CODE local Test_String = [[ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890 1/4 2/8 3/9 ffi ft fi fl ffl ]] local Font_Name = os.resultof("otfinfo -a " .. My_Font) context.definefontfamily( { "Test" }, { "serif" }, { Font_Name }, {} ) context.setupbodyfont{ "Test, 12pt" } COMMENTS Again, this works; the font is set as bodyfont. CODE context.starttext() for name, feature in pairs(Feature_Table) do context.start () context.addfeature { Parsed_Features[name] } context.midaligned (feature) context.bold (Parsed_Features[name]) context.par () context.blank{ "medium" } context(Test_String) context.par () context.stop () end context.stoptext() COMMENTS And this doesn't work: the names are picked up, but the font features are not defined; the sample text does not reflect any features. So this is what I've got... maybe one of the wizards can help. You're going way too complex. Access to features and info has alwaye been part of mkic (and therefore lmtx). You can peek into the s-font* styles for all kind of ways to get overviews. Anyway, the following helper operates on the current font: \starttext \startluacode function document.ShowFeatures(script) local test = [[ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890 1/4 2/8 3/9 ffi ft fi fl ffl ]] local font = fonts.hashes.identifiers[true] local features = font.resources.features -- inspect(features) for name, detail in table.sortedhash(features.gsub) do if #name == 4 then context.type(name) context.quad() if script then context.type(script) context.quad() end -- this should be doen once in order to save memory -- not too hard to do .. context.definefontfeature( { "f:"..name }, { [name] = "yes", script = script } ) context.start() context.addff("f:"..name) context(test) context.stop() context.blank() end end end \stopluacode \definedfont[LibertinusSerif-Regular.otf*always] \ctxlua{document.ShowFeatures()} % \ctxlua{document.ShowFeatures("latn")} % \ctxlua{document.ShowFeatures("grek")} \stoptext But, be aware that (1) features can combine in weird ways, (2) some features are only meant to be applied to a sunset of characters, (3) some are driven by script and/or language. Also, (4) you need to load the font without any features except the ones that enable node mode. So, now you need to wikify ... Hans - 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 /
Re: [NTG-context] font features
On 11/3/2022 12:52 PM, Herbert Voss via ntg-context wrote: Am 03.11.22 um 12:37 schrieb Thomas A. Schmitz via ntg-context: Hi, is there an easy way to get a list of all features that a font has and typeset a sample text to see the result of every single feature? There probably is, but I couldn't find anything... You'll get only the features with otfinfo in the terminal. For example: iMac:~ voss$ otfinfo -f `kpsewhich LibertinusSerif-Regular.otf` c2sc Small Capitals From Capitals calt Contextual Alternates case Case-Sensitive Forms ccmp Glyph Composition/Decomposition cpsp Capital Spacing dlig Discretionary Ligatures frac Fractions hlig Historical Ligatures kern Kerning liga Standard Ligatures lnum Lining Figures mark Mark Positioning mkmk Mark to Mark Positioning onum Oldstyle Figures pnum Proportional Figures salt Stylistic Alternates smcp Small Capitals ss01 Stylistic Set 1 ss02 Stylistic Set 2 ss03 Stylistic Set 3 ss04 Stylistic Set 4 ss05 Stylistic Set 5 ss06 Stylistic Set 6 ss07 Stylistic Set 7 subs Subscript sups Superscript tnum Tabular Figures zero Slashed Zero mtxrun --script fonts --list --info --file LibertinusSerif-Regular.otf mtx-fonts | mtx-fonts | mapping : 1 mtx-fonts | fontname : libertinusserifregular mtx-fonts | fullname : libertinusserifregular mtx-fonts | filename : LibertinusSerif-Regular.otf mtx-fonts | family: libertinusserif mtx-fonts | weight: normal mtx-fonts | style : normal mtx-fonts | width : normal mtx-fonts | variant : normal mtx-fonts | fweight : conflict: regular mtx-fonts | mtx-fonts | gpos features: mtx-fonts | mtx-fonts | feature script languages mtx-fonts | mtx-fonts | cpsp cyrl dflt mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |latn dflt mtx-fonts | kern cyrl dflt mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |latn dflt mtx-fonts | mark cyrl dflt mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn dflt mtx-fonts | mkmk cyrl dflt mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn dflt mtx-fonts | mtx-fonts | gsub features: mtx-fonts | mtx-fonts | feature script languages mtx-fonts | mtx-fonts | c2sc cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | calt cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | case cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | ccmp cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | dlig cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | frac cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | hlig cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | liga cyrl dflt mkd srb mtx-fonts |dflt dflt mtx-fonts |grek dflt mtx-fonts |hebr dflt mtx-fonts |latn aze crt dflt fin ism kaz lsm nor nsm sks ssm sve tat trk mtx-fonts | lnum
Re: [NTG-context] font features
On 11/3/22 13:27, Henning Hraban Ramm via ntg-context wrote: If it works for you, then it’s a problem of my installation, otherwise a regression in current LMTX... No, I get the same error message, this looks promising but doesn't work. And at the risk of sounding grumpy, but all of this is too much manual intervention; I would like to have a completely automated script. So I'll show what I have and add a few comments: local Feature_Table = { } local Parsed_Features = { } local My_Font = environment.arguments["font"] local Font_Features = os.resultof("otfinfo -f " .. My_Font) for Feature_Sigla, Feature_Name in string.gmatch(Font_Features, "(%S-)\t(.-)\n") do Feature_Table[Feature_Sigla] = Feature_Name end COMMENTS Expectation: this should return a list of all features and their descriptions as a lua table. If you run the file as context test.cld --font="/path/to/font" this works, and you get a table Feature_Table={ ["aalt"]="Access All Alternates", ["c2sc"]="Small Capitals From Capitals"} etc. CODE for name, _ in pairs(Feature_Table) do Context_Name = "f:" .. name Parsed_Features[name] = Context_Name context.definefontfeature( { Context_Name }, { name="yes" } ) end COMMENTS This should produce a lua table with ConTeXt fontfeatures and define those features. The table appears to be correct: Parsed_Features={ ["aalt"]="f:aalt", ["c2sc"]="f:c2sc"} etc. So I expected that this should be equivalent to \definefontfeature [f:aalt] [aalt=yes] and return a list of defined features. CODE local Test_String = [[ ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 1234567890 1/4 2/8 3/9 ffi ft fi fl ffl ]] local Font_Name = os.resultof("otfinfo -a " .. My_Font) context.definefontfamily( { "Test" }, { "serif" }, { Font_Name }, {} ) context.setupbodyfont{ "Test, 12pt" } COMMENTS Again, this works; the font is set as bodyfont. CODE context.starttext() for name, feature in pairs(Feature_Table) do context.start () context.addfeature { Parsed_Features[name] } context.midaligned (feature) context.bold (Parsed_Features[name]) context.par () context.blank{ "medium" } context(Test_String) context.par () context.stop () end context.stoptext() COMMENTS And this doesn't work: the names are picked up, but the font features are not defined; the sample text does not reflect any features. So this is what I've got... maybe one of the wizards can help. Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features
Am 03.11.22 um 13:20 schrieb Henning Hraban Ramm via ntg-context: Am 03.11.22 um 12:37 schrieb Thomas A. Schmitz via ntg-context: You can also get font information via mtxrun --script server --start and then open the given address in your browser; AFAIR you get samples, but it doesn’t work for me ATM, because the server script is not found in the current directory (might be a misconfiguration on my side). If you cd to .../tex/texmf-context/scripts/context/lua, start mtxrun --script server --start then open http://localhost:8088/mtx-server-ctx-fonttest.lua You should be able to check font samples with different features enabled. But I get another 404 on /mtx-server-ctx-fonttest-temp-02.pdf If it works for you, then it’s a problem of my installation, otherwise a regression in current LMTX... Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features
Am 03.11.22 um 12:37 schrieb Thomas A. Schmitz via ntg-context: Hi, is there an easy way to get a list of all features that a font has and typeset a sample text to see the result of every single feature? There probably is, but I couldn't find anything... You get a lot of information with mtxrun --script fonts --info but no samples. You can also get font information via mtxrun --script server --start and then open the given address in your browser; AFAIR you get samples, but it doesn’t work for me ATM, because the server script is not found in the current directory (might be a misconfiguration on my side). Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features
On 11/3/22 12:52, Herbert Voss via ntg-context wrote: You'll get only the features with otfinfo in the terminal. For example: Thank you, I was aware of that. But that's only the first step: you still have to use this list to define ConTeXt featuresets and then typeset. I was trying to build a cld document that automates this process, but can't get it to work. And I suspect that somewhere in the distribution, there is already a module that does exactly that. Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features
Am 03.11.22 um 12:37 schrieb Thomas A. Schmitz via ntg-context: Hi, is there an easy way to get a list of all features that a font has and typeset a sample text to see the result of every single feature? There probably is, but I couldn't find anything... You'll get only the features with otfinfo in the terminal. For example: iMac:~ voss$ otfinfo -f `kpsewhich LibertinusSerif-Regular.otf` c2sc Small Capitals From Capitals calt Contextual Alternates case Case-Sensitive Forms ccmp Glyph Composition/Decomposition cpsp Capital Spacing dlig Discretionary Ligatures frac Fractions hlig Historical Ligatures kern Kerning liga Standard Ligatures lnum Lining Figures mark Mark Positioning mkmk Mark to Mark Positioning onum Oldstyle Figures pnum Proportional Figures salt Stylistic Alternates smcp Small Capitals ss01 Stylistic Set 1 ss02 Stylistic Set 2 ss03 Stylistic Set 3 ss04 Stylistic Set 4 ss05 Stylistic Set 5 ss06 Stylistic Set 6 ss07 Stylistic Set 7 subs Subscript sups Superscript tnum Tabular Figures zero Slashed Zero Herbert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] font features
Hi, is there an easy way to get a list of all features that a font has and typeset a sample text to see the result of every single feature? There probably is, but I couldn't find anything... All best Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] font features in math
Am Wed, 4 May 2016 09:53:14 +0200 schrieb Hans Hagen: > as you don't specify a mode, you get base mode Damn ;-). I didn't thought about this possibility. I assumed the default mode would be like in luaotfload "node". Thanks for correcting me. It is a relieve that I didn't find the font simply because it isn't there ;-). (Now I also understand Philipps remark ...) -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
On 5/3/2016 12:13 AM, Ulrike Fischer wrote: Am Mon, 2 May 2016 18:47:36 +0200 schrieb Philipp Gesang: How can you switch a feature like mode=node to mode=base for every font in math? Define two fonts: one for use in math mode, another for where you really, really require node mode. That's easy if one can select the fonts explicitly, but the question was triggered by the url package which internally switches to math. Also in the context example there aren't two font definitions: \starttext \font\test= {name:TeX-Gyre-Termes:+onum} \test 0123456789 $\fam0 \textfont0=\test 0123456789$ \stoptext Nevertheless "\test" seems to use mode=node outside math and mode=base inside math and I would like to know where the code is that does it. in your font definition you use a low level xetex like specification so you bypass the normal feature definition mechanism which means that as you don't specify a mode, you get base mode which in turn means that the onum is applied to the font immediately and as you use the same font in math you get onum there too {name:TeX-Gyre-Termes:+onum;mode=node} gives you onum in text as a result of node mode processing but then the math is normal digits because the font is pass as-is Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
Le 3 mai 2016 à 00:13, Ulrike Fischera écrit : > That's easy if one can select the fonts explicitly, but the question > was triggered by the url package which internally switches to math. I have posted a (seemingly partial) patch to this problem of \url at http://tex.stackexchange.com/questions/264206/cant-get-oldstyle-figures-in-url-with-lualatex/307585#307585 ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
Am Mon, 2 May 2016 18:47:36 +0200 schrieb Philipp Gesang: >> How can you switch a feature like mode=node to mode=base for >> every font in math? > Define two fonts: one for use in math mode, another for where you > really, really require node mode. That's easy if one can select the fonts explicitly, but the question was triggered by the url package which internally switches to math. Also in the context example there aren't two font definitions: \starttext \font\test= {name:TeX-Gyre-Termes:+onum} \test 0123456789 $\fam0 \textfont0=\test 0123456789$ \stoptext Nevertheless "\test" seems to use mode=node outside math and mode=base inside math and I would like to know where the code is that does it. -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
Le 2 mai 2016 à 20:15, jfbua écrit : > > >> \font\fixmath=\fontname\textfont\foo mode=base; >> \textfont\foo=\fixmath > > I will use a better approach as this one does not work > when the thing ends as "at 7.0pt" for example, but in principle > I see I can do surgery on the \fontname and replace there > mode=node if it exists with mode=base. > > I only have to figure out the best time to do that > in a context (no pun intended) where people may change > "\mathversion" (latex thing). > \begingroup \catcode`N 12 \catcode`O 12 \catcode`D 12 \catcode`E 12 \lowercase{\gdef\FixMathFont@i #1=NODE;#2\relax #3}% {\font\fixmath=#1=base;#2\relax\global#3\symmtoperatorfont=\fixmath} \endgroup \def\FixMathFont {\setbox0\hbox{\MTeverymathoff$\relax$% \expandafter\FixMathFont@i\fontname\textfont\symmtoperatorfont\relax\textfont \expandafter\FixMathFont@i\fontname\scriptfont\symmtoperatorfont\relax\scriptfont \expandafter\FixMathFont@i\fontname\scriptscriptfont\symmtoperatorfont\relax\scriptscriptfont}% } I only need to add the layer to do nothing if "=node" is not found, and we are allset. Jean-François ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
> \font\fixmath=\fontname\textfont\foo mode=base; > \textfont\foo=\fixmath I will use a better approach as this one does not work when the thing ends as "at 7.0pt" for example, but in principle I see I can do surgery on the \fontname and replace there mode=node if it exists with mode=base. I only have to figure out the best time to do that in a context (no pun intended) where people may change "\mathversion" (latex thing). Jean-François ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
Le 2 mai 2016 à 18:47, Philipp Gesanga écrit : > · > >> Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang: >> So somehow in math the +onum is lost in plain and latex but not in context. What is context doing differently to avoid this? >>> >>>mode=base >> >> If context attach mode=base to math, how does it it? > > A one would do in Luaotfload: specify base mode when defining the > font. It’s unrelated to math, just the default set of features > that Luaotfload has been applying to every definition for ages. > The reasoning -- by Khaled and others -- was, that the Opentype > standard mandates some defaults so Luaotfload should follow suit. > > The defaults can be overridden by setting the appropriate values > in luaotfload.conf(5). > >> How can you >> switch a feature like mode=node to mode=base for every font in math? > > Define two fonts: one for use in math mode, another for where you > really, really require node mode. > > Philipp Ulrike, thanks a lot for keeping asking questions on this and Philipp for answering. I have figured experimentally that I could use (at least in some cases, and after math fonts are initialized which in LaTeX seems to mean one needs to enter math mode at least once before) \font\fixmath=\fontname\textfont\foo mode=base; \textfont\foo=\fixmath for example creating this \fontname: [Vollkorn-Regular]:mode=node;script=latn;language=DFLT;+tlig;+lnum;mode=base; which is then experimentally observed to obey the second mode specifier and thus does display lining figures in math mode. Jean-François ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
· > Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang: > > >> So somehow in math the +onum is lost in plain and latex but not in > >> context. What is context doing differently to avoid this? > > > > mode=base > > If context attach mode=base to math, how does it it? A one would do in Luaotfload: specify base mode when defining the font. It’s unrelated to math, just the default set of features that Luaotfload has been applying to every definition for ages. The reasoning -- by Khaled and others -- was, that the Opentype standard mandates some defaults so Luaotfload should follow suit. The defaults can be overridden by setting the appropriate values in luaotfload.conf(5). > How can you > switch a feature like mode=node to mode=base for every font in math? Define two fonts: one for use in math mode, another for where you really, really require node mode. Philipp pgp5j7EyuLGpU.pgp Description: PGP signature ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
On 5/1/2016 12:53 PM, Ulrike Fischer wrote: Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang: So somehow in math the +onum is lost in plain and latex but not in context. What is context doing differently to avoid this? mode=base If context attach mode=base to math, how does it it? How can you switch a feature like mode=node to mode=base for every font in math? that has to be done in otfload i guess (context does it in the featureset applied to math fonts) there is no node processing in math (when using base mode one ca apply some features like substitutions) that then gets passed to tex - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang: >> So somehow in math the +onum is lost in plain and latex but not in >> context. What is context doing differently to avoid this? > > mode=base If context attach mode=base to math, how does it it? How can you switch a feature like mode=node to mode=base for every font in math? -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in math
· > When I compile this in context all number are oldstyle numbers: > > \starttext > > \font\test= {name:TeX-Gyre-Termes:+onum} > \test 0123456789 > $\fam0 \textfont0=\test 0123456789$ > \stoptext > > When I run a similar plaintex (or latex) example in texlive 2016 > with a new luaotfload then the text numbers are (as wanted) old > style, but the numbers in math mode are lining numbers (the font is > correct): > > \input luaotfload.sty > \font\test= {name:TeX-Gyre-Termes:+onum} > \test 0123456789 > $\fam0 \textfont0=\test 0123456789$ > \bye > > > So somehow in math the +onum is lost in plain and latex but not in > context. What is context doing differently to avoid this? mode=base See the issue thread where you got the example from or the Luaotfload manual. Philipp pgpCT9kJ2b60F.pgp Description: PGP signature ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] font features in math
When I compile this in context all number are oldstyle numbers: \starttext \font\test= {name:TeX-Gyre-Termes:+onum} \test 0123456789 $\fam0 \textfont0=\test 0123456789$ \stoptext When I run a similar plaintex (or latex) example in texlive 2016 with a new luaotfload then the text numbers are (as wanted) old style, but the numbers in math mode are lining numbers (the font is correct): \input luaotfload.sty \font\test= {name:TeX-Gyre-Termes:+onum} \test 0123456789 $\fam0 \textfont0=\test 0123456789$ \bye So somehow in math the +onum is lost in plain and latex but not in context. What is context doing differently to avoid this? (It can't be the fontloader. I forced luaotfload to use the context files from the minimals.) -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in XeTeX
Hans Hagen wrote: On 7/6/2015 9:13 AM, Robert Zydenbos wrote: Dear ConTeXt folk, Is there any simple way to pass font features as a parameter to XeConTeXt? i am thinking of things like what in LaTeX would be (between square brackets) \setromanfont [AutoFakeSlant=0.5, AutoFakeBold=0.5] {Doulos SIL Phon}. There has to be some way to do this, but I seem unable to find it in the documentatioin I have. you can just append the directives to the font names (see type -xtx.mkii for examples). I don't know if AutoFakeBold is some built in feature. Is there a reason why you can't use mkiv with luatex? I would like to, but I need to use TrueType fonts for Indian scripts in my work that are supported in XeTeX but not (yet) in LuaTeX. As an experiment, I tried to use the so-called 'long s' in a Fraktur font, which comes out well in XeTeX with LaTeX, but I must be doing something wrong in ConTeXt. Robert Example: % The 'StylisitcSet 11' in the font UnifrakturMaguntia should contain the so-called 'long s'. % Somehow it doesn't work. \starttext \definetypeface [hauptfont] [rm] [Xserif] [Charis SIL] \definetypeface [schoenfont] [rm] [Xserif] [UnifrakturMaguntia] [default] [features={StylisticSet=11}] \switchtobodyfont [hauptfont] Dies ist mit Features, denke ich. {\switchtobodyfont [schoenfont] Und jetzt schreiben wir etwas in Fraktur, das ist ja schöner.} \stoptext ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in XeTeX
On 7/6/2015 9:13 AM, Robert Zydenbos wrote: Dear ConTeXt folk, Is there any simple way to pass font features as a parameter to XeConTeXt? i am thinking of things like what in LaTeX would be (between square brackets) \setromanfont [AutoFakeSlant=0.5, AutoFakeBold=0.5] {Doulos SIL Phon}. There has to be some way to do this, but I seem unable to find it in the documentatioin I have. you can just append the directives to the font names (see type -xtx.mkii for examples). I don't know if AutoFakeBold is some built in feature. Is there a reason why you can't use mkiv with luatex? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in XeTeX
Robert Zydenbos mailto:cont...@zydenbos.net 6. Juli 2015 12:15 I would like to, but I need to use TrueType fonts for Indian scripts in my work that are supported in XeTeX but not (yet) in LuaTeX. As an experiment, I tried to use the so-called 'long s' in a Fraktur font, which comes out well in XeTeX with LaTeX, but I must be doing something wrong in ConTeXt. Robert Example: % The 'StylisitcSet 11' in the font UnifrakturMaguntia should contain the so-called 'long s'. % Somehow it doesn't work. \starttext \definetypeface [hauptfont] [rm] [Xserif] [Charis SIL] \definetypeface [schoenfont] [rm] [Xserif] [UnifrakturMaguntia] [default] [features={StylisticSet=11}] \switchtobodyfont [hauptfont] Dies ist mit Features, denke ich. {\switchtobodyfont [schoenfont] Und jetzt schreiben wir etwas in Fraktur, das ist ja schöner.} \stoptext Below is a MkIV example where I enabled the Stylistic Set 11 for the Fraktur font. \definefontfeature [longs] [ss11=yes] \definefontfamily [hauptfont] [rm] [Charis SIL] \definefontfamily [schoenfont] [rm] [Unifraktur Maguntia] [features={default,longs}] \setupbodyfont[hauptfont] \starttext Dies ist mit Features, denke ich. {\switchtobodyfont[schoenfont]Und jetzt schreiben wir etwas in Fraktur, das ist ja schöner.} \stoptext 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] font features in XeTeX
Dear ConTeXt folk, Is there any simple way to pass font features as a parameter to XeConTeXt? i am thinking of things like what in LaTeX would be (between square brackets) \setromanfont [AutoFakeSlant=0.5, AutoFakeBold=0.5] {Doulos SIL Phon}. There has to be some way to do this, but I seem unable to find it in the documentatioin I have. RZ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] font features in beta
Hi all, this works in TL but not minimals: · \definefontfeature[textfigures] [onum=yes] \definefontfeature[texligatures] [tlig=yes] \starttext \addff{textfigures} 1234567890 \addff{texligatures} foo---bar \stoptext · With Context as of today and Luatex from minimals, I get lining figures and a triple dash. Did I miss something? Philipp pgpBsCxgSsChV.pgp Description: PGP signature ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in beta
2012-10-17 Philipp Gesang: With Context as of today and Luatex from minimals, I get lining figures and a triple dash. Did I miss something? Confirmed. works with 2012.09.23 12:40 fails with 2012.10.16 23:38 Marco ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in beta
On 17-10-2012 16:08, Philipp Gesang wrote: Hi all, this works in TL but not minimals: · \definefontfeature[textfigures] [onum=yes] \definefontfeature[texligatures] [tlig=yes] \starttext \addff{textfigures} 1234567890 \addff{texligatures} foo---bar \stoptext · With Context as of today and Luatex from minimals, I get lining figures and a triple dash. Did I miss something? just a missing comma in a lua file, i'll upload an update Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features in beta
···date: 2012-10-17, Wednesday···from: Hans Hagen··· On 17-10-2012 16:08, Philipp Gesang wrote: ... With Context as of today and Luatex from minimals, I get lining figures and a triple dash. Did I miss something? just a missing comma in a lua file, i'll upload an update Hans Thanks for the fix! Now another thing I noticed is that the text style “capital” fails with highlights: · \definehead [testhead] [section] [style=capital] %% - works \definehighlight [testhighlight] [style=capital] %% - not always \starttext \testhead{woody words}%% - works gorn {\testhighlight ocelot} wasp %% - works gorn \testhighlight{ocelot} wasp %% - fails \stoptext · “Capital”, “WORD” etc. don’t have the problem, and in other circumstances, “capital” seems to work as expected. This is also a regression since TL2012. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpTZT5Itkx54.pgp Description: PGP signature ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Font features for \ss only?
Hi all, how would I make sure that \ss always uses one set of font features while \rm always uses the default feature set? Do I need to specify this in the typescript file? The reason is I'm using Myriad as \ss font and would like to enable the capital spacing (cpsp) OpenType feature for that while activating a different feature set for all \rm instances (Minion in this case)… Many thanks, Oliver ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Font features for \ss only?
Am 23.05.2011 um 20:07 schrieb Oliver Buerschaper: Hi all, how would I make sure that \ss always uses one set of font features while \rm always uses the default feature set? Do I need to specify this in the typescript file? The reason is I'm using Myriad as \ss font and would like to enable the capital spacing (cpsp) OpenType feature for that while activating a different feature set for all \rm instances (Minion in this case)… \usemodule[simplefonts] \definefontfeature[myriad][default][cpsp=yes] \setmainfont[Minion Pro] \setsansfont[Myriad Pro][features=myriad] \starttext ... \stoptext 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] font features
What is wrong with my font setting for libertine that the fontsize is reset when activating a font feature. For latin modern it is ok. the output:http://perce.de/temp/xxx.png Herbert \starttypescriptcollection[mylibertine] \starttypescript[serif][libertine][name] \definefontsynonym[Serif][name:Linux Libertine O][features=default] \stoptypescript \starttypescript[sans][biolinum][name] \definefontsynonym[Sans][name:Linux Biolinum O][features=default] \stoptypescript \starttypescript[mylibertine] \definetypeface[mylibertine][rm][serif][libertine][default] \definetypeface[mylibertine][ss][sans] [biolinum] [default] \stoptypescript \stoptypescriptcollection \setupbodyfont[modern,12pt] \definefontfeature[noLigNoKern][zero=yes,liga=no,kern=no] \font\myNoLigNoKern=lmroman12-regular*noLigNoKern \starttext Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. \par\myNoLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. \setupbodyfont[mylibertine,12pt] {\font\myNoLigNoKern=fxlr*noLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. \par\myNoLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern.} \setupbodyfont[mylibertine,12pt]\ss \font\myNoLigNoKern=fxbr*noLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. \par\myNoLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. \stoptext ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] font features
On 17-11-2010 8:15, Herbert Voss wrote: \setupbodyfont[modern,12pt] so, 12 pt lm \definefontfeature[noLigNoKern][zero=yes,liga=no,kern=no] \font\myNoLigNoKern=lmroman12-regular*noLigNoKern again 12pt lm (as you choose the 12 pt design size) \starttext Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. \par\myNoLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. 12 pt again \setupbodyfont[mylibertine,12pt] {\font\myNoLigNoKern=fxlr*noLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. 12pt libertine (designsize 10pt scaled to 12pt) \par\myNoLigNoKern libertine at design size Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern.} \setupbodyfont[mylibertine,12pt]\ss \font\myNoLigNoKern=fxbr*noLigNoKern Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. 12pt libertine (designsize 10pt scaled to 12pt) (no ss defined) \par\myNoLigNoKern libertine at design size Fiffies schöner 0815-Text über die Schifffahrt mit den Schiffern. compare: \font\myNoLigNoKern=fxbr*noLigNoKern % designsize \font\myNoLigNoKern=fxbr*noLigNoKern at 12pt % scaled there's also: \definefont[myNoLigNoKern][fxbr*noLigNoKern]\myNoLigNoKern this defaults to sa 1 which means: scaled at current bodyfont times 1 \definefont[myNoLigNoKern][fxbr*noLigNoKern at 12pt]\myNoLigNoKern \definefont[myNoLigNoKern][fxbr*noLigNoKern sa 1]\myNoLigNoKern \definefont[myNoLigNoKern][fxbr*noLigNoKern sa 2]\myNoLigNoKern etc so, \font is the dumb one: design size unless explicitly specified size - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Font features switching
Hello, I'm still curious about using font features. For example, I want to have one typescript with slashed zero, and another with normal one. But using either typescript (see commented lines) results in slashed zeroes. What s wrong? \definefontfeature[zero][default][zero=yes] \starttypescript [serif] [MinionPro] \definefontsynonym [Serif][file:MinionPro-Regular][features=zero] \stoptypescript \starttypescript [MinionPro+zero] \definetypeface [MinionPro][rm][serif][MinionPro][features=zero] \stoptypescript \starttypescript [MinionPro] \definetypeface [MinionPro][rm][serif][MinionPro][features=default] \stoptypescript %\usetypescript[MinionPro+zero] %\usetypescript[MinionPro] \setupbodyfont[MinionPro,16pt] \starttext This zero test. 000. \stoptext Best, Vyatcheslav ___ 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] Font features switching
Am 16.05.2009 um 09:51 schrieb Vyatcheslav Yatskovsky: Hello, I'm still curious about using font features. For example, I want to have one typescript with slashed zero, and another with normal one. But using either typescript (see commented lines) results in slashed zeroes. What s wrong? The setting in \definefontsynonym is used. \definefontfeature[zero][default][zero=yes] \starttypescript [serif] [MinionPro+zero] \definefontsynonym [Serif] [MinionPro-Regular] [features=zero] \stoptypescript \starttypescript [serif] [MinionPro] \definefontsynonym [Serif] [MinionPro-Regular] [features=default] \stoptypescript \starttypescript [serif] [MinionPro,MinionPro+zero] \definefontsynonym [MinionPro-Regular] [file:MinionPro-Regular] [features=default] \stoptypescript \starttypescript [MinionPro,MinionPro+zero] \definetypeface [MinionPro] [rm] [serif] [MinionPro] [default] \stoptypescript %\usetypescript[MinionPro+zero] \usetypescript[MinionPro] \setupbodyfont[MinionPro,16pt] \starttext This zero test. 000. \stoptext 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 ___
Re: [NTG-context] Font features
Am 15.05.2009 um 04:06 schrieb Vyatcheslav Yatskovsky: Hello, I also have a question about font features. Minion Pro has old style numerals. How to display them, provided that I enabled this feature? In the following test script, I get ordinary numbers, no old style. \definefontfeature[onum][default][onum=yes] or you the predefined 'oldstyle' feature set. \starttypescript [serif] [MinionPro] \definefontsynonym [Serif][MinionPro-Regular.otf][features=onum] \stoptypescript Use 'name:' or 'file:' prefix for the the font and remove the file extension, e.g. \definefontsynonym [Serif][file:MinionPro-Regular][features=onum] 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 ___
Re: [NTG-context] Font features
On Fri, 15 May 2009 00:21:58 -0600, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: \definefontfeature[onum][default][onum=yes] What is the second option for? \definefontfeature[onum][onum=yes] should work as well. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] Font features
On vr, 2009-05-15 at 06:23 -0600, Idris Samawi Hamid ادريس سماوي حامد wrote: On Fri, 15 May 2009 00:21:58 -0600, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: \definefontfeature[onum][default][onum=yes] What is the second option for? If I'm correct, this means define a font feature onum, that inherits from default with the difference onum=yes. Regards, Alex ___ 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] Font features
Alex Lubberts wrote: On vr, 2009-05-15 at 06:23 -0600, Idris Samawi Hamid ادريس سماوي حامد wrote: On Fri, 15 May 2009 00:21:58 -0600, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: \definefontfeature[onum][default][onum=yes] What is the second option for? If I'm correct, this means define a font feature onum, that inherits from default with the difference onum=yes. indeed - 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 ___
[NTG-context] Font features
Hello, I also have a question about font features. Minion Pro has old style numerals. How to display them, provided that I enabled this feature? In the following test script, I get ordinary numbers, no old style. \starttypescript [serif] [MinionPro] \definefontsynonym [Serif][MinionPro-Regular.otf][features=onum] \stoptypescript \starttypescript [MinionPro] \definetypeface [MinionPro][rm][serif][MinionPro][features=onum] \stoptypescript \usetypescript[MinionPro] \setupbodyfont[MinionPro,16pt] \starttext This is bla bla bla 1234567890. \stoptext Regards, Vyatcheslav ___ 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] Font features not always working
On Wed, Apr 30, 2008 at 10:00 AM, Lutz Haseloff [EMAIL PROTECTED] wrote: Hi Wolfgang, it seems that some fonts need script=latn in \definefontfeature. (i copied and pasted from font-ini.tex) So your file works here: -- % engine=luatex \definefontfeature [default] [script=latn,liga=yes,kern=yes,tlig=yes,trep=yes] \definefontfeature [smallcaps] [script=latn,liga=yes,kern=yes,tlig=yes,trep=yes,smcp=yes] \definefontfeature [oldstyle] [script=latn,liga=yes,kern=yes,tlig=yes,trep=yes,onum=yes] I looked into font-ini from my old installation and all fontfeatures where defined with the latin script, would be interesting to know why this has changed and if there is a reason for this. \definefont[pan][file:texgyrepagella-regular*default] \definefont[pas][file:texgyrepagella-regular*smallcaps] \definefont[pao][file:texgyrepagella-regular*oldstyle] \definefont[can][file:CAMBRIA*default] \definefont[cas][file:CAMBRIA*smallcaps] \definefont[cao][file:CAMBRIA*oldstyle] \definefont[con][file:CORBEL*default] \definefont[cos][file:CORBEL*smallcaps] \definefont[coo][file:CORBEL*oldstyle] \starttext \pan ANB anc 123 VA Ta \pas ANB anc 123 VA Ta \pao ANB anc 123 VA Ta \can ANB anc 123 VA Ta \cas ANB anc 123 VA Ta \cao ANB anc 123 VA Ta \con ANB anc 123 VA Ta \cos ANB anc 123 VA Ta \coo ANB anc 123 VA Ta \blank \starttabulate \NC ConTeXt \EQ \contextversion\NC\NR \NC LuaTeX Revision \EQ \number\luatexversion \NC\NR \NC LuaTeX Revision \EQ \number\luatexrevision \NC\NR \stoptabulate \stoptext The example works now as expected. Thank you very much Lutz, for the solution. Greetings 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 ___
Re: [NTG-context] Font features not always working
On Tue, Apr 29, 2008 at 3:25 PM, Taco Hoekwater [EMAIL PROTECTED] wrote: Wolfgang Schuster wrote: Hi, the features from OpenType fonts are not accesable for all fonts, I tried to use my old test case for Microsofts Cambria fonts and none of the features did work, also kerning is disabled. I put the files with the result from last year and the latest stable online. http://schuster.wolfgang.googlepages.com/files IIRC, \Var depends on a very particular way of writing typescripts, and is currently considered deprecated by Hans, and that there is a new way to do things like this using \setfontfeature or something similar. Hans will know for sure (but he at bachotex right now) I wrote a simpler example and compiled it with my old and my current ConTeXt. http://schuster.wolfgang.googlepages.com/files - Fontfeature Greetings 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 ___
[NTG-context] Font features not always working
Hi, the features from OpenType fonts are not accesable for all fonts, I tried to use my old test case for Microsofts Cambria fonts and none of the features did work, also kerning is disabled. I put the files with the result from last year and the latest stable online. http://schuster.wolfgang.googlepages.com/files I saw this effect also in a few other fonts where I was unable to select features in the font like oldstyle or smallcaps. 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 ___
Re: [NTG-context] Font features not always working
Wolfgang Schuster wrote: Hi, the features from OpenType fonts are not accesable for all fonts, I tried to use my old test case for Microsofts Cambria fonts and none of the features did work, also kerning is disabled. I put the files with the result from last year and the latest stable online. http://schuster.wolfgang.googlepages.com/files IIRC, \Var depends on a very particular way of writing typescripts, and is currently considered deprecated by Hans, and that there is a new way to do things like this using \setfontfeature or something similar. Hans will know for sure (but he at bachotex right now) Best wishes, Taco ___ 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] Font features not always working
On Tue, Apr 29, 2008 at 3:25 PM, Taco Hoekwater [EMAIL PROTECTED] wrote: Wolfgang Schuster wrote: Hi, the features from OpenType fonts are not accesable for all fonts, I tried to use my old test case for Microsofts Cambria fonts and none of the features did work, also kerning is disabled. I put the files with the result from last year and the latest stable online. http://schuster.wolfgang.googlepages.com/files IIRC, \Var depends on a very particular way of writing typescripts, and is currently considered deprecated by Hans, and that there is a new way to do things like this using \setfontfeature or something similar. Hans will know for sure (but he at bachotex right now) This did also happen with [feature=...] in typescripts or with \setfontfeature in a document. A few fonts like Pagella or Linux Libertine work as expected but Cambria is a example where none of both methods work. \Var is really obsolete because \setfontfeature is more powerfull, I wrote my file before \setfontfeature was available and it should nevetheless still work but I don't need it. 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 ___