I have been earnestly trying to understand how they work by attempting a slightly more complex one. So far, I have: ------------------------------------------------------- \definefontfeature[default][mode=node,language=dflt,script=latn,kern=yes,liga=yes,tlig=yes,trep=yes] \definefontfeature[body][onum=yes,pnum=yes,protrusion=quality,expansion=quality]%turn hz on %plus some I hope to use later \definefontfeature[tabular][sans=yes,tnum=yes,onum=yes]%turn hz off \definefontfeature[allcaps][cpsp=yes,case=yes,lnum=yes] \definefontfeature[smallcaps][smcp, onum=yes] \definefontfeature[swashes][swsh=yes] \definefontfeature[inferior][sinf=yes] \definefontfeature[superior][sups, ordn=yes] \definefontfeature[numerator][numr=yes] \definefontfeature[denominator][dnom=yes] \definefontfeature[prop-os][pnum=yes,onum=yes] \definefontfeature[prop-lin][pnum=yes,lnum=yes] \definefontfeature[tab-os][tnum=yes,onum=yes] \definefontfeature[tab-lin][tnum=yes,lnum=yes] \definefontfeature[ornaments][ornm=yes] \definefontfeature[lgc][script=latn,script=grek,script=cyrl] \starttypescript [serif] [junicode] \definefontsynonym[Junicode][name:junicode][features=default,features=body,features=lgc] \definefontsynonym[Junicode-Bold][name:junicodebold][features=default,features=body,features=lgc] \definefontsynonym[Junicode-Italic][name:junicodeitalic][features=default,features=body,features=lgc] \definefontsynonym[Junicode-BoldItalic][name:junicodebolditalic][features=default,features=body,features=lgc] \stoptypescript \starttypescript [serif] [junicode] \definefontsynonym[Serif][Junicode][features=default,features=body,features=lgc] \definefontsynonym[SerifBold][Junicode-Bold][features=default,features=body,features=lgc] \definefontsynonym[SerifItalic][Junicode-Italic][features=default,features=body,features=lgc] \definefontsynonym[SerifBoldItalic][Junicode-BoldItalic][features=default,features=body,features=lgc] \stoptypescript \starttypescript [junicode] \definetypeface [junicode] [rm] [serif] [junicode] [default] [features=default,features=body,features=lgc,features=hanging,features=hz] \stoptypescript \setupalign[hanging,hz] \setupbodyfont[junicode,12pt] ------------------------------------------------------------------------- but, 1. tlig and trep aren't working, so evidently, features=default isn't getting through. No hanging or hz is happening either---probably the same problem. 2. As far as I can tell from trying to decode examples, there is some hidden connection between the first arguments of the second typescript block and the font switches. So, for example, a secret connection between SerifBoldItalic and \bi seems to connect Junicode-BoldItalic to \bi. Fine, but, in all the examples I've seen, there are no more than two weights and no widths. In some cases, I have five weights (light, book, medium, semi-bold, bold). How do I set up the typescript for this and the switches in the text? Must I learn more pairs like (SerifBoldItalic, \bi)?
Am 17.03.10 02:26, schrieb Michael Saunders:
I have been earnestly trying to understand how they work by attempting a slightly more complex one.
So far, I have:
[...]
1. tlig and trep aren't working, so evidently, features=default isn't getting through. No hanging or hz is happening either---probably the same problem.
You can apply only *one* feature to \definefontfeatures.
2. As far as I can tell from trying to decode examples, there is some hidden connection between the first arguments of the second typescript block and the font switches. So, for example, a secret connection between SerifBoldItalic and \bi seems to connect Junicode-BoldItalic to \bi. Fine, but, in all the examples I've seen, there are no more than two weights and no widths. In some cases, I have five weights (light, book, medium, semi-bold, bold). How do I set up the typescript for this and the switches in the text? Must I learn more pairs like (SerifBoldItalic, \bi)?
You need more typefaces. One for light, another one for condensed etc. styles: Serif -> \rm Sans -> \ss Mono -> \tt Handwriting -> \hw Calligraphy -> \cg alternatives: -- Italic -> \tf Slanted -> \sl Bold -> \bf BoldItalic -> \bi BoldSlanted -> \bs Caps -> \sc combinations: SerifItalic -> \rm\it, \rmit SansSlanted -> \ss\sl, \sssl MonoBold -> \tt\bf, \ttbf Wolfgang
On Wed, Mar 17, 2010 at 09:20, Wolfgang Schuster wrote:
Am 17.03.10 02:26, schrieb Michael Saunders:
2. As far as I can tell from trying to decode examples, there is some hidden connection between the first arguments of the second typescript block and the font switches. So, for example, a secret connection between SerifBoldItalic and \bi seems to connect Junicode-BoldItalic to \bi. Fine, but, in all the examples I've seen, there are no more than two weights and no widths. In some cases, I have five weights (light, book, medium, semi-bold, bold). How do I set up the typescript for this and the switches in the text? Must I learn more pairs like (SerifBoldItalic, \bi)?
Yes, but there are not many (tf, it, sl, bf, bi, bs, sc) and I assume that they are extensible. See also below.
You need more typefaces. One for light, another one for condensed etc.
styles:
Serif -> \rm Sans -> \ss Mono -> \tt Handwriting -> \hw Calligraphy -> \cg
alternatives:
-- Italic -> \tf Slanted -> \sl Bold -> \bf BoldItalic -> \bi BoldSlanted -> \bs Caps -> \sc
combinations:
SerifItalic -> \rm\it, \rmit SansSlanted -> \ss\sl, \sssl MonoBold -> \tt\bf, \ttbf
Maybe I'm wrong, but shouldn't it be possible (I didn't test) to modify font-unk.mkiv and add a few extra definitions to the following? (Maybe not modify font-unk itself, but just adding a couple of more definitons to the typescript.) \definebodyfont [default] [rm] [tf=Serif sa 1, bf=SerifBold sa 1, it=SerifItalic sa 1, sl=SerifSlanted sa 1, bi=SerifBoldItalic sa 1, bs=SerifBoldSlanted sa 1, sc=SerifCaps sa 1] You could add your in=SerifYourFontVariantName sa 1, bd=SerifYourOtherFontVariantName sa 1, And then \definefontsynonym[SerifYourFontVariantName][YourFontName] It's true that most people don't do that, but I see no reason for not extending the model for your particular needs. Mojca
Am 17.03.10 10:04, schrieb Mojca Miklavec:
Maybe I'm wrong, but shouldn't it be possible (I didn't test) to modify font-unk.mkiv and add a few extra definitions to the following? (Maybe not modify font-unk itself, but just adding a couple of more definitons to the typescript.)
\definebodyfont [default] [rm] [tf=Serif sa 1, bf=SerifBold sa 1, it=SerifItalic sa 1, sl=SerifSlanted sa 1, bi=SerifBoldItalic sa 1, bs=SerifBoldSlanted sa 1, sc=SerifCaps sa 1]
You could add your in=SerifYourFontVariantName sa 1, bd=SerifYourOtherFontVariantName sa 1,
The last time i did this you needed for MkIV also \definefontalternative[in] \definefontalternative[bd] but be carefull with the shortcuts, \in is already used (references).
And then \definefontsynonym[SerifYourFontVariantName][YourFontName]
It's true that most people don't do that, but I see no reason for not extending the model for your particular needs.
Wolfgang
On Wed, Mar 17, 2010 at 10:11, Wolfgang Schuster wrote:
Am 17.03.10 10:04, schrieb Mojca Miklavec:
Maybe I'm wrong, but shouldn't it be possible (I didn't test) to modify font-unk.mkiv and add a few extra definitions to the following? (Maybe not modify font-unk itself, but just adding a couple of more definitons to the typescript.)
\definebodyfont [default] [rm] [tf=Serif sa 1, bf=SerifBold sa 1, it=SerifItalic sa 1, sl=SerifSlanted sa 1, bi=SerifBoldItalic sa 1, bs=SerifBoldSlanted sa 1, sc=SerifCaps sa 1]
You could add your in=SerifYourFontVariantName sa 1, bd=SerifYourOtherFontVariantName sa 1,
The last time i did this you needed for MkIV also
\definefontalternative[in] \definefontalternative[bd]
but be carefull with the shortcuts, \in is already used (references).
I know, but it's up to Michael to choose the names for his scheme. It's not very wise to override existing comands anyway; and almost any two-letter could could be taken for language switching. (\sl should stand for Slovenian, though it has a lower priority than font switching.) If he decides not to use cross-references, it may even work (with zero guarantee). Mojca
Am 17.03.10 12:33, schrieb Mojca Miklavec:
I know, but it's up to Michael to choose the names for his scheme. It's not very wise to override existing comands anyway; and almost any two-letter could could be taken for language switching. (\sl should stand for Slovenian, though it has a lower priority than font switching.)
You loose the language shortcut but you're still able to change hyphenation patterns with \language[...], that's not possible with references. Wolfgang
participants (3)
-
Michael Saunders
-
Mojca Miklavec
-
Wolfgang Schuster