Font selection problem in MKIV
Try
\switchtotypeface[LeagueScript][12pt] \switchtobodyfont[LeageScript]
Is \switchtobodyfont the recommended way of changing the typeface temporarily anywhere in a document (for example when making cover page graphics)? Its name implies only document body. Nevertheless, \switchtobodyfont works (at least in the document body, haven't tested yet elsewhere) without setting \setupbodyfont.
\definetypeface[LeagueScript][ss][specsans][League Script Thin] \definetypeface[Pompadour][ss][specsans][Pompadour]
This seems to work for most fonts, with others like Pompadour it fails (pompadour has SubFamily string of "Black" [Mac] and "Regular" [Windows] in the .otf), and spec fails to find pompadour-normal-normal which it is looking for). Pompadour is a serif font, so i tried also with arguments [rm][specserif]. I have looked into co-typography.pdf for help, and while it is very extensive in some parts, in others it is (too) technical and lacks expanations for some parameters. As soon as I get these issues sorted out I'll try if I can make the MKIV font pages in the Wiki a bit more beginner friendly. Best regads, Otso Helenius
Am 21.05.2011 um 17:31 schrieb Otso Helenius:
Try
\switchtotypeface[LeagueScript][12pt] \switchtobodyfont[LeageScript]
Is \switchtobodyfont the recommended way of changing the typeface temporarily anywhere in a document (for example when making cover page graphics)? Its name implies only document body.
Nevertheless, \switchtobodyfont works (at least in the document body, haven't tested yet elsewhere) without setting \setupbodyfont.
\switchtotypeface wasn’t working for you because the second argument expects a font alternative (e.g. rm, ss etc.) and not the size. You can also switch to a certain typeface when you use the command, in your case \LeagueScript but have to ensure that the typeface is loaded, otherwise you’ll get an error message. The preferred method to select a typescript are \setupbodyfont and \switchtobodyfont, the differences between both is that \switchtobodyfont use the chosen font only for the document text while \setupbodyfont affects also the header and footer of your document.
\definetypeface[LeagueScript][ss][specsans][League Script Thin] \definetypeface[Pompadour][ss][specsans][Pompadour]
This seems to work for most fonts, with others like Pompadour it fails (pompadour has SubFamily string of "Black" [Mac] and "Regular" [Windows] in the .otf), and spec fails to find pompadour-normal-normal which it is looking for). Pompadour is a serif font, so i tried also with arguments [rm][specserif].
A real problem with all TeX systems, fonts have too many names and it’s hard to know which one you need to load it.
I have looked into co-typography.pdf for help, and while it is very extensive in some parts, in others it is (too) technical and lacks expanations for some parameters.
Indeed, Hans explains in his manuals sometimes too much which can confuse a beginner because these information aren’t necessary to use a certain mechanism, e.g. to load a font. Wolfgang
On Sat, May 21, 2011 at 07:31:24PM +0200, Wolfgang Schuster wrote: Thank You for clarification on the subject. Though, I still have a few problems for which I haven't found an answer for. \setuppapersize[A4][A4] \starttypescript[Sans][LeagueScript] \definefontsynonym[Sans][name:leaguescriptthin] \stoptypescript \starttypescript[Sans][Pompadour] \definefontsynonym[Sans][name:pompadourblack] \stoptypescript \definetypeface[LeagueScript][ss][Sans][LeagueScript] \definetypeface[Pompadour][ss][Sans][Pompadour] \setupbodyfont[LeagueScript,14pt] \starttext \LeagueScript 01234567890 \Pompadour 01234567890 \stoptext This source works as expected, but if I: a) comment out the \setupbodyfont command or switch [LeagueScript, 14pt) into [modern, 14pt] (or anything else than LeagueScript or Pompadour), all fonts will show up as Latin Modern. This seems very odd. b) specify a font size less than 13pt in \setupbodyfont, all fonts will (again) show up as Latin Modern. It seems that nowhere in the document I'm able to use these "external" fonts in small sizes. There is no problem with sizes >= 14pt. This seems to happen with all ttf/otf fonts I try to use. Could it be possible that these two issues are caused by a bug in MKIV?
Indeed, Hans explains in his manuals sometimes too much which can confuse a beginner because these information aren’t necessary to use a certain mechanism, e.g. to load a font.
Actually, the biggest problem is that many font related pages on the Wiki are for MKII and many lack information on whether the syntax is for MKII or MKIV. The font docs on Pragma homepages are for MKII only. Syntax for the \switchtotypeface would be nice. showfont.pdf from Pragma homepage shows \switchtotypeface[name][size,type] as one possible calling syntax but a clear explanation of all the parameters is missing. I would like to add this to the Wiki along other tutorials for MKIV font usage, so as much information on the subject as possible is appreciated. Thanks again, Otso Helenius
Am 21.05.2011 um 20:21 schrieb Otso Helenius:
Syntax for the \switchtotypeface would be nice. showfont.pdf from Pragma homepage shows \switchtotypeface[name][size,type] as one possible calling syntax but a clear explanation of all the parameters is missing. I would like to add this to the Wiki along other tutorials for MKIV font usage, so as much information on the subject as possible is appreciated.
You’re right, \switchtotypeface accepts all parameters from \switchtobodyfont as second argument because the commands pass it’s arguments to \switchtobodyfont. Wolfgang
Sorry, I was in error while referring to the font sizes. The actual "limit" below which typescripted fonts stop working is 12pt and it is not tied to the \setupbodyfont setting. Any font output with 12pt or less will be formatted as Latin Modern. i.e. \switchtotypeface[Pompadour][ss,12pt] 01234567890 shows as Latin Modern whereas \switchtotypeface[Pompadour][ss,12.1pt] 01234567890 shows as Pompadour. 12pt is the default document font size so I can only guess there is some kind of a conflict. I'm using ConTeXt ver: 2011.05.18 22:26 MKIV Best, Otso Helenius
Am 21.05.2011 um 22:03 schrieb Otso Helenius:
Sorry, I was in error while referring to the font sizes. The actual "limit" below which typescripted fonts stop working is 12pt and it is not tied to the \setupbodyfont setting. Any font output with 12pt or less will be formatted as Latin Modern. i.e.
\switchtotypeface[Pompadour][ss,12pt] 01234567890
shows as Latin Modern whereas
\switchtotypeface[Pompadour][ss,12.1pt] 01234567890
shows as Pompadour. 12pt is the default document font size so I can only guess there is some kind of a conflict. I'm using ConTeXt ver: 2011.05.18 22:26 MKIV
Why do you insist on \switchtotypeface when \switchtobodyfont works? Here is a example which works on my machine (requires commercial fonts: \starttext \input ward\par \switchtobodyfont[calluna,8pt] \input ward\par \switchtobodyfont[cambria,10pt] \input ward\par \stoptext Wolfgang
participants (2)
-
Otso Helenius
-
Wolfgang Schuster