How to override a font in a typescript
Practical example: when I set up palatino, the typescript file set 'modern' as the typeface (which again tries to load the lm files :)) Assume now that I want to overrule that choice, and only that choice. Can I do this from within my source file? -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
Practical example: when I set up palatino, the typescript file set 'modern' as the typeface (which again tries to load the lm files :))
Assume now that I want to overrule that choice, and only that choice. Can I do this from within my source file?
one problem is that a typescript not always defines rm, ss tt mm so that leaves you with holes in your font system; one option is to nil the preloader in for instance the palatino typescript; put this in your local copy of cont-sys.tex: \let\preloadfonts\relax \usetypescript[palatino][\defaultencoding] \setupbodyfont[palatino,rm,12pt] Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Friday, July 8, 2005 Hans Hagen wrote:
Giuseppe Bilotta wrote:
Practical example: when I set up palatino, the typescript file set 'modern' as the typeface (which again tries to load the lm files :))
Assume now that I want to overrule that choice, and only that choice. Can I do this from within my source file?
one problem is that a typescript not always defines rm, ss tt mm so that leaves you with holes in your font system; one option is to nil the preloader in for instance the palatino typescript; put this in your local copy of cont-sys.tex:
\let\preloadfonts\relax \usetypescript[palatino][\defaultencoding] \setupbodyfont[palatino,rm,12pt]
I already nihiled preloadfonts in my cont-loc. Otherwise, I wouldn't have been able to compile anything so far :) The problem is that the Palatino typescript *explictily* mentions 'modern' as its tt font (scaled by 1.75). I would like to override that in my source file. Is this possible? -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
The problem is that the Palatino typescript *explictily* mentions 'modern' as its tt font (scaled by 1.75). I would like to override that in my source file. Is this possible?
you can define any typescript that you want, so \starttypescript [my-palatino] [ec] \definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=\typescripttwo] \definetypeface [palatino] [tt] [mono] [courier] [default] [encoding=\typescripttwo,rscale=1.075] % probably smaller, say .95 \definetypeface [palatino] [mm] [math] [palatino] [default] [encoding=default] \stoptypescript \usetypescript[my-palatino][ec] ... Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Friday, July 8, 2005 Hans Hagen wrote:
you can define any typescript that you want, so
\starttypescript [my-palatino] [ec]
\definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=\typescripttwo] \definetypeface [palatino] [tt] [mono] [courier] [default] [encoding=\typescripttwo,rscale=1.075] % probably smaller, say .95 \definetypeface [palatino] [mm] [math] [palatino] [default] [encoding=default]
\stoptypescript
\usetypescript[my-palatino][ec] ...
Ok so far, but having to rewrite all of it just to override a single value seems excessive, to me. Isn't there a simple way to only override only some things? I had tried a \definetypeface line on its own, but it didn't seem to work ... -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta said this at Fri, 8 Jul 2005 15:24:10 +0200:
Ok so far, but having to rewrite all of it just to override a single value seems excessive, to me. Isn't there a simple way to only override only some things?
I had tried a \definetypeface line on its own, but it didn't seem to work ...
Hmm. How about: \definetypescriptsynonym[modern][courier] % and test with: \usetypescript[adobekb][ec] \usetypescript[palatino][ec] \setupbodyfont[palatino] \starttext \showfontstrip \stoptext (It'll screw up the relative sizing put in place, and URW's Courier is singularly ugly, and I would endorse what Hans said: you should be using Latin Modern anyway, but I think it achieves what you want...) -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Friday, July 8, 2005 Adam Lindsay wrote:
Giuseppe Bilotta said this at Fri, 8 Jul 2005 15:24:10 +0200:
Ok so far, but having to rewrite all of it just to override a single value seems excessive, to me. Isn't there a simple way to only override only some things?
I had tried a \definetypeface line on its own, but it didn't seem to work ...
Hmm. How about:
\definetypescriptsynonym[modern][courier]
That's quite a hack, but if there is no other choice ...
% and test with:
\usetypescript[adobekb][ec] \usetypescript[palatino][ec] \setupbodyfont[palatino]
\starttext \showfontstrip \stoptext
(It'll screw up the relative sizing put in place, and URW's Courier is singularly ugly, and I would endorse what Hans said: you should be using Latin Modern anyway, but I think it achieves what you want...)
Actually I was thinking about something like Lucida Console ... provided that I manage to set it up :) -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
\definetypescriptsynonym[modern][courier]
That's quite a hack, but if there is no other choice ...
but a valid one; well, the idea is that oen can combine fonts, so ... btw, why don't you want to install latin modern? the monospaced variant combines well with palatino; of course one has to play with rscale a bit (i'm amazed about the amount of tex docs and books on the web that have funny relative scaling)
Actually I was thinking about something like Lucida Console ... provided that I manage to set it up :)
what platform? there is a myway on that; we can add the metrics to the (windows) font zip file if needed Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Friday, July 8, 2005 Hans Hagen wrote:
Giuseppe Bilotta wrote:
\definetypescriptsynonym[modern][courier]
That's quite a hack, but if there is no other choice ...
but a valid one; well, the idea is that oen can combine fonts, so ...
Not so valid at all. For example, it doesn't allow me to reset the scale factor. I really think we need a way to overrule single selections within a typescript without resorting to file synonyms.
btw, why don't you want to install latin modern? the monospaced variant combines well with palatino; of course one has to play with rscale a bit (i'm amazed about the amount of tex docs and books on the web that have funny relative scaling)
Because I want to try something different. Plus, if I didn't, you wouldn't notice where the typescript mechanism would need to be extended to provide more flexibility :)
Actually I was thinking about something like Lucida Console ... provided that I manage to set it up :)
what platform? there is a myway on that; we can add the metrics to the (windows) font zip file if needed
I'm on Windows XP. Anyway, now I'm having a look at the Luxi fonts. Look interesting. -- Giuseppe "Oblomov" Bilotta
participants (3)
-
Adam Lindsay
-
Giuseppe Bilotta
-
Hans Hagen