2013/11/27 Simon Cozens <[email protected]>: > This is possibly a daft question, but... > > In traditional TeX, character tokens are processed and put into boxes > individually, with fairly primitive ligature tables. Obviously XeTeX doesn't > do this, using Harfbuzz (or ICU or whatever) to do the shaping and layout. > > My question is, if you're not "showing" individual characters to the shaping > engine for it to consider, what defines how big a string of characters to > shape at a time? Does XeTeX break at the "word" level and then shape a word, > and if so what defines a word? (Chinese has no word breaks!) Or does it > shape an entire paragraph of text at a time (!) and then box up the glyphs > individually? Or...? > I am not an expert but shaping can be changed within a pragraph. The following file produces the attached PDF:
\documentclass{article}
\usepackage{fontspec,polyglossia}
\setotherlanguages{hindi,sanskrit}
\newfontfamily\hindifont[Language=Hindi,Script=Devanagari,Mapping=velthuis]{FreeSerif}
\newfontfamily\sanskritfont[Language=Sanskrit,Script=Devanagari,Mapping=velthuis]{FreeSerif}
\def\shakti{"sakti}
\begin{document}
Hindi: \texthindi{\shakti}, Sanskrit: \textsanskrit{\shakti}
\end{document}
> (I've tried starting at layoutChars in XeTeXLayoutInterface.cpp and working
> backwards but I can't understand where I end up: measure_native_node shapes
> a node, but what's a node?)
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
--
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz
sh.pdf
Description: Adobe PDF document
-------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex
