[XeTeX] Using relative font size in XeLaTeX

Andy Black andy_black at sil.org
Mon Feb 9 19:33:47 CET 2009


On 2/6/2009 9:46 AM, Gareth Hughes wrote:
> Andy Black wrote:
>   
>> ...
>> For my purposes, I'm converting an XML representation of linguistic 
>> papers to XeLaTeX.  A user may say that a given piece of mark-up is to 
>> use a font at a relative font size, using a percentage value.  For 
>> example, they might say to use the "Courier New" font at 95% or "Charis 
>> SIL" font at 100% or they may say to use "Abyssinica SIL" at 120% or 
>> Scheherazade at 140%.  This piece of mark-up may appear within the text 
>> of a paragraph, in a section title (and, hence, in a header) or as a 
>> cell in a table, among other possibilities.
>>
>> ...
>>
>> My question is this: is it possible to do this in XeLaTeX?  I'm aware 
>> that LaTeX has the \tiny, \scriptsize, ..., \huge, \Huge commands, but 
>> I'm after a particular percentage of the current font size.
>>
>> Thanks!
>>
>> --Andy
>>     
>
> If you use the fontspec package (automatically loaded by using the
> xltxtra package) with XeLaTeX, you can use the Scale feature to define a
> scaling. Thus, Scheherazade at 140% would be defined by:
>
> \fontspec[Scale=1.4]{Scheherazade}
>
> or, in this specific case,
>
> \fontspec[Scale=1.4, Script=Arabic]{Scheherazade}
>
> to turn on Arabic-script features.
>   

Thanks, Gareth.  That worked just fine.

--Andy



More information about the XeTeX mailing list