[XeTeX] Re: Unicode/font mixing
Jonathan Kew
jonathan_kew at sil.org
Tue Jan 25 18:07:33 CET 2005
On 25 Jan 2005, at 3:17 pm, Will Robertson wrote:
> On 25 Jan 2005, at 10:14 PM, Jonathan Kew wrote:
>> There have been requests in the past for a way to, in effect, declare
>> several "current fonts" each covering a different Unicode range, so
>> that mixed-script text wouldn't require explicit font changes. This
>> is an interesting possibility, but coming up with a design that would
>> reliably do "the right thing", especially with characters such as
>> punctuation or numerals that may be "shared" between scripts, is not
>> a trivial thing.
>
> Do I remember that you once mentioned that this would be a big
> performance hit as well?
>
> I think that we are thinking about this the wrong way. What we need
> instead is a tool which (temporarily?) merges fonts together.
>
> So (in the XeTeX document itself if possible, but this would require
> trickery -- an external tool could work straight away), you specify a
> bunch of fonts, each adding their glyphs to the pool (-not-
> overwriting as they go) and end up with a final megafont. (As opposed
> to a metafont :))
This is not an easy thing. Especially once you consider that you'll
still need to scale glyphs from different sources in order to match
them visually. And that the fonts might be of quite different types
(TrueType, Type1, ....?). And don't even start to think about hints....
And there's the issue of font license terms, too.
> In fact, surely fontforge at this very minute can at least do the
> glyphs -- but merging OpenType tables might be harder, I wouldn't
> know. (I wish I knew stuff.)
Yes, it would be hard. And once you start thinking non-Latin, harder
still. And what if some of the fonts are OpenType, but others AAT?
My feeling is that it's not going to happen, at least not in a truly
generalized way. If individuals want to build custom "mega-fonts"
(licenses permitting) for their specific needs, fine--have fun with
FontForge! But I don't believe it can be automated in the way you might
imagine.
What *might* actually happen some day would be a generalization of
\font declarations, allowing you to specify separate fonts associated
with script tags (using Unicode's assignments of characters to named
scripts). That would be more usable, IMO, than explicit lists of
characters (do *you* know exactly which Unicode codepoints are
associated with the Latin script?). It would mean that you'd need to
choose a Latin (for example) font that does actually cover all the
Latin characters you're using; but then, I don't think it makes much
typographic sense to use Adobe Caslon for 98% of the Latin characters
in your text, and have the engine "fall back" to Lucida Grande for a
couple of obscure accented forms that Caslon doesn't include. If you
need them, make sure you use a font that supports them!
Imagine (at the TeX level) something like:
\font\txtfont="Adobe Garamond Pro/
Cyrl,Grek=Gentium;scale=0.96/
Arab=Lotus Linotype:script=arab;scale=1.2/
Deva=Devanagari MT:scale=1.1/
Hani=STSong:scale=1.1" at 12pt
Which would use the first font by default, but for the other scripts
specified (see Unicode Tech Rpt #24 for the tags), it would use other
fonts as specified.
Note that there are *NO CURRENT PLANS* to implement this; it's just to
let you know how I'm currently thinking it could be approached, if we
ever get that far.
JK
More information about the XeTeX
mailing list