[XeTeX] Anomalies in using feature-enabled OT fonts

Peter Dyballa Peter_Dyballa at Web.DE
Sun Nov 21 00:01:19 CET 2010


Am 20.11.2010 um 16:35 schrieb Takayuki YATO (ZR):

> I understand your explanation and admit it's logical. But from the
> grammar of XeTeX I have the impression that XeTeX treats a font with
> some feature enabled as different from the original font; that is,
> there are two distinct fonts \tgpNorm and \tgpSmcp, and the latter has
> small-caps glyphs for lowercase characters. In this view, the glyph at
> slot 97 is different between these "two" fonts. And it is quite  
> natural
> that one expect \fontcharwd, \XeTeXcharglyph, etc. applied to \tgpSmcp
> return the information on the small-caps glyphs.


When one is trying to measure something one often is not able to  
measure this thing... And I think you were always referencing the  
standard glyphs while XeTeX allows for the printed glyphs that are  
somehow "translated".

So I changed your macro and text body a bit, which now gives quite  
reasonable values:

	\def\measure#1{%
	 #1 % print the character
	 \setbox0=\hbox{#1}
	 \immediate\write16{% output to terminal
	   <#1>:
	   wd=\the\wd0\space\space/
	   ht=\the\ht0\space\space/
	   dp=\the\dp0}}
	\font\tgpNorm="TeX Gyre Pagella"       % default
	\font\tgpSmcp="TeX Gyre Pagella:+smcp" % small-caps
	% There two lines should not report the same measurement....
	\tgpNorm\measure{a}\measure{f}\measure{g}\measure{A}\measure{F} 
\measure{G}
	\tgpSmcp\measure{a}\measure{f}\measure{g}\measure{A}\measure{F} 
\measure{G}


But I think it would be nice to have easy means to determine the  
printed glyph's dimensions.

--
Greetings

   Pete


"Evolution"            o           __o                     _o _
           °\___o      /0~         -\<,              ^\___ /=\\_/-%
oo~_______ /\ /\______/ \_________O/ O_______________o===>-->O--o____




More information about the XeTeX mailing list