[XeTeX] Controlling glyph variations
Mark Dancer
ae1fric at yahoo.co.uk
Tue Oct 30 12:42:18 CET 2007
Hi Will,
Thanks for the response.
> The problem is that a stylistic set replaces the glyphs
> that it
> affects and leaves the rest alone -- if the variant gives
> you a swash
> A only (say) you can still type "B" to get the unchanged
> B from the
> base font.
Just to clarify what I'm getting when I go through the
loop:
>> \newcount\nglyph
>> \newcount\glyf \newcount\step
>> \nglyph =\XeTeXcountglyphs\varfont
>> \noindent{\title Zapfino First Variant Glyph Set
>> contains \number\nglyph\ glyphs}
>> \nobreak\medskip
>> \noindent
>> \loop \advance\glyf by 1
>> \ifnum\glyf<\nglyph
>> {\varfont\XeTeXglyph\glyf }
>> \repeat
gives me every variant of every character (including the
base glyph). In the middle of the document I get ... d d d
d d d d d d ..., where each d looks different (there being
eight variants glyphs for d).
> You'd want to loop through character sets (based on
> unicode chars, I
> guess) you were interested in and compare what the
> XeTeXglyph for each
> is for the base font and for the font with the variant
> selected; if
> they're different, that glyph is a variant.
> As far as I know, there's no way to do it by using
> XeTeXglyph alone.
I'll try this and let you know how it goes.
> Does this mean that you can't find if there's a variant
> of a ligature?
Good point. There are some funky ligatures in Zapfino up
round 1050-1130 decimal--multiple fi, fl ligatures. I think
they will require special case code.
Thanks for pointing me in the right direction.
Cheers,
Mark
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
More information about the XeTeX
mailing list