[NTG-context] Simplefonts: Font scaling problem

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sat Nov 12 15:44:32 CET 2011


Am 12.11.2011 um 11:01 schrieb Thomas A. Schmitz:

> On 11/11/2011 06:20 PM, Christian wrote:
>> Good evening!
>>> I want to scale a font loaded via the simplefonts so sans and serif have the
>>> same x-height.
>>> But as soon as I use a font size larger than 12pt, the scaling is somehow off or
>>> ignored.
>>> Example:
>>> 
>>> \usemodule[simplefonts]
>>> \setupsimplefonts[expansion=quality, protrusion=quality]
>>> \setmainfont[Times New Roman]
>>> \setsansfont[Arial][scale=0.863]
>>> \starttext
>>> \setupbodyfont[6pt]
>>> 06pt serif xx{\ss xx sans}\\ %fine
>>> \setupbodyfont[12pt]
>>> 12pt serif xx{\ss xx sans}\\ %fine, too
>>> \setupbodyfont[14pt]
>>> 14pt serif xx{\ss xx sans}\\ %here it starts to be off
>>> \setupbodyfont[16pt]
>>> 16pt serif xx{\ss xx sans}\\
>>> \stoptext
> 
> Your example is a bit difficult to test here because it's windows-centric, I don't have Arial on my system. But by looking at it, you should have something like this in your file before setting the fonts:
> 
> \starttypescript [sans] [default] [size]
> \definebodyfont [16pt] [ss] [default]
> \stoptypescript
> \definebodyfontenvironment[16pt]
> 
> and so on for other arbitrary sizes. ConTeXt doesn't define complete environments for every imaginable size (but I imagine Wolfgang may come up with a clever solution within his module).

A clever solution would take a while because in this case i want to change the whole code in rewrite it with all the new mkiv goodies and the spec interface.

A fast solution is also possible but it won’t be more than a fix.

Wolfgang


More information about the ntg-context mailing list