open type feature "frac"
Due to a question on tex.sx (https://tex.stackexchange.com/questions/452969/luatex-fontfeaturefractions-o...) I looked again (see https://www.mail-archive.com/ntg-context@ntg.nl/msg84822.html) at the frac feature. The output is still not really satisfactory. With mode=node numbers with slash looks okay, but single numbers are rather odd: only the last digit has the correct size: \starttext \font\test={file:linlibertine_r.otf:mode=node;script=latn;language=DFLT;+frac} \test 787347 125 1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/1000000 \font\test={file:linlibertine_r.otf:mode=base;script=latn;language=DFLT;+frac} \test 787347 125 1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/1000000 \stoptext (It could be a font bug, the output with xetex isn't good either). -- Ulrike Fischer https://www.troubleshooting-tex.de/
On 9/28/2018 10:56 PM, Ulrike Fischer wrote:
Due to a question on tex.sx (https://tex.stackexchange.com/questions/452969/luatex-fontfeaturefractions-o...) I looked again (see https://www.mail-archive.com/ntg-context@ntg.nl/msg84822.html) at the frac feature.
The output is still not really satisfactory. With mode=node numbers with slash looks okay, but single numbers are rather odd: only the last digit has the correct size:
\starttext
\font\test={file:linlibertine_r.otf:mode=node;script=latn;language=DFLT;+frac} \test 787347 125
it all depends on the font and lookups i guess the logic can be a combination of: 1 - replace digit when followed by digit or slash 2 - replace digit when preceded by slash 3 - replace digit when preceded by fract digit so a last digit not preceded will not in fact one can then as well replace all digits non contextual
1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/1000000
\font\test={file:linlibertine_r.otf:mode=base;script=latn;language=DFLT;+frac} \test 787347 125
1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/1000000
forget about base mode ... dependent on how the font does frac single substitutions will be applied (maybe ligs)
\stoptext
(It could be a font bug, the output with xetex isn't good either). fonts probably have a limited set of lookups
(the 5 and 7 suggests some inconsistency in the lookups) i must admit that i've seen so many bad frac implementations that i never use it (and it's definitely something that should be applied very selectively, not on a whole text stream) 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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Ulrike Fischer