Dear list, I have the following sample: \definefontfamily [mainface] [rm] [Pagella] [tf={file:texgyrepagella-regular.otf}, bf={file:texgyrepagella-regular-500.otf}, it={file:texgyrepagella-regular-2000.otf}] \setupbodyfont[mainface] \starttext normal\\ \bf bold\\ \it italics \stoptext Sorry, but I don’t get the fonts for \bf and \it loaded. What am I doing wrong? Many thanks for your help, Pablo -- http://www.ousia.tk
Are the bold and italic fonts listed when you run the fonts script? mtxrun --script fonts --list --all texgyrepagella* Wolfgang Pablo Rodriguez schrieb am 22.10.18 um 21:18:
Dear list,
I have the following sample:
\definefontfamily [mainface] [rm] [Pagella] [tf={file:texgyrepagella-regular.otf}, bf={file:texgyrepagella-regular-500.otf}, it={file:texgyrepagella-regular-2000.otf}]
\setupbodyfont[mainface] \starttext normal\\ \bf bold\\ \it italics \stoptext
Sorry, but I don’t get the fonts for \bf and \it loaded.
What am I doing wrong?
Many thanks for your help,
Pablo
On 10/22/18 9:35 PM, Wolfgang Schuster wrote:
Are the bold and italic fonts listed when you run the fonts script?
mtxrun --script fonts --list --all texgyrepagella*
Yes, they are listed. And I even get the fonts loaded when the font family is different: \definefontfamily [mainface] [rm] [Pagella] [tf={file:texgyrepagella-bolditalic.otf}, bf={file:texgyrepagella-italic.otf}, it={file:texgyrepagella-regular.otf}] I may use them with \definefont[TestMM][file:texgyrepagella-regular-2000.otf at 10pt] But not with \definefontfamily. Pablo
Pablo Rodriguez schrieb am 22.10.18 um 21:18:
Dear list,
I have the following sample:
\definefontfamily [mainface] [rm] [Pagella] [tf={file:texgyrepagella-regular.otf}, bf={file:texgyrepagella-regular-500.otf}, it={file:texgyrepagella-regular-2000.otf}]
\setupbodyfont[mainface] \starttext normal\\ \bf bold\\ \it italics \stoptext
Sorry, but I don’t get the fonts for \bf and \it loaded.
What am I doing wrong?
Many thanks for your help,
Pablo
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Mon, Oct 22, 2018 at 10:03:09PM +0200, Pablo Rodriguez wrote:
On 10/22/18 9:35 PM, Wolfgang Schuster wrote:
Are the bold and italic fonts listed when you run the fonts script?
mtxrun --script fonts --list --all texgyrepagella*
Yes, they are listed.
That’s not what I observe: the real bold and italic fonts are listed, but not the ones that are defined as bold and italic by \definefontfamily, i. e. texgyrepagella-regular-500.otf and texgyrepagella-regular-2000.otf. However, these two files are available to ConTeXt:
I may use them with
\definefont[TestMM][file:texgyrepagella-regular-2000.otf at 10pt]
But not with \definefontfamily.
I can reproduce this. That means ConTeXt won’t let you use a regular-weight font face as the bold version of a font family, nor an upright font as an italic one, which in my opinion is rather a good thing. Best, Arthur
On 10/23/2018 05:17, Arthur Reutenauer wrote:
... I can reproduce this. That means ConTeXt won’t let you use a regular-weight font face as the bold version of a font family, nor an upright font as an italic one, which in my opinion is rather a good thing.
That is simply wrong. Not only will ConTeXt happily let you do that, it is sometimes a good thing to do. In a font with many weights, you have to select appropriate faces for the medium or printing method, and using a light face for the normal and a regular weight (whatever that means for the font) for bold emphasis. Or you may want change the way emphasis is used to make a point, and reverse bold and italic in one swell foop. The example on the wiki page for \definefontfamily shows some of this in action, but ConTeXt does not get in the way of doing even sillier things: \definefontfamily [reutenauer] [rm] [sourcecodepro] [tf=style:bolditalic, it=file:kabelblack.ttf, bf=style:normal, bi=file:comic.ttf] \setupbodyfont [reutenauer] \starttext tf: {\tf \fontname\font\ \samplefile{ward}}\par it: {\it \fontname\font\ \samplefile{ward}}\par bf: {\bf \fontname\font\ \samplefile{ward}}\par bi: {\bi \fontname\font\ \samplefile{ward}}\par \stoptext -- Rik
On Tue, Oct 23, 2018 at 10:30:36AM -0400, Rik wrote:
On 10/23/2018 05:17, Arthur Reutenauer wrote:
I can reproduce this. That means ConTeXt won’t let you use a regular-weight font face as the bold version of a font family, nor an upright font as an italic one, which in my opinion is rather a good thing.
That is simply wrong.
I know. I realised that Pablo was trying to say exactly that. ConTeXt does not prevent users from shooting themselves in the foot. But why do it? Arthur
On Mon, Oct 22, 2018 at 10:03 PM Pablo Rodriguez
On 10/22/18 9:35 PM, Wolfgang Schuster wrote:
Are the bold and italic fonts listed when you run the fonts script?
mtxrun --script fonts --list --all texgyrepagella*
Yes, they are listed.
And I even get the fonts loaded when the font family is different:
\definefontfamily [mainface] [rm] [Pagella] [tf={file:texgyrepagella-bolditalic.otf}, bf={file:texgyrepagella-italic.otf}, it={file:texgyrepagella-regular.otf}]
Are you sure about the syntax of definefotnfamily ? You can check conflicts with $> mtxrun --script fonts --info --list --all pagella
PS Experimenting is sometime the only way to learn, but it's clear that it's mandatory to use a sandbox. Modifying only some names can be ok with \definefont but it's very likely that all these texgyrepagella-regular-*.otf manually patched are in conflict -- they go into the cache, so it can happen that silently context use texgyrepagella-regular-500.otf instead of texgyrepagella-regular.otf . At least mtxrun --script pdf --fonts <pdffile> should show you the right names. -- luigi
On Tue, Oct 23, 2018 at 11:54:44AM +0200, luigi scarso wrote:
At least mtxrun --script pdf --fonts <pdffile> should show you the right names.
Actually, even that can miss: I’ve just made a file with two different fonts that each identify themselves as TeXGyrePagella-Regular, one of which is the modified font with 2000 UPM, and that can be seen inside the font stream (the FontFile3 entry in the font descriptor). The name TeXGyrePagella-Regular2000 appears there and only there. Not surprising that it would be inconsistent, of course. Best, Arthur
On Tue, Oct 23, 2018 at 11:54 AM luigi scarso
On Mon, Oct 22, 2018 at 10:03 PM Pablo Rodriguez
wrote: On 10/22/18 9:35 PM, Wolfgang Schuster wrote:
Are the bold and italic fonts listed when you run the fonts script?
mtxrun --script fonts --list --all texgyrepagella*
Yes, they are listed.
And I even get the fonts loaded when the font family is different:
\definefontfamily [mainface] [rm] [Pagella] [tf={file:texgyrepagella-bolditalic.otf}, bf={file:texgyrepagella-italic.otf}, it={file:texgyrepagella-regular.otf}]
Are you sure about the syntax of definefotnfamily ?
uh, *my* \definefotnfamily is wrong... -- luigi
participants (5)
-
Arthur Reutenauer
-
luigi scarso
-
Pablo Rodriguez
-
Rik
-
Wolfgang Schuster