Re: Font changes
Bruce Smith wrote:
> >In particular, I need to put some machinery in place to handle font
> >changes, so that one can render vectors in bold, etc. One option is
> >to add an "internal schema" such as
> > (mfont "font data" args)
> >where "font data" would be things like "Bold", "Upright",
> >"BoldUpright" and so on. The effect would be to override the default
> >font for (mi ... ) entries in the scope of the (mfont ...).
> This sounds best to me too -- I think it will be compatible with
> whatever we end up with. I think it's better for "args" to be only
> one argument -- otherwise you have to decide how several of them
> are supposed to be arranged.
I encountered a similar issue in creating the renderer for
MINSE several weeks ago.
The graphical rendering layer handles this issue by having
primitives to alter styles (such as @bold, @uprt, @sans) which
set the style for rendering their argument.
So i agree it is advisable for there to be only one argument,
and also i'd like to point out that a simple string for "font data"
would be insufficient; you need to be able to set different
attributes independently, the way the polymediator does it.
It also accepts a primitive @enc for choosing different font
encodings, allowing compound definitions to switch to the
symbol font when necessary and so on.
The text renderer, of course, does not do anything with these
primitives; there is a separate set of style definitions for
it which yield the appropriate text rendering.