[XeTeX] fontspec manual 10.17 (scripts/languages)
François Charette
firmicus at ankabut.net
Tue Jul 20 09:13:52 CEST 2010
On 19/07/2010 21:10, David Perry wrote:
> I've been reading 10.17 (version of July 11, 2010) and have some questions, and found
> one typo.
I will let Will comment on your interesting feedback. I only have a few minor observations
below.
>
> 10.17 (the very beginning)
> It would be helpful to have an example of the script and language selection in use. I
> use the Junicode font, which contains an OT lookup to provide the Icelandic form of the
> letter thorn rather than the Old English form when text is tagged as Icelandic. What is
> wrong with this?
>
> \fontspec[Language=Icelandic]{Junicode}
> Þis is the letter þorn in the Icelandic language, using Junicode
>
> It compiles without protest, but I still get the default Old English shape for thorn.
> (My document is already using Latin script, so I didn't specify that specifically.)
>
> There may also be some interactions of script and language. A friend asked me to help
> him get Sanskrit working in XeLaTeX. He's using the Devanagari script (I am told that
> Sanskrit is sometimes written in other scripts). He's on a Mac using an AAT font, so he
> should only need to use:
>
> \fontspec{Devanagari MT}
>
> right? At first I told him to include
>
> \fontspec[Script=Devanagari]{Devanagari MT}
>
> but later realized that's only for OT. The second paragraph of 10.17 does mention this,
> but a footnote or parenthetical remark ("Don't do this with AAT fonts!") might save
> people like me who work almost exclusively with OT from making silly mistakes.
Hmm... I realize that polyglossia implicitly assumes OT fonts only: I should add a warning
when encountering AAT or Graphite fonts. The new fontspec has convenient macros to check
for that I think.
>
> I take it he does NOT need to specify [Language=Sanskrit]. Later on, if he gets an OT
> font that has some special features for Sanskrit (if such a font exists--I'll call it
> RigVeda) and wants to use it on his Mac, then he would write:
>
> \fontspec[Script=Devanagari,Language=Sanskrit]{RigVeda}
>
> to automatically select the ICU renderer and enable the special stuff for Sanskrit. Yes?
>
> 10.17.1
> Typo: TRK is the tag for Turkish in OpenType; tur is the ISO tag. (See
> http://www.microsoft.com/typography/otspec/ttoreg.htm)
Yet many "real-world" OT fonts mistakenly use TUR instead of TRK for Turkish, hence in
this particular case fontspec needs to check for both when "Language=Turkish" is specified.
> A brief explanation beyond the phrase "OpenType definition" might be helpful too for
> those who don't know the OT tags yet (especially since they are not the same as the ISO
> tags with which people might be familiar).
>
> The phrase "Further scripts . . . " confused me. First I thought it meant the ability
> to add scripts or languages not already defined in fontspec. But fontspec already knows
> all the ones that are defined in OpenType, so how could one add a new script if it
> doesn't have an OT tag, since the OT tag is required for the definition? And the
> examples showed a script and a language that are already in fontspec. Does it mean
> something different?
>
I think (Will can correct me if I'm wrong) these are generic macros used internally. They
are nevertheless accessible to the end-user, just in case some font (designed, say, for
Klingon or, perhaps more seriously, for specialized ethnolinguistic uses) were to use
language and/or script tags not defined in the current OpenType standard. A sentence
clarifiying this might be helpful though.
FC
More information about the XeTeX
mailing list