On 8/22/2023 6:31 AM, Hamid,Idris wrote:
Dear gang,
Design sizes for typefaces -- aka "optical sizes" -- are no longer directly implemented in typescripts. From the manual Fonts out of ConTeXt by Hans Hagen, p. 109:
You can still do it but for all these years only cm has design sizes so one can wonder.
"at some point the decision was made to kick out these definitions and move the burden of figuring out the right size to Lua."
They were moved to the goodie file (there are every few design size setups in goodie files, minion has one, but i don't have these fonts nor use them.
(Thus some large typescript collections painstakingly built over the years are now obsolete and have to be rewritten. Oh well..)
But there is an issue in the new regime:
In the old system, every typescript mapping to a font within a design-size range could have its own fallback. For example:
% Small ="small point size" % Regular = "regular point size" % Bigger = "bigger point size" % Biggest = "biggest point size"
\definefontsynonym [MyRomanRegular] [file:MyFont-Regular.ttf] [features=<features>,fallbacks=<fallback1>] \definefontsynonym [MyRomanSmall] [file:MyFont-Small.ttf] [features=<features>,fallbacks=<fallback2>] \definefontsynonym [MyRomanBigger] [file:MyFont-Bigger.ttf] [features=<features>,fallbacks=<fallback3>] \definefontsynonym [MyRomanBiggest] [file:MyFont-Biggest.ttf] [features=<features>,fallbacks=<fallback4>]
In the new typescripts regime we keep one font from the design-size range in the typescript file; the rest of the optical sizes go into an lfg goodies file:
\definefontsynonym [MyRomanRegular] \loadfontgoodies[myfonts-opticalsizes] % other three fonts go into an lfg table [file:MyFont-Regular.ttf] [features=<features>,fallbacks=<fallback1>]
designsizes = { ["MyRomanRegular"] = { ["7pt"] = "file:MyFont-Small", ["8pt"] = "file:MyFont-Small", ["9pt"] = "file:MyFont-Regular", ["10pt"] = "file:MyFont-Regular", ["11pt"] = "file:MyFont-Regular", ["12pt"] = "file:MyFont-Bigger", ["14pt"] = "file:MyFont-Bigger", ["17pt"] = "file:MyFont-Biggest", ["21pt"] = "file:MyFont-Biggest", default = "file:MyFont-Regular", },
But there is an apparent drawback to this new way of doing things: It appears that only the default font can have an explicit fallback, and there appears that there is no straightforward way to map each of the other design sizes to its own fallback.
If there is indeed no way to map each non-default design size to a fallback, then that constitutes a significant/unfortunate loss of functionality in the user interface.
If this appearance of a loss reflects the reality of the situation, would like to kindly request that the original functionality be restored to the higher-level user interface, presumably within the lfg file. So perhaps something like a keyval
fallbacks = { ["MyRomanRegular"] = { "file:MyFont-Small" = "fallbacks=<fallback2>", "file:MyFont-Regular", = "fallbacks=<fallback1>", "file:MyFont-Bigger", = "fallbacks=<fallback3>", "file:MyFont-Biggest", = "fallbacks=<fallback4>", },
On the other hand, if access to the former functionality is still there somewhere in the user interface, would like to humbly request that someone share where it is and how to use it!
Thank you kindly for consideration of this request. I'm not going to look into this until there is a complete test case for
Well, i suppose one can still setup/use the typescripts but it's less fun. The old definefont mechanism is still there. As a side note: we have design sizes (very few fonts) and weights (more and more fonts) .. weights are imo an even bigger mess, as it looks like some designers can't make up their mind and come with plenty weights independent of the fact that some look bad; variable fonts only add to this: the easier to use the creater tools become the easier it becomes to make ugly fonts (I tend to ignore fonts that show off too many possible choices; not much different from excessive kerning, ligatures and other incomplete features). this which means: - free fonts (so that others can also test and use) - design sizes - fallback design sizes Of course one can have some abstract fallback defined using the "MyFont-Small" namespace where the files used get remapped too as one goes. A bit like we do with the gyre fonts where we share definitions. 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 -----------------------------------------------------------------