font-switching oddities
Hi all, I'm having some trouble with bodyfont switching. It involves two fonts that I adapted myself, so it's difficult to make a minimal example. Both fonts are defined in typescripts (these are just examples, it works the same for every typescript I tried). First one is Adobe Caslon: \usetypescriptfile[type-buy] \starttypescript [serif] [caslon] [texnansi] \definefontsynonym [Caslon-Roman] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-Regularnoct] [encoding=texnansi] \definefontsynonym [Caslon-Bold] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-Boldnoct] [encoding=texnansi] \definefontsynonym [Caslon-Italic] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-Italicnoct] [encoding=texnansi] \definefontsynonym [Caslon-Bold-Italic] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-BoldItalicnoct] [encoding=texnansi] \definefontsynonym [Caslon-Roman-SmallCaps][texnansi-KERN-SMCP- LNUM-ACaslonPro-Regular] [encoding=texnansi] \definefontsynonym [Caslon-Roman-OSF] [texnansi-KERN-SMCP- LNUM-ACaslonPro-Regular] [encoding=texnansi] \stoptypescript \starttypescript [serif] [caslon] [name] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Caslon-Roman] \definefontsynonym [SerifItalic] [Caslon-Italic] \definefontsynonym [SerifBold] [Caslon-Bold] \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic] \definefontsynonym [SerifCaps] [Caslon-Roman-SmallCaps] \definefontsynonym [OldStyle] [Caslon-Roman-OSF] \stoptypescript \starttypescript [Caslon] \definetypeface [MyCaslon] [rm] [serif] [caslon] [default] [encoding=texnansi] \stoptypescript Second one is one of my Greek fonts (doesn't matter which one): \starttypescript [serif] [greekgentium] [agr] \definefontsynonym [Greekgentium-Roman] [genagr-GentiumAlt] [encoding=agr] \definefontsynonym [Greekgentium-Italic][genagr-GentiumAItI] [encoding=agr] \stoptypescript \starttypescript [serif] [greekgentium] [name] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Greekgentium-Roman] \definefontsynonym [SerifItalic] [Greekgentium-Italic] \definefontsynonym [SerifBold] [Serif] \definefontsynonym [SerifBoldItalic] [Serif] \stoptypescript \starttypescript[GreekGentium] \definetypeface [MyGreekGentium] [rm] [serif] [greekgentium] [default] [rscale=\getvariable{Greek}{scale},encoding=agr] \stoptypescript The fonts are used thus: \setupbodyfont[MyCaslon,12pt] \switchtobodyfont[MyGreekGentium] Switching works when I set the bodyfont size to 9,10,11,12pt, but not if it is set to any other value. In that case, I get these messages in the log file Missing character: There is no a in font nullfont! Missing character: There is no > in font nullfont! Missing character: There is no u in font nullfont! Missing character: There is no t in font nullfont! Missing character: There is no o in font nullfont! etc. I must be missing something obvious about typefiles, but can't see what? Any help will be appreciated. All best Thomas
OK, I solved my immediate problem by adding this in my typescript: \definebodyfont [30pt,25pt,20pt,18pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt, 4pt] [rm] [default] but is there any simpler means of doing this, is there a keyword like "all" to define bodyfonts for every imaginable size? Thanks Thomas On Oct 25, 2005, at 3:50 PM, Thomas A. Schmitz wrote:
Hi all,
I'm having some trouble with bodyfont switching. It involves two fonts that I adapted myself, so it's difficult to make a minimal example. Both fonts are defined in typescripts (these are just examples, it works the same for every typescript I tried).
First one is Adobe Caslon:
\usetypescriptfile[type-buy]
\starttypescript [serif] [caslon] [texnansi] \definefontsynonym [Caslon-Roman] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-Regularnoct] [encoding=texnansi] \definefontsynonym [Caslon-Bold] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-Boldnoct] [encoding=texnansi] \definefontsynonym [Caslon-Italic] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-Italicnoct] [encoding=texnansi] \definefontsynonym [Caslon-Bold-Italic] [texnansi-KERN-LIGA- DLIG-ONUM-ACaslonPro-BoldItalicnoct] [encoding=texnansi] \definefontsynonym [Caslon-Roman-SmallCaps][texnansi-KERN-SMCP- LNUM-ACaslonPro-Regular] [encoding=texnansi] \definefontsynonym [Caslon-Roman-OSF] [texnansi-KERN-SMCP- LNUM-ACaslonPro-Regular] [encoding=texnansi] \stoptypescript
\starttypescript [serif] [caslon] [name] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Caslon-Roman] \definefontsynonym [SerifItalic] [Caslon-Italic] \definefontsynonym [SerifBold] [Caslon-Bold] \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic] \definefontsynonym [SerifCaps] [Caslon-Roman-SmallCaps] \definefontsynonym [OldStyle] [Caslon-Roman-OSF] \stoptypescript
\starttypescript [Caslon] \definetypeface [MyCaslon] [rm] [serif] [caslon] [default] [encoding=texnansi] \stoptypescript
Second one is one of my Greek fonts (doesn't matter which one):
\starttypescript [serif] [greekgentium] [agr] \definefontsynonym [Greekgentium-Roman] [genagr-GentiumAlt] [encoding=agr] \definefontsynonym [Greekgentium-Italic][genagr-GentiumAItI] [encoding=agr] \stoptypescript
\starttypescript [serif] [greekgentium] [name] \usetypescript[serif][fallback] \definefontsynonym [Serif] [Greekgentium-Roman] \definefontsynonym [SerifItalic] [Greekgentium-Italic] \definefontsynonym [SerifBold] [Serif] \definefontsynonym [SerifBoldItalic] [Serif] \stoptypescript \starttypescript[GreekGentium] \definetypeface [MyGreekGentium] [rm] [serif] [greekgentium] [default] [rscale=\getvariable{Greek}{scale},encoding=agr] \stoptypescript
The fonts are used thus:
\setupbodyfont[MyCaslon,12pt]
\switchtobodyfont[MyGreekGentium]
Switching works when I set the bodyfont size to 9,10,11,12pt, but not if it is set to any other value. In that case, I get these messages in the log file
Missing character: There is no a in font nullfont! Missing character: There is no > in font nullfont! Missing character: There is no u in font nullfont! Missing character: There is no t in font nullfont! Missing character: There is no o in font nullfont! etc.
I must be missing something obvious about typefiles, but can't see what? Any help will be appreciated.
All best
Thomas
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Thomas A. Schmitz wrote:
Switching works when I set the bodyfont size to 9,10,11,12pt, but not if it is set to any other value. In that case, I get these messages in the log file
Missing character: There is no a in font nullfont! Missing character: There is no > in font nullfont! Missing character: There is no u in font nullfont! Missing character: There is no t in font nullfont! Missing character: There is no o in font nullfont! etc.
This spells "a>uto", perhaps that is a clue? Taco
Thomas A. Schmitz wrote:
Switching works when I set the bodyfont size to 9,10,11,12pt, but not if it is set to any other value. In that case, I get these messages in the log file
Missing character: There is no a in font nullfont! Missing character: There is no > in font nullfont! Missing character: There is no u in font nullfont! Missing character: There is no t in font nullfont! Missing character: There is no o in font nullfont! etc.
This spells "a>uto", perhaps that is a clue?
Taco That's the beginning of the Greek word autos "himself"... No, it does
On Wed, 2005-10-26 at 08:23 +0200, Taco Hoekwater wrote: the same for every letter after the fontswitch, that makes for a pretty long logfile, and I just included the first few lines. Cheers Thomas
Thomas A. Schmitz wrote:
Hi all,
I'm having some trouble with bodyfont switching. It involves two fonts that I adapted myself, so it's difficult to make a minimal example. Both fonts are defined in typescripts (these are just examples, it works the same for every typescript I tried).
was this solved?
\starttypescript [Caslon] \definetypeface [MyCaslon] [rm] [serif] [caslon] [default] [encoding=texnansi]
\definetypeface [MyCaslon] [mm] [math] [modern] [default]
\stoptypescript
\starttypescript[GreekGentium] \definetypeface [MyGreekGentium] [rm] [serif] [greekgentium] [default] [rscale=\getvariable{Greek}{scale},encoding=agr]
\definetypeface [MyCaslon] [mm] [math] [modern] [default]
\stoptypescript
Hans
This was partially solved. If I add the bodyfontsize explicitly \definebodyfont [30pt,25pt,20pt,18pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt, 4pt] [rm] [default] I don't get these errors, and the files compile fine. But since its for my module, I still have a problem: what if the customer sets bizarre sizes like 10.25pt? So my question was: is it possible to have a blanket definition like [all] vel. sim. to be covered for all cases? And thanks for the hint to add math; will do that for every typescript. Best Thomas On Nov 9, 2005, at 11:53 AM, Hans Hagen wrote:
Thomas A. Schmitz wrote:
Hi all,
I'm having some trouble with bodyfont switching. It involves two fonts that I adapted myself, so it's difficult to make a minimal example. Both fonts are defined in typescripts (these are just examples, it works the same for every typescript I tried).
was this solved?
\starttypescript [Caslon] \definetypeface [MyCaslon] [rm] [serif] [caslon] [default] [encoding=texnansi]
\definetypeface [MyCaslon] [mm] [math] [modern] [default]
\stoptypescript
\starttypescript[GreekGentium] \definetypeface [MyGreekGentium] [rm] [serif] [greekgentium] [default] [rscale=\getvariable{Greek}{scale},encoding=agr]
\definetypeface [MyCaslon] [mm] [math] [modern] [default]
\stoptypescript
Hans _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (3)
-
Hans Hagen
-
Taco Hoekwater
-
Thomas A. Schmitz