bug in \definefontfamily? (was: Re: OT salt feature not working?)
On 03/19/2017 12:19 PM, josephcanedo@gmail.com wrote:
Hi Pablo,
When I typeset your MWE below with latest beta version (on win 10) you use too, I see 2 lines of 1110 with different appearance.
Hi Joseph, sorry, the second sample was different. The first line was TeX Gyre Pagella and the second line was Neo Euler. The default feature for the whole text was old numbers. TeX Gyre Pagella works fine with it, but Neo Euler (with \definefontfamily) doesn’t honour "onum". But \definefont works fine, so I guess something might be improved in \definefontfamily. See the sample: \definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \definefont[directFont][euler.otf:+onum] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110 {\hw 1110} \directFont 1110 \stopTEXpage \stoptext BTW, Neo Euler has "Neo-Euler" as PostScript name (according to otfinfo). Maybe this is causing problems to the font loading mechanism. Wolfgang, what do you think of this issue? Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 19. März 2017 um 13:38via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
Hi Joseph,
sorry, the second sample was different. The first line was TeX Gyre Pagella and the second line was Neo Euler.
The default feature for the whole text was old numbers. TeX Gyre Pagella works fine with it, but Neo Euler (with \definefontfamily) doesn’t honour "onum".
But \definefont works fine, so I guess something might be improved in \definefontfamily. See the sample:
\definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \definefont[directFont][euler.otf:+onum] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110
{\hw 1110}
\directFont 1110 \stopTEXpage \stoptext
BTW, Neo Euler has "Neo-Euler" as PostScript name (according to otfinfo). Maybe this is causing problems to the font loading mechanism.
Wolfgang, what do you think of this issue?
Many thanks for your help,
Pablo Pablo Rodriguez mailto:oinos@gmx.es 19. März 2017 um 11:11via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
The issue is with the font:
\definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110
\hw 1110 \stopTEXpage \stoptext
Just in case it helps, LuaTeX-0.95 from TeX Live 2016 works fine with both features in this font:
\input ifluatex.sty \ifluatex\input luaotfload.sty\fi \font\1="euler.otf:+salt" \font\2="euler.otf:+onum" \1 1110\2 1110 \bye
I don’t know why this happens. Could anyone confirm the issue?
Many thanks for your help,
Pablo Pablo Rodriguez mailto:oinos@gmx.es 18. März 2017 um 23:05via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach Dear list,
I have the following sample:
\definefontfeature[default][default][salt=yes] \definefontfamily[mainface][rm][Neo Euler] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] 1110
\type{1110} \stopTEXpage \stoptext
I get the same results with or without the first line commented out. (I’m using latest beta from 2017.03.02 22:23.)
Is this a bug or what am I missing? When you use a math font (which Neo Euler is) the argument of the features key is ignored and \definefontfamily uses internal default values instead. These default values can only be overwritten by feature values for each alternative, e.g.
\definefontfamily[...][...][Neo Euler][tf={style:regular,features:default}] Wolfgang
On 03/19/2017 08:38 PM, Wolfgang Schuster wrote:
Pablo Rodriguez 19. März 2017 schrieb: [...] Is this a bug or what am I missing?
When you use a math font (which Neo Euler is) the argument of the features key is ignored and \definefontfamily uses internal default values instead. These default values can only be overwritten by feature values for each alternative, e.g.
\definefontfamily[...][...][Neo Euler][tf={style:regular,features:default}]
Many thanks for your explanation, Wolfgang. I didn’t consider that Neo Euler might be a default font. And I didn’t know that the values would be internal values which had to be overwritten by feature values for each alternative. BTW, does it happen the same to mono fonts? In the past, I wanted to check whether quality values for protrusion and expansion would make sense in the document I was typesetting, but I couldn’t make it work for mono fonts. Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 19. März 2017 um 21:07via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
Many thanks for your explanation, Wolfgang.
I didn’t consider that Neo Euler might be a default font. And I didn’t know that the values would be internal values which had to be overwritten by feature values for each alternative. The default values are only a thing for math fonts (but you’re using it outside of math) and I want to ensure goodies files etc. with font fixes are loaded.
BTW, does it happen the same to mono fonts? In the past, I wanted to check whether quality values for protrusion and expansion would make sense in the document I was typesetting, but I couldn’t make it work for mono fonts. No, mono fonts use the global feature settings but you can change this for all mono fonts with \setupfontfamily[tt][features=none].
Wolfgang
On 03/19/2017 09:32 PM, Wolfgang Schuster wrote:
Pablo Rodriguez 19. März 2017 um 21:07via Postbox [...] BTW, does it happen the same to mono fonts? In the past, I wanted to check whether quality values for protrusion and expansion would make sense in the document I was typesetting, but I couldn’t make it work for mono fonts.
No, mono fonts use the global feature settings but you can change this for allmono fonts with \setupfontfamily[tt][features=none].
But [features={none, quality}] disables everything and I canot enable protrusion plus expansion only. At least, it doesn’t work with \definefontfamily. I haven’t tested this with \setupfontfamily. Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 19. März 2017 um 21:40via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
But [features={none, quality}] disables everything and I canot enable protrusion plus expansion only.
At least, it doesn’t work with \definefontfamily. I haven’t tested this with \setupfontfamily. The "none" feature disables ligatures, kerning etc. which makes sense when you use amonospaced font for code listings etc.
When you plan to use a monospaced font for normal text setting the alignment to flushleft makes more sense. Wolfgang
Pablo Rodriguez mailto:oinos@gmx.es 19. März 2017 um 21:40via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
But [features={none, quality}] disables everything and I canot enable protrusion plus expansion only.
At least, it doesn’t work with \definefontfamily. I haven’t tested this with \setupfontfamily. \definefontfamily[mainface][mono][Latin Modern Mono Prop][features=quality]
\setupbodyfont[mainface] \setupalign[hanging] \showframe[text][text] \starttext \input{zapf} \input{tufte} \input{weisman} \stoptext Wolfgang
On 03/19/2017 09:58 PM, Wolfgang Schuster wrote:
Pablo Rodriguez 19. März 2017 schrieb: But [features={none, quality}] disables everything and I canot enable protrusion plus expansion only.
At least, it doesn’t work with \definefontfamily. I haven’t tested this with \setupfontfamily.
\definefontfamily[mainface][mono][Latin Modern Mono Prop][features=quality]
Yes, this might work, but I’m afraid I need to disable other default features such as ligatures (not only liga, but TeX ligatures). I had this problem typesetting XML sources and I didn’t know how to disable the other features. My main interest in having mono with quality are standard paragraphs with Roman text. Expansion and protrusion enable better line breaking. And if mono doesn’t get protrusion, you may find wrong optical margins (protrusion), because the lack of it only on the mono face. Many thanks for your help, Pablo -- http://www.ousia.tk
Pablo Rodriguez mailto:oinos@gmx.es 19. März 2017 um 22:08via Postbox https://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
Yes, this might work, but I’m afraid I need to disable other default features such as ligatures (not only liga, but TeX ligatures).
I had this problem typesetting XML sources and I didn’t know how to disable the other features. The default setting is “feature=default” and to get expansion/protrusion additional to kerning etc. you have two options:
1. Add them to the default feature with \definefontfeature[default][default][expansion=quality,protrusion=quality] 2. Set multiple feature with \definefontfamily[...][...][...][features={default,quality}] You can use the second method when you want only expansion/protrusion. When you set only “features=quality” kerning isn’t enabled because the default features aren’t applied to your font. Wolfgang
On 3/19/2017 10:08 PM, Pablo Rodriguez wrote:
On 03/19/2017 09:58 PM, Wolfgang Schuster wrote:
Pablo Rodriguez 19. März 2017 schrieb: But [features={none, quality}] disables everything and I canot enable protrusion plus expansion only.
At least, it doesn’t work with \definefontfamily. I haven’t tested this with \setupfontfamily.
\definefontfamily[mainface][mono][Latin Modern Mono Prop][features=quality]
Yes, this might work, but I’m afraid I need to disable other default features such as ligatures (not only liga, but TeX ligatures).
I had this problem typesetting XML sources and I didn’t know how to disable the other features.
My main interest in having mono with quality are standard paragraphs with Roman text. Expansion and protrusion enable better line breaking.
not true expansion can make excessive spacing less excessive protrusion is an esthetic feature esp protrusion also adds constraints (i.e. one cannot selectively protrude a hyphen in one line and not in the next one for instance) so the solutionspace doesn't become much better (fwiw, personally i never use expansion but occasionally i use protrusion)
And if mono doesn’t get protrusion, you may find wrong optical margins (protrusion), because the lack of it only on the mono face.
Many thanks for your help,
Pablo
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 3/19/2017 1:38 PM, Pablo Rodriguez wrote:
On 03/19/2017 12:19 PM, josephcanedo@gmail.com wrote:
Hi Pablo,
When I typeset your MWE below with latest beta version (on win 10) you use too, I see 2 lines of 1110 with different appearance.
Hi Joseph,
sorry, the second sample was different. The first line was TeX Gyre Pagella and the second line was Neo Euler.
The default feature for the whole text was old numbers. TeX Gyre Pagella works fine with it, but Neo Euler (with \definefontfamily) doesn’t honour "onum".
But \definefont works fine, so I guess something might be improved in \definefontfamily. See the sample:
\definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \definefont[directFont][euler.otf:+onum]
don't use that :+onum interface ... it's supported but more as side effect .. define featuresets and use those *featureset
\setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110
{\hw 1110}
\directFont 1110 \stopTEXpage \stoptext
BTW, Neo Euler has "Neo-Euler" as PostScript name (according to otfinfo). Maybe this is causing problems to the font loading mechanism.
Wolfgang, what do you think of this issue?
Many thanks for your help,
Pablo
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Pablo Rodriguez
-
Wolfgang Schuster