Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Hans Hagen

On 11/7/2020 6:45 PM, Pablo Rodriguez wrote:

On 11/7/20 6:18 PM, Sylvain Hubert wrote:

Thank you so much, Pablo. This is exactly what I needed.

Could you also tell me where you have learnt these features? I had been
searching for this for hours but \effect was still the best of what I've
got. Indeed, googling 'context+tex+boldened' or 'contextgarden+boldened'
results in nothing useful.


Well, I asked for that feature
(https://mailman.ntg.nl/pipermail/ntg-context/2018/091128.html), which
Ulrike Fischer requested a year before
(https://mailman.ntg.nl/pipermail/ntg-context/2017/090091.html).

And that year, BachoTeX included a presentation with the implemented
feature (also included in LMTX @
tex/texmf-context/doc/context/presentations/bachotex/2018/bachotex-2018-fonteffects.pdf
[also with sources]).

I was very interested on that particular feature, because the previous
fake bold feature was simple stretching.

FYI.

The literal based solution has been in context for a long time (already 
in mkii) .. the 'bachotex' one you refer to is different and although it 
does use pdf rendering primitives it is more about making sure that 
related dimensions etc are dealt with (more parameters and dimensions 
are involved in that).


Actually, in luatex slanting and expanding (which is also kind of 
bondeling) have been inherited from pdftex. Boldening text is one case, 
but dealing with math yet another and the luatex engine only has some 
additional font property (linewidth) but all the rest has do be dealt 
with in lua.


In lmtx the implementation of those specific font properties is a bit 
different. In the end it is not so much the linewidth that matters here 
(which is trivial) but the details which is why there are several 
parameters that one can tweak. For instance outlines are also done this 
way.


(But as with many features, I'm not so sure if they are really used. The 
main reason for supporting it is not in text, because one should choose 
a proper font, but for math where bold (+heavy alphabets) are not widely 
available but needed for section heads.)


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
___


Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 6:18 PM, Sylvain Hubert wrote:
> Thank you so much, Pablo. This is exactly what I needed.
>
> Could you also tell me where you have learnt these features? I had been
> searching for this for hours but \effect was still the best of what I've
> got. Indeed, googling 'context+tex+boldened' or 'contextgarden+boldened'
> results in nothing useful.

Well, I asked for that feature
(https://mailman.ntg.nl/pipermail/ntg-context/2018/091128.html), which
Ulrike Fischer requested a year before
(https://mailman.ntg.nl/pipermail/ntg-context/2017/090091.html).

And that year, BachoTeX included a presentation with the implemented
feature (also included in LMTX @
tex/texmf-context/doc/context/presentations/bachotex/2018/bachotex-2018-fonteffects.pdf
[also with sources]).

I was very interested on that particular feature, because the previous
fake bold feature was simple stretching.

Pablo
--
http://www.ousia.tk
___
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
___


Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Sylvain Hubert
Thank you so much, Pablo. This is exactly what I needed.

Could you also tell me where you have learnt these features? I had been
searching for this for hours but \effect was still the best of what I've
got. Indeed, googling 'context+tex+boldened' or 'contextgarden+boldened'
results in nothing useful.

Sylvain

On Sat, 7 Nov 2020 at 16:41, Pablo Rodriguez  wrote:

> On 11/7/20 4:06 PM, Sylvain Hubert wrote:
> > [...]
> > Could anyone help me define a {\bf}-aware version of \fakebf which can
> > render the "4 5 6" in the example above in latinmodern's bold?
>
> Hi Sylvain,
>
> there is an already defined font feature that fakes boldened fonts:
> boldened (and also boldened-10, boldened-15, boldened-20 and boldened-25
> [boldened is actually boldened-30]).
>
> But I don’t use \definefont myself, so this is my sample:
>
> \definefontfamily[mainface][rm][Latin Modern Sans]
> [bf={style:tf, features:{default, boldened}}]
> \setupbodyfont[mainface]
> \starttext
> normal \bf boldened
> \stoptext
>
> Handle with care, since faked fonts are to be used sparingly,
>
> Pablo
> --
> http://www.ousia.tk
>
> ___
> 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
>
> ___
>
___
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
___


Re: [NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Pablo Rodriguez
On 11/7/20 4:06 PM, Sylvain Hubert wrote:
> [...]
> Could anyone help me define a {\bf}-aware version of \fakebf which can
> render the "4 5 6" in the example above in latinmodern's bold?

Hi Sylvain,

there is an already defined font feature that fakes boldened fonts:
boldened (and also boldened-10, boldened-15, boldened-20 and boldened-25
[boldened is actually boldened-30]).

But I don’t use \definefont myself, so this is my sample:

\definefontfamily[mainface][rm][Latin Modern Sans]
[bf={style:tf, features:{default, boldened}}]
\setupbodyfont[mainface]
\starttext
normal \bf boldened
\stoptext

Handle with care, since faked fonts are to be used sparingly,

Pablo
--
http://www.ousia.tk
___
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
___


[NTG-context] How to define a {\bf}-compatible fake-bold switcher?

2020-11-07 Thread Sylvain Hubert
Dear List,

I'm using a weirdfont that does not have a pre-defined bold variant but
still want to emboldening short extracts of text occasionally, so I've
defined

\defineeffect[thicker][alternative=both,rulethickness=0.3pt]
\define\fakebf{\effect[thicker]}

but in situations like

{\fakebf \definedfont[weridfont] 1 2 3 \definedfont[modern]4 5 6}

the "4 5 6" is faked bold even if latinmodern has a proper bold font.

Could anyone help me define a {\bf}-aware version of \fakebf which can
render the "4 5 6" in the example above in latinmodern's bold?

Thanks in advance.

Best,
Sylvain
___
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
___