ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to define a {\bf}-compatible fake-bold switcher?
@ 2020-11-07 15:06 Sylvain Hubert
  2020-11-07 15:40 ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Hubert @ 2020-11-07 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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

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

* Re: How to define a {\bf}-compatible fake-bold switcher?
  2020-11-07 15:06 How to define a {\bf}-compatible fake-bold switcher? Sylvain Hubert
@ 2020-11-07 15:40 ` Pablo Rodriguez
  2020-11-07 17:18   ` Sylvain Hubert
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2020-11-07 15:40 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

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

* Re: How to define a {\bf}-compatible fake-bold switcher?
  2020-11-07 15:40 ` Pablo Rodriguez
@ 2020-11-07 17:18   ` Sylvain Hubert
  2020-11-07 17:45     ` Pablo Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Hubert @ 2020-11-07 17:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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 <oinos@gmx.es> 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
>
> ___________________________________________________________________________________
>

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

* Re: How to define a {\bf}-compatible fake-bold switcher?
  2020-11-07 17:18   ` Sylvain Hubert
@ 2020-11-07 17:45     ` Pablo Rodriguez
  2020-11-07 18:09       ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez @ 2020-11-07 17:45 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

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

* Re: How to define a {\bf}-compatible fake-bold switcher?
  2020-11-07 17:45     ` Pablo Rodriguez
@ 2020-11-07 18:09       ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2020-11-07 18:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

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
___________________________________________________________________________________

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

end of thread, other threads:[~2020-11-07 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 15:06 How to define a {\bf}-compatible fake-bold switcher? Sylvain Hubert
2020-11-07 15:40 ` Pablo Rodriguez
2020-11-07 17:18   ` Sylvain Hubert
2020-11-07 17:45     ` Pablo Rodriguez
2020-11-07 18:09       ` Hans Hagen

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