ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Referencing fonts by path within ConTeXt
@ 2021-08-07 20:29 Joey McCollum via ntg-context
  2021-08-07 20:45 ` Henning Hraban Ramm via ntg-context
  2021-08-07 20:57 ` Wolfgang Schuster via ntg-context
  0 siblings, 2 replies; 3+ messages in thread
From: Joey McCollum via ntg-context @ 2021-08-07 20:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Joey McCollum


[-- Attachment #1.1: Type: text/plain, Size: 893 bytes --]

Hi,

I'm interested in packaging a ConTeXt project in a self-contained way, so
that the environment/component/project .tex files, the bibliography .bib
file(s), and fonts used for typesetting are all provided in one place. (The
goal is that others can generate the PDFs themselves from the source files
as long as they have a sufficiently recent version of ConTeXt installed.)
The usual ConTeXt directory structure makes sense for most of this, but it
doesn't address the possibility of accessing fonts locally. I think I could
do this with a script that temporarily sets the OSFONTDIR variable to the
local fonts directory and then invokes ConTeXt to typeset the project-level
file, but I was wondering if there is an easier way to do this from within
ConTeXt. Specifically, is there a way to specify a font via a local path
with font setup commands in an environment file?

Thank you!

Joey

[-- Attachment #1.2: Type: text/html, Size: 996 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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] 3+ messages in thread

* Re: Referencing fonts by path within ConTeXt
  2021-08-07 20:29 Referencing fonts by path within ConTeXt Joey McCollum via ntg-context
@ 2021-08-07 20:45 ` Henning Hraban Ramm via ntg-context
  2021-08-07 20:57 ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-07 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm



> Am 07.08.2021 um 22:29 schrieb Joey McCollum via ntg-context <ntg-context@ntg.nl>:
> 
> Hi,
> 
> I'm interested in packaging a ConTeXt project in a self-contained way, so that the environment/component/project .tex files, the bibliography .bib file(s), and fonts used for typesetting are all provided in one place. (The goal is that others can generate the PDFs themselves from the source files as long as they have a sufficiently recent version of ConTeXt installed.) The usual ConTeXt directory structure makes sense for most of this, but it doesn't address the possibility of accessing fonts locally. I think I could do this with a script that temporarily sets the OSFONTDIR variable to the local fonts directory and then invokes ConTeXt to typeset the project-level file, but I was wondering if there is an easier way to do this from within ConTeXt. Specifically, is there a way to specify a font via a local path with font setup commands in an environment file?

You can just specify your fonts in the typescript as [file:relative_path/fontname.otf].

OSFONTDIR isn’t as reliable as you need "mtxrun --script fonts --reload" after changing it (and sometimes "mtxrun --generate" before).

Hraban
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Referencing fonts by path within ConTeXt
  2021-08-07 20:29 Referencing fonts by path within ConTeXt Joey McCollum via ntg-context
  2021-08-07 20:45 ` Henning Hraban Ramm via ntg-context
@ 2021-08-07 20:57 ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-08-07 20:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster

Joey McCollum via ntg-context schrieb am 07.08.2021 um 22:29:
> Hi,
>
> I'm interested in packaging a ConTeXt project in a self-contained way, 
> so that the environment/component/project .tex files, the bibliography 
> .bib file(s), and fonts used for typesetting are all provided in one 
> place. (The goal is that others can generate the PDFs themselves from 
> the source files as long as they have a sufficiently recent version of 
> ConTeXt installed.) The usual ConTeXt directory structure makes sense 
> for most of this, but it doesn't address the possibility of accessing 
> fonts locally. I think I could do this with a script that temporarily 
> sets the OSFONTDIR variable to the local fonts directory and then 
> invokes ConTeXt to typeset the project-level file, but I was wondering 
> if there is an easier way to do this from within ConTeXt. 
> Specifically, is there a way to specify a font via a local path with 
> font setup commands in an environment file?

You can use

     \usefontpath[...]

to set a directory where ConTeXt searches for fonts but this works only 
when you use a typescript and not for \definefontfamily.

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] 3+ messages in thread

end of thread, other threads:[~2021-08-07 20:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 20:29 Referencing fonts by path within ConTeXt Joey McCollum via ntg-context
2021-08-07 20:45 ` Henning Hraban Ramm via ntg-context
2021-08-07 20:57 ` Wolfgang Schuster via ntg-context

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).