[dev-context] \doiftext and fallback fonts

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Mon Oct 7 23:24:59 CEST 2019


Hi Hans,

the \doiftext(else) command gives a wrong result when the checked 
character comes from a fallback font.


\definefontfallback [testfallback] [file:dejavuserif] [greekandcoptic]

\definefontsynonym [FallbackTest] [file:lmroman10-regular] 
[fallbacks=testfallback]

\starttext

\definedfont[FallbackTest]

a α % does the fallback work?

\doiftextelse{a}{YES}{NO}

\doiftextelse{α}{YES}{NO}

\stoptext


As a result of this mechanism which use this check like the number 
renderer in the section command produce wrong output (missing number in 
the section title).


\setuphead [section] [conversion=g]

\definefallbackfamily [mainface] [rm] [DejaVu Serif] [range=greekandcoptic]

\definefontfamily [mainface] [rm] [Latin Modern Roman]
\definefontfamily [mainface] [mm] [Latin Modern Math]

\setupbodyfont [mainface]

\starttext

\placecontent

\section{wow}

\stoptext


Wolfgang



More information about the dev-context mailing list