[NTG-context] Monospace fallback kerning

Hans Γ…berg haberg-1 at telia.com
Wed Dec 19 15:48:37 CET 2018

> On 19 Dec 2018, at 11:31, Hans Hagen <j.hagen at xs4all.nl> wrote:
> On 12/19/2018 10:46 AM, Hans Γ…berg wrote:
>>> On 11 Dec 2018, at 15:05, Hans Γ…berg <haberg-1 at telia.com> wrote:
>>> In the example below, multiple spaces do not use the spacing of the fallback font for multiple spaces, but instead of the main font it seems, despite the ASCII U+0020 being in the forced override. So the question is how to force ConTeXt to use the fallback font also for multiple spaces.
>> A workaround is simply making the monospace font the main font:
>> \definefallbackfamily [mainface][mono][stix][range={0100-10FFFF},force=yes]
>> \definefontfamily     [mainface][mono][courier]
> You can force a monospaced by inheriting from a paremnt font, as in:
> \definefontfallback
>  [Mono] [almfixed*none]
>  [arabic] [force=yes]
> \definefontfallback
>  [Mono] [sileot*none]
>  [hebrew] [force=yes,factor=1] % factor forces a monospace
> \setupbodyfont
>  [dejavu,10pt]

I thought such a feature would be suitable, but I am not sure now to get the math glyph override with the \definefontfallback command (see example below). With \definefallbackfamily there is an extra argument for the style:
\definefallbackfamily [mainface][mono][stixtwotext][range={00B2-00B3,00B9,02070-0208F},force=yes]

Otherwise, the use of monospace has several functions: Signaling it is computer code, allowing indentation, and allowing a tabular style. Maybe it should not all be put on the font (editing it by hand with markup may be tedious and error prone).

An incidental remark: TeX puts simultaneous sub- and superscripts above each other, and the Unicode sub- and superscripts are translated as such in the example below math mode. But actually, there may be a semantic difference  between the order (though not in the case below), and that is used in tensor notation. In TeX, the original suggestion is to use {} in such a case.

 [Mono] [stixtwotext]
 [range={0100-10FFFF},factor=1] [force=yes]



  𝑷₂₀(0), βˆ€Β²π‘₯⁰⁺²₂₀: 𝑷₂₀(π‘₯⁰⁺²₂₀) β‡’ 𝑷₂₀(s(π‘₯⁰⁺²₂₀)) ⊒ βˆ€ΒΉπ‘¦β°βΊΒΉβ‚‚β‚€ 𝑷₂₀(𝑦⁰⁺¹₂₀)

  𝑷₂₀(0), βˆ€Β²π‘₯⁰⁺²₂₀: 𝑷₂₀(π‘₯⁰⁺²₂₀) β‡’ 𝑷₂₀(s(π‘₯⁰⁺²₂₀)) ⊒ βˆ€ΒΉπ‘¦β°βΊΒΉβ‚‚β‚€ 𝑷₂₀(𝑦⁰⁺¹₂₀)


More information about the ntg-context mailing list