ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Using project-local fonts
@ 2023-04-13 12:06 Kalouguine Andre via ntg-context
  2023-04-13 14:32 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Kalouguine Andre via ntg-context @ 2023-04-13 12:06 UTC (permalink / raw)
  To: ntg-context; +Cc: Kalouguine Andre


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

Hi, 

I'm writing a small report using EB Garamond as the main font. I am
sometimes using Overleaf (which has a ConTeXt distribution that is
accessible using a latexmkrc file). 

The problem is, the EB Garamond version that is included seems to have a
bug: the c-t and s-t ligatures (and maybe others) are triggered when
enabling `dlig` even though they are supposed to be in the `hlig`
feature. I also would like to include the Hack font that isn't in the
distribution.
So, I'm looking for a way to embed the fonts into the project in a
portable way instead of installing them in a system directory. Is there
any way to do so ? The version of ConTeXt used is

ConTeXt  ver: 2021.03.05 19:11 MKIV  fmt: 2023.4.13  int:
english/english

Here is a small MWE: 

output.tex``` 

\definefontfeature
[myfontfeature]
[default][
    liga=yes,
    tlig=yes,
    dlig=yes,
    hlig=no,
]

\definefontfamily [ebgaramond] [serif] [ebgaramond]
[features=myfontfeature]
\definefontfamily [ebgaramond] [math]  [Garamond-Math]
\definefontfamily [ebgaramond] [mono]  [Hack] [tf = style:mono]
\setupbodyfont[ebgaramond,12pt]

\starttext
The most distict sentence. 
\stoptext 

``` 

latexmkrc``` 

 $latex = 'ls /;context --luatex --synctex --batchmode %S' 

```

-- 
Kalouguine Andre

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 12:06 [NTG-context] Using project-local fonts Kalouguine Andre via ntg-context
@ 2023-04-13 14:32 ` Hans Hagen via ntg-context
  2023-04-13 15:28   ` Kalouguine Andre via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2023-04-13 14:32 UTC (permalink / raw)
  To: Kalouguine Andre via ntg-context; +Cc: Hans Hagen

On 4/13/2023 2:06 PM, Kalouguine Andre via ntg-context wrote:
> Hi,
> 
> I'm writing a small report using EB Garamond as the main font. I am 
> sometimes using Overleaf (which has a ConTeXt distribution that is 
> accessible using a latexmkrc file).

i'm not familiar with that approach so can't see what interferes

> The problem is, the EB Garamond version that is included seems to have a 
> bug: the c-t and s-t ligatures (and maybe others) are triggered when 
> enabling `dlig` even though they are supposed to be in the `hlig` 
> feature. I also would like to include the Hack font that isn't in the 
> distribution.
> So, I'm looking for a way to embed the fonts into the project in a 
> portable way instead of installing them in a system directory. Is there 
> any way to do so ? The version of ConTeXt used is
here i just put all fonts in texmf-fonts/fonts/data

you can try to mix selectfont and regular typoescripts:

\usetypescriptfile[ebgaramond]

\definefontfamily [ebgaramond] [serif] [ebgaramond] 
[features=eb-garamond-normal]
%definefontfamily [ebgaramond] [math]  [Garamond-Math]
\definefontfamily [ebgaramond] [mono]  [Hack] [tf=style:mono]

%definetypeface [ebgaramond] [ss] [sans] [ysabeau]    [default]
\definetypeface [ebgaramond] [mm] [math] [ebgaramond] [default]

\setupbodyfont[ebgaramond,12pt]

\starttext
     The most distinct sentence $x$.
\stoptext

as you probably also want proper math.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 14:32 ` Hans Hagen via ntg-context
@ 2023-04-13 15:28   ` Kalouguine Andre via ntg-context
  2023-04-13 15:37     ` Hans Hagen via ntg-context
  2023-04-13 19:22     ` Rik Kabel via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Kalouguine Andre via ntg-context @ 2023-04-13 15:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Kalouguine Andre


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

Hi,

> i'm not familiar with that approach so can't see what interferes

The most important change is that I can't update it and I can't put
stuff in the system directory nor the user one. 
So I only have access to the project folder, it has to be
self-contained. 

> \definefontfamily [ebgaramond] [serif] [ebgaramond] [features=eb-garamond-normal]

Apologies, my fault, I forgot a part of my email. I don't want the c-t
and s-t ligatures (supposed to be in `hlig`). But I do want the T-h
ligature which is supposed to be in `dlig`. So as far as I understand,
TeXlive comes with an old version of EB Garamond in which all of them
are in `dlig`. Hence my question about self-contained projects with
fonts. 

Best regards,
Andre

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 15:28   ` Kalouguine Andre via ntg-context
@ 2023-04-13 15:37     ` Hans Hagen via ntg-context
  2023-04-13 19:22     ` Rik Kabel via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2023-04-13 15:37 UTC (permalink / raw)
  To: Kalouguine Andre via ntg-context; +Cc: Hans Hagen

On 4/13/2023 5:28 PM, Kalouguine Andre via ntg-context wrote:
> Hi,
> 
>> i'm not familiar with that approach so can't see what interferes
> The most important change is that I can't update it and I can't put 
> stuff in the system directory nor the user one.
> So I only have access to the project folder, it has to be self-contained.
>> \definefontfamily [ebgaramond] [serif] [ebgaramond] 
>> [features=eb-garamond-normal]
> Apologies, my fault, I forgot a part of my email. I don't want the c-t 
> and s-t ligatures (supposed to be in `hlig`). But I do want the T-h 
> ligature which is supposed to be in `dlig`. So as far as I understand, 
> TeXlive comes with an old version of EB Garamond in which all of them 
> are in `dlig`. Hence my question about self-contained projects with fonts.
You can put the font in the local directory but i have no clue how that 
works with your setup because in the end the font cache is used and does 
a user have a local one? YOu can maybe rename the font,. put it in the 
work directory and make a typescript that refers to that one.

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 15:28   ` Kalouguine Andre via ntg-context
  2023-04-13 15:37     ` Hans Hagen via ntg-context
@ 2023-04-13 19:22     ` Rik Kabel via ntg-context
  2023-04-13 20:11       ` Kalouguine Andre via ntg-context
  1 sibling, 1 reply; 8+ messages in thread
From: Rik Kabel via ntg-context @ 2023-04-13 19:22 UTC (permalink / raw)
  To: ntg-context; +Cc: Rik Kabel


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


On 2023-04-13 11:28, Kalouguine Andre via ntg-context wrote:
>
> Hi,
>
>> i'm not familiar with that approach so can't see what interferes
> The most important change is that I can't update it and I can't put 
> stuff in the system directory nor the user one.
> So I only have access to the project folder, it has to be self-contained.
>> \definefontfamily [ebgaramond] [serif] [ebgaramond] 
>> [features=eb-garamond-normal]
> Apologies, my fault, I forgot a part of my email. I don't want the c-t 
> and s-t ligatures (supposed to be in `hlig`). But I do want the T-h 
> ligature which is supposed to be in `dlig`. So as far as I understand, 
> TeXlive comes with an old version of EB Garamond in which all of them 
> are in `dlig`. Hence my question about self-contained projects with fonts.
> Best regards,
> Andre
>

Andre (and list),

EB Garamond is hopelessly broken with respect to hlig and dlig, and has 
been for quite a while.

I reported the problem 
(https://github.com/octaviopardo/EBGaramond12/issues/20) over five years 
ago, and the maintainer (if there is one) has done nothing. See also #4 
in that issues list 
(https://github.com/octaviopardo/EBGaramond12/issues/4). There are a 
couple of forks, but there is no established reference implementation 
that I can see. The Google Fonts implementation is similarly challenged, 
perhaps worse.

-- 
Rik


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 19:22     ` Rik Kabel via ntg-context
@ 2023-04-13 20:11       ` Kalouguine Andre via ntg-context
  2023-04-13 20:33         ` Hans Hagen via ntg-context
  2023-04-13 20:40         ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Kalouguine Andre via ntg-context @ 2023-04-13 20:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Kalouguine Andre


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

On 13.04.2023 21:22, Rik Kabel via ntg-context wrote:

> EB Garamond is hopelessly broken with respect to hlig and dlig, and has been for quite a while. 
> 
> I reported the problem (https://github.com/octaviopardo/EBGaramond12/issues/20) over five years ago, and the maintainer (if there is one) has done nothing. See also #4 in that issues list (https://github.com/octaviopardo/EBGaramond12/issues/4). There are a couple of forks, but there is no established reference implementation that I can see. The Google Fonts implementation is similarly challenged, perhaps worse.

Oh, I hadn't realized. I had read somewhere that the TeXlive version was
simply older than the `Specimen.pdf` document and had some bugs. I
hadn't realized that it wasn't fixed yet.
This is unfortunate! 

Thanks for the information, you saved me from wasting too much time on
that. 

Best regards, 

Andre

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 20:11       ` Kalouguine Andre via ntg-context
@ 2023-04-13 20:33         ` Hans Hagen via ntg-context
  2023-04-13 20:40         ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2023-04-13 20:33 UTC (permalink / raw)
  To: Kalouguine Andre via ntg-context; +Cc: Hans Hagen

On 4/13/2023 10:11 PM, Kalouguine Andre via ntg-context wrote:
> On 13.04.2023 21:22, Rik Kabel via ntg-context wrote:
> 
>> EB Garamond is hopelessly broken with respect to hlig and dlig, and 
>> has been for quite a while.
>>
>> I reported the problem 
>> (https://github.com/octaviopardo/EBGaramond12/issues/20) over five 
>> years ago, and the maintainer (if there is one) has done nothing. See 
>> also #4 in that issues list 
>> (https://github.com/octaviopardo/EBGaramond12/issues/4). There are a 
>> couple of forks, but there is no established reference implementation 
>> that I can see. The Google Fonts implementation is similarly 
>> challenged, perhaps worse.
>>
> Oh, I hadn't realized. I had read somewhere that the TeXlive version was 
> simply older than the `Specimen.pdf` document and had some bugs. I 
> hadn't realized that it wasn't fixed yet.
> This is unfortunate!
> 
> Thanks for the information, you saved me from wasting too much time on that.
if you know what the bugs are you can make a pseudo feature that fixes 
it (there are examples in the test suite)

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: [NTG-context] Using project-local fonts
  2023-04-13 20:11       ` Kalouguine Andre via ntg-context
  2023-04-13 20:33         ` Hans Hagen via ntg-context
@ 2023-04-13 20:40         ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2023-04-13 20:40 UTC (permalink / raw)
  To: Kalouguine Andre via ntg-context; +Cc: Hans Hagen

On 4/13/2023 10:11 PM, Kalouguine Andre via ntg-context wrote:
> On 13.04.2023 21:22, Rik Kabel via ntg-context wrote:
> 
>> EB Garamond is hopelessly broken with respect to hlig and dlig, and 
>> has been for quite a while.
>>
>> I reported the problem 
>> (https://github.com/octaviopardo/EBGaramond12/issues/20) over five 
>> years ago, and the maintainer (if there is one) has done nothing. See 
>> also #4 in that issues list 
>> (https://github.com/octaviopardo/EBGaramond12/issues/4). There are a 
>> couple of forks, but there is no established reference implementation 
>> that I can see. The Google Fonts implementation is similarly 
>> challenged, perhaps worse.
>>
> Oh, I hadn't realized. I had read somewhere that the TeXlive version was 
> simply older than the `Specimen.pdf` document and had some bugs. I 
> hadn't realized that it wasn't fixed yet.
> This is unfortunate!
> 
> Thanks for the information, you saved me from wasting too much time on that.
the lmtx installation comes with some fonts that we keep from the garden 
related git repository so we have control over updates; we can do 
somethign similar with popular fonts that we like to be frozen in which 
case we can tweak them runtime (when we update we can then reconsider 
tweaks)

sometimes it's easier to just accept that there are bugs and fix them 
runtime

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-04-13 20:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 12:06 [NTG-context] Using project-local fonts Kalouguine Andre via ntg-context
2023-04-13 14:32 ` Hans Hagen via ntg-context
2023-04-13 15:28   ` Kalouguine Andre via ntg-context
2023-04-13 15:37     ` Hans Hagen via ntg-context
2023-04-13 19:22     ` Rik Kabel via ntg-context
2023-04-13 20:11       ` Kalouguine Andre via ntg-context
2023-04-13 20:33         ` Hans Hagen via ntg-context
2023-04-13 20:40         ` Hans Hagen 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).