Hi all,

I have read (somewhere or other) that fractional point font sizes are ok.
(And pagella at 10.5pt is what was used for the "fr" translation of ANSS.)
For example, the following happily compiles into a nice PDF:

%%%%%%%%%%%%%%%% cut here %%%%%%%%%%%%%%%
\setupbodyfont[10.5pt]

\starttext

This is a line of pagella at 10.5pt.

%\switchtobodyfont[script]   % Happiness in the world without this line.

Boom!

\stoptext
%%%%%%%%%%%%%%%% cut here %%%%%%%%%%%%%%%

However, if one uncomments the \switchtobodyfont line, the context run
fails with this:

-----------------------------------------------------------------------
...
fonts           > 'fallback modern rm 10.5pt' is loaded
tex error       > tex error on line 7 in file ./crash-and-burn.tex: Illegal 
unit of measure (pt inserted)
<to be read again> 
    
    \relax 
<macro> \normalizebodyfontsize 
    #1#2->\scratchdimen \ifchkdimension #2\or \lastchkdimension \else #2
    \dimexpr \fontbody \relax \fi \expandafter \let \expandafter #1\csname 
\??fontnormalizedbody \number \scratchdimen \endcsname \ifrelax 
#1\normalizebodyfontsize_indeed #1\fi 
<macro> \font_helpers_define_unknown_check_sizes 
    #1#2->\ifcsname \??fontenvironments \s!default #2\endcsname \expandafter 
\normalizebodyfontsize \csname \??fontenvironments #1#2\endcsname {\csname 
\??fontenvironments \s!default #2\endcsname \dimexpr #1\relax }
    \c_font_defining_state \conditionaltrue
<macro> \font_helpers_process_relative_size_list 
    #1->#1\v!big 
    #1\v!small 
<macro> \font_helpers_define_unknown_font 
    #1->\font_helpers_register_fontbody {#1}\c_font_defining_state 
\conditionalfalse \font_helpers_process_relative_size_list 
{\font_helpers_define_unknown_check_sizes {#1}}
    \ifconditional \c_font_defining_state \c_font_defining_state 
\conditionalfalse \f
<macro> \font_basics_switch_points 
    #1->\ifcsname \??fontbodyknown #1\endcsname \else 
\font_helpers_define_unknown_font {#1}
    \fi \ifcsname \??fontbodyknown #1\endcsname \font_basics_complete_switch 
{#1}\localbodyfontsize #1\relax \normalizebodyfontsize \normalizedbodyfontsize 
\localbody
 ...
<line 3.7> 
    \switchtobodyfont[script]
       % Happiness in the world without this line.
 1     \setupbodyfont[10.5pt]
 2     
 3     \starttext
 4     
 5     This is a line of pagella at 10.5pt.
 6     
 7 >>  \switchtobodyfont[script]   % Happiness in the world without this line.
 8     
 9     Boom.
10     
11     \stoptext
12     
Dimensions can be in units of em, ex, sp, cm, mm, es, ts, pt, bp, dk, pc, dd
cc or in; but yours is a new one! I'll assume that you meant to say pt, for
printer's points: two letters. User units also have at most two characters.
mtx-context     | fatal error: return code: 1
-----------------------------------------------------------------------

What do I learn from this?
(a) Fractional point font sizes are not a thing, and I shouldn't do that?
(b) Fractional point font sizes may work, but are unreliable?
(c) \switchtobodyfont[script] doesn't work with fractional point font sizes?
(d) Something else entirely?

Thanks.
                                Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
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
___________________________________________________________________________________

Reply via email to