* [NTG-context] Adobe Source Typescript With Design Sizes
@ 2023-10-31 19:18 Vincent Hennebert
2023-11-01 11:36 ` [NTG-context] " Hans Hagen via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Hennebert @ 2023-10-31 19:18 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 4036 bytes --]
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 Questions For the Experts further down...)
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 that typescripts are processed in some special mode that
doesn’t like Lua syntax? As a workaround, I put the code in an external
file and require it from inside the typescript.
In the goodies file, I use what I believe is the largest possible font
size that can be used in ConTeXt (16,383pt) to select the Display design
size. Otherwise, text above that size will fall back to the default,
regular design size.
Now, since I use the goodies file only when design sizes are enabled, I
thought I could make it more robust by using AdobeSource4Display as a
default, that is, for any size above 16.5pt. However, if I mix design
sizes enabled and disabled in a document, the disabled one seems to be
using the goodies file even though it’s not mentioned in the typescript.
Any idea of why? For example:
\usetypescriptfile[adobesource]
\usebodyfont[adobesource]
\setupbodyfont[adobesource-nodesignsize]
\starttext
This text is typeset in Display when Regular should be used.
\switchtobodyfont[adobesource]
This text is typeset in Regular with design sizes enabled.
\stoptext
What’s Next
===========
* A harmonious-looking companion math font.
* A harmonious-looking companion math font that uses glyphs from Adobe
Serif 4 when available.
Thanks,
Vincent
[-- Attachment #2: type-imp-adobesource.tex --]
[-- Type: text/x-tex, Size: 5113 bytes --]
\starttypescriptcollection[adobesource]
\startluacode
require("adobesource")
\stopluacode
\starttypescript[serif,sans,mono]
[
adobesource-extralight,
adobesource-light,
adobesource,
adobesource-regular,
adobesource-medium,
adobesource-semibold,
adobesource-bold,
adobesource-black,
adobesource-nodesignsize-extralight,
adobesource-nodesignsize-light,
adobesource-nodesignsize,
adobesource-nodesignsize-regular,
adobesource-nodesignsize-medium,
adobesource-nodesignsize-semibold,
adobesource-nodesignsize-bold,
adobesource-nodesignsize-black,
]
[name]
\setups[font:fallback:\typescriptone]
\definefontsynonym [\typescriptprefix{\typescriptone}] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", false, false))}] [features=default]
\definefontsynonym [\typescriptprefix{\typescriptone}Italic] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", true, false))}] [features=default]
\definefontsynonym [\typescriptprefix{\typescriptone}Bold] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", false, true))}] [features=default]
\definefontsynonym [\typescriptprefix{\typescriptone}BoldItalic] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", true, true))}] [features=default]
\stoptypescript
\starttypescript
[
adobesource-extralight,
adobesource-light,
adobesource,
adobesource-regular,
adobesource-medium,
adobesource-semibold,
adobesource-bold,
adobesource-black,
]
\loadfontgoodies[adobesource-serif]
\definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default] [designsize=auto]
\definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
\definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default]
\stoptypescript
\starttypescript
[
adobesource-nodesignsize-extralight,
adobesource-nodesignsize-light,
adobesource-nodesignsize,
adobesource-nodesignsize-regular,
adobesource-nodesignsize-medium,
adobesource-nodesignsize-semibold,
adobesource-nodesignsize-bold,
adobesource-nodesignsize-black,
]
\definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
\definetypeface [\typescriptone] [ss] [sans] [\typescriptone] [default]
\definetypeface [\typescriptone] [tt] [mono] [\typescriptone] [default]
\stoptypescript
\starttypescript [serif]
[
adobesource-caption-extralight,
adobesource-caption-light,
adobesource-caption,
adobesource-caption-semibold,
adobesource-caption-bold,
adobesource-caption-black,
adobesource-smtext-extralight,
adobesource-smtext-light,
adobesource-smtext,
adobesource-smtext-semibold,
adobesource-smtext-bold,
adobesource-smtext-black,
adobesource-subhead-extralight,
adobesource-subhead-light,
adobesource-subhead,
adobesource-subhead-semibold,
adobesource-subhead-bold,
adobesource-subhead-black,
adobesource-display-extralight,
adobesource-display-light,
adobesource-display,
adobesource-display-semibold,
adobesource-display-bold,
adobesource-display-black,
]
[name]
\setups[font:fallback:serif]
\definefontsynonym [Serif] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", false, false))}] [features=default]
\definefontsynonym [SerifItalic] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", true, false))}] [features=default]
\definefontsynonym [SerifBold] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", false, true ))}] [features=default]
\definefontsynonym [SerifBoldItalic] [\ctxlua{context(userdata.adobesource.getfontname("\typescriptone", "\typescripttwo", true, true ))}] [features=default]
\stoptypescript
\starttypescript
[
adobesource-caption-extralight,
adobesource-caption-light,
adobesource-caption,
adobesource-caption-semibold,
adobesource-caption-bold,
adobesource-caption-black,
adobesource-smtext-extralight,
adobesource-smtext-light,
adobesource-smtext,
adobesource-smtext-semibold,
adobesource-smtext-bold,
adobesource-smtext-black,
adobesource-subhead-extralight,
adobesource-subhead-light,
adobesource-subhead,
adobesource-subhead-semibold,
adobesource-subhead-bold,
adobesource-subhead-black,
adobesource-display-extralight,
adobesource-display-light,
adobesource-display,
adobesource-display-semibold,
adobesource-display-bold,
adobesource-display-black,
]
\definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
\stoptypescript
\stoptypescriptcollection
[-- Attachment #3: adobesource.lua --]
[-- Type: text/x-lua, Size: 1750 bytes --]
userdata = userdata or {}
userdata.adobesource = userdata.adobesource or {}
userdata.adobesource.getfontname = function(style, typescript, italic, bold)
local prefixes = {
serif = "file:SourceSerif4",
sans = "file:SourceSans3",
mono = "file:SourceCodePro",
}
local designsizes = {
caption = "Caption",
smtext = "SmText",
subhead = "Subhead",
display = "Display",
}
local boldalternative = {
extralight = "regular",
light = "semibold",
regular = "bold",
medium = "bold",
semibold = "black",
bold = "black",
black = "black"
}
local i = string.gmatch(typescript, "[^-]*")
i() -- Skip "adobesource"
local explicitdesignsize
local nodesignsize
local weight
local token = i()
if designsizes[token] then
explicitdesignsize = designsizes[token]
weight = i()
elseif token == "nodesignsize" then
nodesignsize = true
weight = i()
else
weight = token
end
weight = weight or "regular"
if style ~= "mono" and weight == "medium" then
weight = "regular"
end
if bold then
weight = boldalternative[weight]
end
local name
if style == "serif" and not (explicitdesignsize or nodesignsize) then
name = "SourceSerif4"
else
name = prefixes[style]
end
if explicitdesignsize then
name = name .. explicitdesignsize
end
name = name .. "-"
if italic then
if weight == "regular" then
return name .. "It"
else
return name .. weight .. "It"
end
else
return name .. weight
end
end
[-- Attachment #4: adobesource-serif.lfg --]
[-- Type: text/plain, Size: 768 bytes --]
local designsizes = {}
for _, v in ipairs({"ExtraLight", "ExtraLightIt", "Light", "LightIt", "Regular", "It",
"Semibold", "SemiboldIt", "Bold", "BoldIt", "Black", "BlackIt"}) do
designsizes["SourceSerif4-"..v] = {
["6.5pt"] = "file:SourceSerif4Caption-"..v..".otf",
["9.5pt"] = "file:SourceSerif4SmText-" ..v..".otf",
["12.5pt"] = "file:SourceSerif4-" ..v..".otf",
["16.5pt"] = "file:SourceSerif4Subhead-"..v..".otf",
["16383pt"] = "file:SourceSerif4Display-"..v..".otf",
default = "file:SourceSerif4-"..v..".otf",
}
end
return {
name = "source-serif4",
version = "1.00",
comment = "Design sizes for Adobe Source Serif 4",
designsizes = designsizes,
}
-- vim:filetype=lua
[-- Attachment #5: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [NTG-context] Re: Adobe Source Typescript With Design Sizes
2023-10-31 19:18 [NTG-context] Adobe Source Typescript With Design Sizes Vincent Hennebert
@ 2023-11-01 11:36 ` Hans Hagen via ntg-context
2023-11-02 20:00 ` Vincent Hennebert
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen via ntg-context @ 2023-11-01 11:36 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
[-- Attachment #1: Type: text/plain, Size: 5947 bytes --]
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
- 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
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 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 that typescripts are processed in some special mode that
> doesn’t like Lua syntax? As a workaround, I put the code in an external
> file and require it from inside the typescript.
>
> In the goodies file, I use what I believe is the largest possible font
> size that can be used in ConTeXt (16,383pt) to select the Display design
> size. Otherwise, text above that size will fall back to the default,
> regular design size.
>
> Now, since I use the goodies file only when design sizes are enabled, I
> thought I could make it more robust by using AdobeSource4Display as a
> default, that is, for any size above 16.5pt. However, if I mix design
> sizes enabled and disabled in a document, the disabled one seems to be
> using the goodies file even though it’s not mentioned in the typescript.
> Any idea of why? For example:
>
> \usetypescriptfile[adobesource]
> \usebodyfont[adobesource]
> \setupbodyfont[adobesource-nodesignsize]
> \starttext
> This text is typeset in Display when Regular should be used.
>
> \switchtobodyfont[adobesource]
> This text is typeset in Regular with design sizes enabled.
> \stoptext
>
>
> What’s Next
> ===========
>
> * A harmonious-looking companion math font.
> * A harmonious-looking companion math font that uses glyphs from Adobe
> Serif 4 when available.
>
>
> Thanks,
> Vincent
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
[-- Attachment #2: test.tex --]
[-- Type: text/plain, Size: 3057 bytes --]
\starttext
% sourceserif4USAGE-WEIGHT[IT].otf
\definetypescriptprefix [b:as:extralight][regular]
\definetypescriptprefix [b:as:light] [semibold]
\definetypescriptprefix [b:as:regular] [bold]
\definetypescriptprefix [b:as:medium] [bold]
\definetypescriptprefix [b:as:semibold] [black]
\definetypescriptprefix [b:as:bold] [black]
\definetypescriptprefix [b:as:black] [black]
\doloopoverlist {,display,caption,smtext,subhead} {
\definetypescriptprefix [u:adobesource#1] [#1]
\definetypescriptprefix [n:adobesource#1] [-regular]
\definetypescriptprefix [i:adobesource#1] [-it]
\definetypescriptprefix [b:adobesource#1] [-\typescriptprefix{b:as:regular}]
\definetypescriptprefix [bi:adobesource#1] [-\typescriptprefix{b:as:regular}it]
\doloopoverlist {extralight,light,regular,medium,semibold,bold,black} {
\definetypescriptprefix [b:adobesource#1##1] [-\typescriptprefix{b:as:##1}]
\definetypescriptprefix [bi:adobesource#1##1] [-\typescriptprefix{b:as:##1}it]
}
}
\starttypescript [adobesource,adobesourcedisplay,adobesourcelight,adobesourcedisplaylight]
%
\writestatus{Serif} {file:sourceserif4 \typescriptprefix{u:\typescriptone} \typescriptprefix {n:\typescriptone}}
\writestatus{SerifBold} {file:sourceserif4 \typescriptprefix{u:\typescriptone} \typescriptprefix {b:\typescriptone}}
\writestatus{SerifItalic} {file:sourceserif4 \typescriptprefix{u:\typescriptone} \typescriptprefix {i:\typescriptone}}
\writestatus{SerifBoldItalic}{file:sourceserif4 \typescriptprefix{u:\typescriptone} \typescriptprefix{bi:\typescriptone}}
%
\definefontsynonym[Serif] [file:sourceserif4\typescriptprefix{u:\typescriptone}\typescriptprefix{n:\typescriptone}.otf]
\definefontsynonym[SerifBold] [file:sourceserif4\typescriptprefix{u:\typescriptone}\typescriptprefix{b:\typescriptone}.otf]
\definefontsynonym[SerifItalic] [file:sourceserif4\typescriptprefix{u:\typescriptone}\typescriptprefix{i:\typescriptone}.otf]
\definefontsynonym[SerifBoldItalic][file:sourceserif4\typescriptprefix{u:\typescriptone}\typescriptprefix{bi:\typescriptone}.otf]
%
\definetypeface [\typescriptone] [rm] [serif] [\typescriptone] [default]
\definetypeface [\typescriptone] [ss] [sans] [dejavu] [default]
\definetypeface [\typescriptone] [tt] [mono] [dejavu] [default]
\definetypeface [\typescriptone] [mm] [math] [dejavu] [default]
\stoptypescript
% \usetypescriptfile[adobesource]
\usebodyfont[adobesource]
\usebodyfont[adobesourcedisplay]
\setupbodyfont[adobesource]
% \starttext
{\switchtobodyfont[adobesource]normal \it italic \bf bold \bi bolditalic}
\startoverlay
{\switchtobodyfont[adobesource]this is a test}
{\red\switchtobodyfont[adobesourcedisplay]this is a test}
\stopoverlay
\startoverlay
{\switchtobodyfont[adobesource]\bf this is a test}
{\red\switchtobodyfont[adobesourcedisplay]\bf this is a test}
\stopoverlay
\stoptext
[-- Attachment #3: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [NTG-context] Re: Adobe Source Typescript With Design Sizes
2023-11-01 11:36 ` [NTG-context] " Hans Hagen via ntg-context
@ 2023-11-02 20:00 ` Vincent Hennebert
2023-11-03 8:31 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Hennebert @ 2023-11-02 20:00 UTC (permalink / raw)
To: ntg-context
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 that typescripts are processed in
>> some special mode that doesn’t like Lua syntax? As a workaround, I put
>> the code in an external file and require it from inside the typescript.
>>
>> In the goodies file, I use what I believe is the largest possible font
>> size that can be used in ConTeXt (16,383pt) to select the Display
>> design size. Otherwise, text above that size will fall back to the
>> default, regular design size.
>>
>> Now, since I use the goodies file only when design sizes are enabled,
>> I thought I could make it more robust by using AdobeSource4Display as
>> a default, that is, for any size above 16.5pt. However, if I mix
>> design sizes enabled and disabled in a document, the disabled one
>> seems to be using the goodies file even though it’s not mentioned in
>> the typescript. Any idea of why? For example:
>>
>> \usetypescriptfile[adobesource]
>> \usebodyfont[adobesource]
>> \setupbodyfont[adobesource-nodesignsize]
>> \starttext
>> This text is typeset in Display when Regular should be used.
>>
>> \switchtobodyfont[adobesource]
>> This text is typeset in Regular with design sizes enabled.
>> \stoptext
>>
>>
>> What’s Next
>> ===========
>>
>> * A harmonious-looking companion math font.
>> * A harmonious-looking companion math font that uses glyphs from Adobe
>> Serif 4 when available.
>>
>>
>> Thanks,
>> Vincent
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [NTG-context] Re: Adobe Source Typescript With Design Sizes
2023-11-02 20:00 ` Vincent Hennebert
@ 2023-11-03 8:31 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2023-11-03 8:31 UTC (permalink / raw)
To: ntg-context
On 11/2/2023 9:00 PM, Vincent Hennebert wrote:
> 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.
they are not really design sizes but more 'designed for s specific
purpose like display' .. so typesetting a 16 pt bodyfont in display is
not a good idea ... otherwise, if someone watched the text on a beamer
you'd have to use the display variant for everything as that definitely
goes over 10pt
> 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.
indeed, and even more abstract: running text vs headings vs title pages
> 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.’
i'm not sure what captions are for
> 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?
posters stil can use regular but with a screaming bolder and darker
looking title in display (although often display doesn't look that good)
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-03 8:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31 19:18 [NTG-context] Adobe Source Typescript With Design Sizes Vincent Hennebert
2023-11-01 11:36 ` [NTG-context] " Hans Hagen via ntg-context
2023-11-02 20:00 ` Vincent Hennebert
2023-11-03 8:31 ` Hans Hagen
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).