ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] fake slant for definefallbackfamily
@ 2024-10-18 16:04 Sylvain Hubert
  2024-10-19  4:50 ` [NTG-context] " ai2472206007
  2024-10-20 17:00 ` Pablo Rodriguez via ntg-context
  0 siblings, 2 replies; 3+ messages in thread
From: Sylvain Hubert @ 2024-10-18 16:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I can define fake slant for a font with

    \definefontfamily[mainface][rm][My Fancy Font][sl=features:slanted]

How can I do it with \definefallbackfamily?

According to
https://wiki.contextgarden.net/index.php?title=Command/definefallbackfamily
, the following should work, but it actually doesn't:

    \definefallbackfamily[mainface][rm][My Fancy
Font][preset={range:chinese},sl=features:slanted]

Besides, the wiki page lists an option `range=...` in the last bracket, but
what's actually used is `preset=range:...`. Are they mistakes?

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

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

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: fake slant for definefallbackfamily
  2024-10-18 16:04 [NTG-context] fake slant for definefallbackfamily Sylvain Hubert
@ 2024-10-19  4:50 ` ai2472206007
  2024-10-20 17:00 ` Pablo Rodriguez via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: ai2472206007 @ 2024-10-19  4:50 UTC (permalink / raw)
  To: ntg-context

There is no complete example. I created a new one. The following example is working on my computer.

% Maybe you need to explicitly specify the font name through the “tf” parameter.
% Just replace “adobesongstdlight” with your own font.

%%%%%%
\definefallbackfamily [mainface][rm][adobesongstd][tf={adobesongstdlight},sl={features:slanted},preset=range:chinese]
\definefontfamily       [mainface][rm][libertinusserif]
\setupbodyfont         [mainface]

\mainlanguage[cn]
\setupscript[hanzi]
\sl 李信真是太好玩了,还带保送的 some word others
%%%%%%%

Because there are many hanzi characters in Chinese, 
it is scattered in different ranges, so the scope of Chinese characters is defined. 
You can define it by \definefontfamilypreset.
These ranges are in: https://wiki.contextgarden.net/List_of_Unicode_blocks.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: fake slant for definefallbackfamily
  2024-10-18 16:04 [NTG-context] fake slant for definefallbackfamily Sylvain Hubert
  2024-10-19  4:50 ` [NTG-context] " ai2472206007
@ 2024-10-20 17:00 ` Pablo Rodriguez via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-10-20 17:00 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 10/18/24 18:04, Sylvain Hubert wrote:
> I can define fake slant for a font with
>
>     \definefontfamily[mainface][rm][My Fancy Font][sl=features:slanted]
>
> How can I do it with \definefallbackfamily?

Sorry, Sylvain, since you provide no sample, mine will contain Greek:

  \definefallbackfamily [mainface][rm][Dejavu Sans]
    [sl={style:regular, features:slanted},preset=range:greek]
  \definefontfamily       [mainface][rm][Latin Modern Sans]
  \setupbodyfont         [mainface]
  \starttext
  αβγ9 some word others
  \sl αβγ9 some word others
  \stoptext

I cannot get the slanted font if I use:

  \enableexperiments[fonts.compact]

But this affects only LMTX, not MkIV.

Could anyone confirm this?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-10-20 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-18 16:04 [NTG-context] fake slant for definefallbackfamily Sylvain Hubert
2024-10-19  4:50 ` [NTG-context] " ai2472206007
2024-10-20 17:00 ` Pablo Rodriguez 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).