Hello, Previously, in order to make punctual use of a true-type font in a title for example, I did the following: \definefontfamily [myfont] [serif] [myfont] where myfont.ttf is located in the current project directory, and selecting the font was simply {\switchtobodyfont[myfont]My Font!} Using the present context, this yields the error selectfont > The requested font 'myfont' has no files for the 'tf' alternative, Latin Modern is used instead. What has changed and what should be the proper use? (I have tried setting explicitly [tf=file:myfont.ttf], which was only a guess.) Alan
On 1/22/2019 6:42 PM, Alan Braslau wrote:
Hello,
Previously, in order to make punctual use of a true-type font in a title for example, I did the following:
\definefontfamily [myfont] [serif] [myfont]
where myfont.ttf is located in the current project directory, and selecting the font was simply
{\switchtobodyfont[myfont]My Font!}
Using the present context, this yields the error
selectfont > The requested font 'myfont' has no files for the 'tf' alternative, Latin Modern is used instead.
What has changed and what should be the proper use? (I have tried setting explicitly [tf=file:myfont.ttf], which was only a guess.) one can do
\definefont[MyTitleFont][file:myfont.ttf*default sa 3] \setuphead[chapter][style=\MyTitlefont] Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, 22 Jan 2019 19:39:05 +0100
Hans Hagen
one can do
\definefont[MyTitleFont][file:myfont.ttf*default sa 3]
\setuphead[chapter][style=\MyTitlefont]
Thank you \definefont[MyFont][file:myfont.ttf] \scale[width=.5\textwidth]{\MyFont My Font!} can be used for example in a header or footer element, and this is minimal and simple. What are the roles of "*default" and "sa 3" as these appear to be unnecessary? Alan
And how can I \definefont so that \em or \emph works the same as in bodyfont?
Or, the other way round, how must I \definehighlight[emph][style=italic] so that it works in all sizes?
-----
\setupbodyfont[rm,12pt]
\definefont[TitleFont][SansBold*default sa 3]
\setuphead[chapter][style=\TitleFont,page=no]
\definehighlight[emph][style=italic]
\starttext
\chapter{My \emph{special} chapter} % no font change
\input tufte
\emph{\input knuth.tex }
\chapter{My {\em oldfashioned} chapter} % slanted body font
\input tufte
{\em\input knuth.tex }
\stoptext
-----
Am 2019-01-22 um 19:57 schrieb Alan Braslau
On Tue, 22 Jan 2019 19:39:05 +0100 Hans Hagen
wrote: one can do
\definefont[MyTitleFont][file:myfont.ttf*default sa 3]
\setuphead[chapter][style=\MyTitlefont]
Thank you
\definefont[MyFont][file:myfont.ttf]
\scale[width=.5\textwidth]{\MyFont My Font!}
can be used for example in a header or footer element, and this is minimal and simple. What are the roles of "*default" and "sa 3" as these appear to be unnecessary?
*default activates the default set of OpenType features. sa 3 is the font size factor. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
Henning Hraban Ramm schrieb am 23.01.19 um 17:32:
And how can I \definefont so that \em or \emph works the same as in bodyfont?
You can’t.
Or, the other way round, how must I \definehighlight[emph][style=italic] so that it works in all sizes?
----- \setupbodyfont[rm,12pt]
\definefont[TitleFont][SansBold*default sa 3]
\setuphead[chapter][style=\TitleFont,page=no]
\setuphead [chapter] [style={\switchtobodyfont[ss,36pt]}] Wolfgang
On Wed, 23 Jan 2019 17:32:41 +0100
Henning Hraban Ramm
What are the roles of "*default" and "sa 3" as these appear to be unnecessary?
*default activates the default set of OpenType features.
Are not the default set of OpenType features activated by default? (as the name might suggest...). Perhaps *no* features are selected, by default... (a misnomer, therefore).
sa 3 is the font size factor.
Of course, but how is it used? In my example, I scale the text to a specific width, so I really don't care what font size is selected and would assume that the design optimal or "natural" size would be selected, by default. Alan
Alan Braslau schrieb am 23.01.19 um 17:49:
On Wed, 23 Jan 2019 17:32:41 +0100 Henning Hraban Ramm
wrote: What are the roles of "*default" and "sa 3" as these appear to be unnecessary? *default activates the default set of OpenType features. Are not the default set of OpenType features activated by default? (as the name might suggest...). Perhaps *no* features are selected, by default... (a misnomer, therefore).
default is just one of many predefined feature sets: \definefontfeature [default] [always] [liga=yes, tlig=yes, trep=yes]
sa 3 is the font size factor. Of course, but how is it used? In my example, I scale the text to a specific width, so I really don't care what font size is selected and would assume that the design optimal or "natural" size would be selected, by default. In your case it isn’t needed but when you have a heading which should always be twice the size of the bodyfont you can add "sa 2" to do this.
Wolfgang
On Wed, 23 Jan 2019 18:03:51 +0100
Wolfgang Schuster
Are not the default set of OpenType features activated by default? (as the name might suggest...). Perhaps *no* features are selected, by default... (a misnomer, therefore).
default is just one of many predefined feature sets:
\definefontfeature [default] [always] [liga=yes, tlig=yes, trep=yes]
Sure, and I guess that it is not activated by default by \definefont. In this case, "standard" might be a better name (but I know that it is not going to change). Alan
Alan Braslau schrieb am 22.01.19 um 18:42:
Hello,
Previously, in order to make punctual use of a true-type font in a title for example, I did the following:
\definefontfamily [myfont] [serif] [myfont]
where myfont.ttf is located in the current project directory, and selecting the font was simply
{\switchtobodyfont[myfont]My Font!} Maybe you loaded the used the font before with \definefont which put a entry in the database but normally \definefontfamily doesn’t use fonts from a local directory.
Wolfgang
On Wed, 23 Jan 2019 18:05:59 +0100
Wolfgang Schuster
Maybe you loaded the used the font before with \definefont which put a entry in the database but normally \definefontfamily doesn’t use fonts from a local directory.
No, never used \definefont; the behavior of \definefontfamily must have changed. (I used this font *only* in one very specific case -in a logo- in one project - September-December 2015). Alan
participants (4)
-
Alan Braslau
-
Hans Hagen
-
Henning Hraban Ramm
-
Wolfgang Schuster