[NTG-context] Re: Adobe Source Typescript With Design Sizes

2023-11-02 Thread Vincent Hennebert

On 01/11/2023 12:36, Hans Hagen via ntg-context wrote:

On 10/31/2023 8:18 PM, Vincent Hennebert wrote:

Hello there,

I had mentioned this on a thread some (long) time ago, finally got 
around to finishing a first version of a typescript with the Adobe 
Source font family, in all its weight alternatives and design sizes 
(the latter being available in the Serif style only).


Comments welcome. If it looks good I can upload it to the wiki, on the 
Typescripts_examples page I guess.


I have no tiem now to figure out this (somewhat excessive) amount of 
fonts - hopefully we will not end up in a world where all fonts have 
many weights which makes it easier for designers not to make choices and 
delegate that to users instead. That said,


- attached a different approach


Interesting. I’ll try and extend it to include the sans and mono styles. 
I’m not sure which version will be more readable in the end. My Lua 
function to determine the font file name is a bit convoluted indeed.



- in your variant you can put the lua in the lfg file (at the top) and 
then add \loadfontgoodies[...] before where the functions are used


Ok. But then that means that the designsizes table will be used all the 
time, including when design sizes are disabled, right? Which would mean 
that I _must_ define the regular size as a fallback.



I'm not sure if we can talk of design sizes here. It's more about 
'usage' because a display vs subhead vs ... variant is not about mixing 
depending on scale (e.g. using display for 20 pt in a 15 pt setup versus 
using scaled regular for 20pt and then display 20pt for e.g. a title 
page or 50pt on posters).


I think I see your point. I think we can still talk about design sizes 
but, instead of thinking in absolute sizes, we would want to think in 
sizes relative to the font setup.


That is, instead of saying ‘Caption shall be used for sizes 6.5pt and 
below, SmText for 9.5pt and below etc.’, we would want to say ‘Caption 
shall be used for 50% of the body font size and below, SmText for 75% 
and below, etc.’


This way, design sizes would be used ‘harmoniously’ no matter the 
scaling. A poster, for instance, would usually be viewed at such a 
distance that the apparent size of small text (typeset at, say, 25pt 
when the main text is at 50pt, therefore using Caption) would match the 
apparent size of caption text in a regular document typeset at 12pt and 
read from a normal distance.


Make sense?

As a corollary: Does the design sizes mechanism used in goodies file 
allow to use relative sizes?




(I have Questions For the Experts further down...)


maybe a side effect of not defining a math font


About Adobe Source
==

The fonts are available on GitHub [1]. They are the descendants of the 
Source {Serif,Sans,Code} Pro fonts described in the 
type-imp-source.mkiv typescript available in the ConTeXt distribution. 
Due to major changes, Serif Pro was renamed into Serif 4 in, well, its 
version 4 [2] (that’s the version that introduces design sizes, a.k.a. 
optical sizes), and Sans Pro was renamed into Sans 3 [3].


[1] https://github.com/adobe-fonts/
[2] https://github.com/adobe-fonts/source-serif/releases/tag/4.004R
[3] https://github.com/adobe-fonts/source-sans/issues/192


Usage
=

Short version: store the attached typescript and its helper Lua files 
somewhere on your file system where ConTeXt will find them 
($HOME/texmf for example), then use in your document:


 \setupbodyfont[adobesource]

Long version: The default typescript name is adobesource (also 
available as adobesource-regular) and has design sizes enabled.


Each weight is also available: adobesource-extralight, 
adobesource-light, etc., all the way to adobesource-black. There is 
also a medium weight, that selects the regular versions of Serif and 
Sans, but the medium version of Mono (just slightly bolder than the 
regular one, presumably for better on-screen rendering in terminals).


Design sizes can be disabled by adding -nodesignsize- to the 
typescript name: adobesource-nodesignsize-extralight, etc.


Finally, I thought it would be cool to over-engineer the typescript a 
little bit and provide direct access to the design sizes (in case one 
would want a narrower version for body text, or a bolder and more 
expanded version for titles, etc.). Here they are, again in all their 
weights: adobesource-caption-extralight, adobesource-smtext-light, 
adobesource-subhead, adobesource-display-bold, etc. The ‘regular’ 
design size is accessed by simply using adobesource-nodesignsize.



Questions For the Experts
=

To avoid a gigantic typescript file with a lot of duplication, I 
offloaded the font filename calculation to a Lua function (see 
attached adobesource.lua). I initially wanted to put the Lua code 
inside the typescript, but then I had all sorts of weird Lua 
compilation errors. The very same code works fine when included in a 
normal document though. Could it be 

[NTG-context] Re: typearea

2023-11-02 Thread Hans Hagen

On 11/1/2023 10:47 PM, Aditya Mahajan wrote:

On Sun, 29 Oct 2023, Henning Hraban Ramm wrote:


Am 29.10.23 um 11:37 schrieb Thomas Meyer:

Hi,
I'm new to ConTeXt and try to use the module typearea
(https://modules.contextgarden.net/cgi-bin/module.cgi/action=find/name=typearea).
But the example doesn't work:


The module is from 2008, i.e. MkII. You can’t expect it to work with
MkIV/LMTX.


Perhaps one option can be to ask module authors to rename mkii only modules to 
t-*.mkii, so that they are not loaded in mkiv/lmtx.

a good idea

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: typearea

2023-11-02 Thread Henning Hraban Ramm

Am 01.11.23 um 22:47 schrieb Aditya Mahajan:

On Sun, 29 Oct 2023, Henning Hraban Ramm wrote:


Am 29.10.23 um 11:37 schrieb Thomas Meyer:

Hi,
I'm new to ConTeXt and try to use the module typearea
(https://modules.contextgarden.net/cgi-bin/module.cgi/action=find/name=typearea).
But the example doesn't work:


The module is from 2008, i.e. MkII. You can’t expect it to work with
MkIV/LMTX.


Perhaps one option can be to ask module authors to rename mkii only modules to 
t-*.mkii, so that they are not loaded in mkiv/lmtx.


As a module admin I could and would do that for this old stuff, there 
are more fixes that I’d like to apply, but we’re still waiting for a 
replacement for the Lioness server, if I’m not wrong.


Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___