Monospace Fonts for Verbatim
I have a typescript I am using for a custom font, but the custom font has no monospace variant appropriate for verbatim text. I'm attempting to use Courier or some other monospace font for verbatim and maintain my custom font for normally typeset serf text. My broken typescript is as follows: \starttypescript [map][sunsans,sunserif][texnansi] \loadmapfile[texnansi-sun-sunsans.map] \loadmapfile[texnansi-sun-sunserif.map] \stoptypescript % sans serif \starttypescript [sans] [sunsans] [name] \definefontsynonym[Sans] [SunSans-Regular] \definefontsynonym[SansItalic] [SunSans-Italic] \definefontsynonym[SansBold] [SunSans-RegularDemi] \definefontsynonym[SansBoldItalic] [SunSans-Regular-BoldOblique] \stoptypescript \starttypescript [sans] [sunsans] [texnansi] \usetypescript[sans][fallback] \definefontsynonym[SunSans-Heavy][texnansi-SunSans-Heavy] [encoding=texnansi] \definefontsynonym[SunSans-Italic][texnansi-SunSans-Italic] [encoding=texnansi] \definefontsynonym[SunSans-Regular-Bold][texnansi-SunSans-Regular- Bold][encoding=texnansi] \definefontsynonym[SunSans-Regular-BoldOblique][texnansi-SunSans- Regular-BoldOblique][encoding=texnansi] \definefontsynonym[SunSans-Regular][texnansi-SunSans-Regular] [encoding=texnansi] \definefontsynonym[SunSans-RegularDemi][texnansi-SunSans-RegularDemi] [encoding=texnansi] \stoptypescript %serif \starttypescript [serif] [sunserif] [name] \definefontsynonym[Serif] [SunSerif-Regular] \definefontsynonym[SerifItalic] [SunSerif-Italic] \definefontsynonym[SerifBold] [SunSerif-Regular-Bold] \definefontsynonym[SerifBoldItalic] [SunSerif-Regular-Bold-Italic] \stoptypescript \starttypescript [serif] [sunserif] [texnansi] \usetypescript[serif][fallback] \definefontsynonym[SunSerif-Italic][texnansi-SunSerif-Italic] [encoding=texnansi] \definefontsynonym[SunSerif-Regular-Bold-Italic][texnansi-SunSerif- Regular-Bold-Italic][encoding=texnansi] \definefontsynonym[SunSerif-Regular-Bold][texnansi-SunSerif-Regular- Bold][encoding=texnansi] \definefontsynonym[SunSerif-Regular][texnansi-SunSerif-Regular] [encoding=texnansi] \stoptypescript %monospace \starttypescript [mono] [sunserif] [name] \usetypescript[mono][fallback] \definefontsynonym[Serif] [Mono] \stoptypescript The last bit (around the comment "monospace") is my apparently futile attempt to get the verbatim to use the default monospace font. I get the desired results with a kludge if I replace \definefontsynonym[Serif] [SunSerif-Regular] with \definefontsynonym[Serif] [Mono] but this affects "normally" typeset serif. Ideally, I would like to have in the SunSerif-Regular typeface for non-verbatim serif text. Lou
Hi Louis, The solution is to be found in defining a typeface which points to the serif, sansserif, math and teletype fonts to be used. Asn an example: \starttypescript [palatino] [texnansi,ec,qx,8r,t5,uc] \definetypeface [palatino] [rm] [serif] [palatino] [default] [encoding=\typescripttwo] \definetypeface [palatino] [tt] [mono] [modern] [default] [encoding=\typescripttwo,rscale=1.075] \definetypeface [palatino] [mm] [math] [palatino] [default] [encoding=default] % \usemathcollection[default] \quittypescriptscanning \stoptypescript this is taken from type-exa.tex Willi Louis Springer wrote:
I have a typescript I am using for a custom font, but the custom font has no monospace variant appropriate for verbatim text. I'm attempting to use Courier or some other monospace font for verbatim and maintain my custom font for normally typeset serf text.
My broken typescript is as follows:
\starttypescript [map][sunsans,sunserif][texnansi] \loadmapfile[texnansi-sun-sunsans.map] \loadmapfile[texnansi-sun-sunserif.map] \stoptypescript
% sans serif \starttypescript [sans] [sunsans] [name] \definefontsynonym[Sans] [SunSans-Regular] \definefontsynonym[SansItalic] [SunSans-Italic] \definefontsynonym[SansBold] [SunSans-RegularDemi] \definefontsynonym[SansBoldItalic] [SunSans-Regular-BoldOblique] \stoptypescript
\starttypescript [sans] [sunsans] [texnansi] \usetypescript[sans][fallback] \definefontsynonym[SunSans-Heavy][texnansi-SunSans-Heavy] [encoding=texnansi] \definefontsynonym[SunSans-Italic][texnansi-SunSans-Italic] [encoding=texnansi] \definefontsynonym[SunSans-Regular-Bold][texnansi-SunSans-Regular- Bold][encoding=texnansi] \definefontsynonym[SunSans-Regular-BoldOblique][texnansi-SunSans- Regular-BoldOblique][encoding=texnansi] \definefontsynonym[SunSans-Regular][texnansi-SunSans-Regular] [encoding=texnansi] \definefontsynonym[SunSans-RegularDemi][texnansi-SunSans-RegularDemi] [encoding=texnansi] \stoptypescript
%serif \starttypescript [serif] [sunserif] [name] \definefontsynonym[Serif] [SunSerif-Regular] \definefontsynonym[SerifItalic] [SunSerif-Italic] \definefontsynonym[SerifBold] [SunSerif-Regular-Bold] \definefontsynonym[SerifBoldItalic] [SunSerif-Regular-Bold-Italic] \stoptypescript
\starttypescript [serif] [sunserif] [texnansi] \usetypescript[serif][fallback] \definefontsynonym[SunSerif-Italic][texnansi-SunSerif-Italic] [encoding=texnansi] \definefontsynonym[SunSerif-Regular-Bold-Italic][texnansi-SunSerif- Regular-Bold-Italic][encoding=texnansi] \definefontsynonym[SunSerif-Regular-Bold][texnansi-SunSerif-Regular- Bold][encoding=texnansi] \definefontsynonym[SunSerif-Regular][texnansi-SunSerif-Regular] [encoding=texnansi] \stoptypescript
%monospace \starttypescript [mono] [sunserif] [name] \usetypescript[mono][fallback] \definefontsynonym[Serif] [Mono] \stoptypescript
The last bit (around the comment "monospace") is my apparently futile attempt to get the verbatim to use the default monospace font. I get the desired results with a kludge if I replace
\definefontsynonym[Serif] [SunSerif-Regular]
with
\definefontsynonym[Serif] [Mono]
but this affects "normally" typeset serif. Ideally, I would like to have in the SunSerif-Regular typeface for non-verbatim serif text.
Lou
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Louis Springer wrote:
I have a typescript I am using for a custom font, but the custom font has no monospace variant appropriate for verbatim text. I'm attempting to use Courier or some other monospace font for verbatim and maintain my custom font for normally typeset serf text.
My broken typescript is as follows:
\starttypescript [map][sunsans,sunserif][texnansi] \loadmapfile[texnansi-sun-sunsans.map] \loadmapfile[texnansi-sun-sunserif.map] \stoptypescript
% sans serif \starttypescript [sans] [sunsans] [name] \definefontsynonym[Sans] [SunSans-Regular] \definefontsynonym[SansItalic] [SunSans-Italic] \definefontsynonym[SansBold] [SunSans-RegularDemi] \definefontsynonym[SansBoldItalic] [SunSans-Regular-BoldOblique] \stoptypescript
\starttypescript [sans] [sunsans] [texnansi] \usetypescript[sans][fallback] \definefontsynonym[SunSans-Heavy][texnansi-SunSans-Heavy] [encoding=texnansi] \definefontsynonym[SunSans-Italic][texnansi-SunSans-Italic] [encoding=texnansi] \definefontsynonym[SunSans-Regular-Bold][texnansi-SunSans-Regular- Bold][encoding=texnansi] \definefontsynonym[SunSans-Regular-BoldOblique][texnansi-SunSans- Regular-BoldOblique][encoding=texnansi] \definefontsynonym[SunSans-Regular][texnansi-SunSans-Regular] [encoding=texnansi] \definefontsynonym[SunSans-RegularDemi][texnansi-SunSans-RegularDemi] [encoding=texnansi] \stoptypescript
%serif \starttypescript [serif] [sunserif] [name] \definefontsynonym[Serif] [SunSerif-Regular] \definefontsynonym[SerifItalic] [SunSerif-Italic] \definefontsynonym[SerifBold] [SunSerif-Regular-Bold] \definefontsynonym[SerifBoldItalic] [SunSerif-Regular-Bold-Italic] \stoptypescript
\starttypescript [serif] [sunserif] [texnansi] \usetypescript[serif][fallback] \definefontsynonym[SunSerif-Italic][texnansi-SunSerif-Italic] [encoding=texnansi] \definefontsynonym[SunSerif-Regular-Bold-Italic][texnansi-SunSerif- Regular-Bold-Italic][encoding=texnansi] \definefontsynonym[SunSerif-Regular-Bold][texnansi-SunSerif-Regular- Bold][encoding=texnansi] \definefontsynonym[SunSerif-Regular][texnansi-SunSerif-Regular] [encoding=texnansi] \stoptypescript
%monospace \starttypescript [mono] [sunserif] [name] \usetypescript[mono][fallback] \definefontsynonym[Serif] [Mono] \stoptypescript
hm, why this way? (It's Mono btw)
The last bit (around the comment "monospace") is my apparently futile attempt to get the verbatim to use the default monospace font. I get the desired results with a kludge if I replace
\definefontsynonym[Serif] [SunSerif-Regular]
with
\definefontsynonym[Serif] [Mono]
but this affects "normally" typeset serif. Ideally, I would like to have in the SunSerif-Regular typeface for non-verbatim serif text.
\definetypeface[somesun][rm][serif][sunserif][default] \definetypeface[somesun][ss][sans][sunsans][default] \definetypeface[somesun][tt][mono][modern][default][rscale=.9] \definetypeface[somesun][mm][math][modern][default][rscale=.9] so, you don't need to define some fake sun mono Hans
participants (3)
-
Hans Hagen
-
Louis Springer
-
Willi Egger