ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* definefontfamily use
@ 2019-01-22 17:42 Alan Braslau
  2019-01-22 18:39 ` Hans Hagen
  2019-01-23 17:05 ` definefontfamily use Wolfgang Schuster
  0 siblings, 2 replies; 10+ messages in thread
From: Alan Braslau @ 2019-01-22 17:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefontfamily use
  2019-01-22 17:42 definefontfamily use Alan Braslau
@ 2019-01-22 18:39 ` Hans Hagen
  2019-01-22 18:57   ` Alan Braslau
  2019-01-23 17:05 ` definefontfamily use Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2019-01-22 18:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefontfamily use
  2019-01-22 18:39 ` Hans Hagen
@ 2019-01-22 18:57   ` Alan Braslau
  2019-01-23 16:32     ` definefont (was: definefontfamily use) Henning Hraban Ramm
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Braslau @ 2019-01-22 18:57 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Tue, 22 Jan 2019 19:39:05 +0100
Hans Hagen <j.hagen@xs4all.nl> 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?

Alan
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefont (was: definefontfamily use)
  2019-01-22 18:57   ` Alan Braslau
@ 2019-01-23 16:32     ` Henning Hraban Ramm
  2019-01-23 16:37       ` definefont Wolfgang Schuster
  2019-01-23 16:49       ` definefont (was: definefontfamily use) Alan Braslau
  0 siblings, 2 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2019-01-23 16:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <braslau.list@comcast.net>:

> On Tue, 22 Jan 2019 19:39:05 +0100
> Hans Hagen <j.hagen@xs4all.nl> 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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefont
  2019-01-23 16:32     ` definefont (was: definefontfamily use) Henning Hraban Ramm
@ 2019-01-23 16:37       ` Wolfgang Schuster
  2019-01-23 16:49       ` definefont (was: definefontfamily use) Alan Braslau
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2019-01-23 16:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefont (was: definefontfamily use)
  2019-01-23 16:32     ` definefont (was: definefontfamily use) Henning Hraban Ramm
  2019-01-23 16:37       ` definefont Wolfgang Schuster
@ 2019-01-23 16:49       ` Alan Braslau
  2019-01-23 17:03         ` definefont Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: Alan Braslau @ 2019-01-23 16:49 UTC (permalink / raw)
  To: Henning Hraban Ramm; +Cc: mailing list for ConTeXt users

On Wed, 23 Jan 2019 17:32:41 +0100
Henning Hraban Ramm <texml@fiee.net> 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).

> 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 
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefont
  2019-01-23 16:49       ` definefont (was: definefontfamily use) Alan Braslau
@ 2019-01-23 17:03         ` Wolfgang Schuster
  2019-01-23 17:17           ` definefont Alan Braslau
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2019-01-23 17:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

Alan Braslau schrieb am 23.01.19 um 17:49:
> On Wed, 23 Jan 2019 17:32:41 +0100
> Henning Hraban Ramm <texml@fiee.net> 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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefontfamily use
  2019-01-22 17:42 definefontfamily use Alan Braslau
  2019-01-22 18:39 ` Hans Hagen
@ 2019-01-23 17:05 ` Wolfgang Schuster
  2019-01-23 17:22   ` Alan Braslau
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2019-01-23 17:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefont
  2019-01-23 17:03         ` definefont Wolfgang Schuster
@ 2019-01-23 17:17           ` Alan Braslau
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Braslau @ 2019-01-23 17:17 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On Wed, 23 Jan 2019 18:03:51 +0100
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> > 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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: definefontfamily use
  2019-01-23 17:05 ` definefontfamily use Wolfgang Schuster
@ 2019-01-23 17:22   ` Alan Braslau
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Braslau @ 2019-01-23 17:22 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On Wed, 23 Jan 2019 18:05:59 +0100
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> 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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-23 17:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 17:42 definefontfamily use Alan Braslau
2019-01-22 18:39 ` Hans Hagen
2019-01-22 18:57   ` Alan Braslau
2019-01-23 16:32     ` definefont (was: definefontfamily use) Henning Hraban Ramm
2019-01-23 16:37       ` definefont Wolfgang Schuster
2019-01-23 16:49       ` definefont (was: definefontfamily use) Alan Braslau
2019-01-23 17:03         ` definefont Wolfgang Schuster
2019-01-23 17:17           ` definefont Alan Braslau
2019-01-23 17:05 ` definefontfamily use Wolfgang Schuster
2019-01-23 17:22   ` Alan Braslau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).