ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Fallbacks for design sizes in the current typescripts regime
@ 2023-08-22  4:31 Hamid,Idris
  2023-08-22  7:59 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 9+ messages in thread
From: Hamid,Idris @ 2023-08-22  4:31 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 3478 bytes --]

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:

"at some point the decision was made to kick out these definitions and move the burden of figuring out the right size to Lua."

(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.

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

[-- Attachment #1.2: Type: text/html, Size: 5759 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-08-23 12:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22  4:31 [NTG-context] Fallbacks for design sizes in the current typescripts regime Hamid,Idris
2023-08-22  7:59 ` [NTG-context] " Hans Hagen via ntg-context
2023-08-22 15:45   ` Hamid,Idris
2023-08-22 16:18     ` Hans Hagen
2023-08-22 19:26       ` Hamid,Idris
2023-08-22 16:27     ` Wolfgang Schuster
2023-08-22 20:53     ` Vincent Hennebert
2023-08-22 21:04       ` Hans Hagen
2023-08-23 12:56       ` Hamid,Idris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).