ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Embedding fonts from a file
@ 2020-08-14 12:28 Krešimir Cindrić
  2020-08-14 12:41 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Krešimir Cindrić @ 2020-08-14 12:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hello,

About a year ago, I asked on this list how to embed OpenType fonts from
files (that is, use fonts that are not installed on the system), because
one of my projects needed portability (be entirely contained in one
directory that I could share). I was given a great answer by Hans and this
minimal example
```
\starttext

    % \ctxlua{fonts.names.addruntimepath("./myfonts")}
     \ctxlua{os.setenv("RUNTIMEFONTS","./myfonts")}

     Hello World!

     \definefont[myfont][file:myfont.otf]

     {\myfont Hello World!}

\stoptext
```
This worked beautifully (with some caveats, like having to clear the cache
regularly), but for some reason, it stopped working. I don't know exactly
when, because I haven't compiled that project in months, and in the
meantime I reinstalled Linux. But now, all embedded fonts are not loading
and I get "'fallback modern-designsize rm 12pt' is loaded" as an error
message.

Any assistance would be appreciated.

Krešimir

[-- Attachment #1.2: Type: text/html, Size: 1172 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] 2+ messages in thread

* Re: Embedding fonts from a file
  2020-08-14 12:28 Embedding fonts from a file Krešimir Cindrić
@ 2020-08-14 12:41 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2020-08-14 12:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Krešimir Cindrić schrieb am 14.08.2020 um 14:28:
> Hello,
> 
> About a year ago, I asked on this list how to embed OpenType fonts from 
> files (that is, use fonts that are not installed on the system), because 
> one of my projects needed portability (be entirely contained in one 
> directory that I could share). I was given a great answer by Hans and 
> this minimal example
> ```
> \starttext
> 
>      % \ctxlua{fonts.names.addruntimepath("./myfonts")}
>       \ctxlua{os.setenv("RUNTIMEFONTS","./myfonts")}
> 
>       Hello World!
> 
>       \definefont[myfont][file:myfont.otf]
> 
>       {\myfont Hello World!}
> 
> \stoptext
> ```
> This worked beautifully (with some caveats, like having to clear the 
> cache regularly), but for some reason, it stopped working. I don't know 
> exactly when, because I haven't compiled that project in months, and in 
> the meantime I reinstalled Linux. But now, all embedded fonts are not 
> loading and I get "'fallback modern-designsize rm 12pt' is loaded" as an 
> error message.
> 
> Any assistance would be appreciated.


\usefontpath[myfont]

\starttext

Hello \CONTEXT!

{\definedfont[file:myfont*default]Hello \CONTEXT!}

\stoptext

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

end of thread, other threads:[~2020-08-14 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 12:28 Embedding fonts from a file Krešimir Cindrić
2020-08-14 12:41 ` Wolfgang Schuster

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