Changes

Jump to navigation Jump to search
1,171 bytes added ,  16:30, 4 June 2012
Add section about delayed font mechanism
</texcode>
 
== Layers and the delayed font mechanism ==
 
Until some years ago the Latin Modern font was always automatically
loaded, regardless of the users choice of font. Font loading takes a
considerable amount of time (check the stats at the end of a context
run to get an idea). This led to the question:
 
“Why start loading a big, complex font like Latin Modern before we
know which font the user actually wants to use and waste several
seconds on it, just to start loading the users choice afterwards?”
 
The answer was:
 
”We delay loading the font until we know which font the user wants
to use. If the user doesn't tell us, then we fall back to Latin
Modern.”
 
The body font is set up in the setup area (the part above
<code>\starttext</code>). That, in turn, means that when having reached
<code>\starttext</code>, the users choice of font is known and can be loaded. It
is more efficient if a font other then Latin Modern is used.
 
One drawback is that typeset text in the setup area has no font
setup and will fall back to Latin Modern Mono. Usually no text is
typeset in the setup area. However, layers are an exception and
a font needs to be set up beforehand.
== See Also ==
69

edits

Navigation menu