ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Getting started with Japanese
@ 2022-07-09 11:58 Gerben Wierda via ntg-context
  2022-07-09 15:24 ` Gerben Wierda via ntg-context
  2022-07-10 12:13 ` Wolfgang Schuster via ntg-context
  0 siblings, 2 replies; 3+ messages in thread
From: Gerben Wierda via ntg-context @ 2022-07-09 11:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gerben Wierda


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

I’d like to experiment a bit with typesetting Japanese in ConTeXt (LMTX), to see if it is doable.

I tried looking for Japanese on ConTeXtgarden, but did not find anything.

Can someone point me to instructions to get started with Japanese in LMTX (on macOS).

Thanks,

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

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

* Re: Getting started with Japanese
  2022-07-09 11:58 Getting started with Japanese Gerben Wierda via ntg-context
@ 2022-07-09 15:24 ` Gerben Wierda via ntg-context
  2022-07-10 12:13 ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Gerben Wierda via ntg-context @ 2022-07-09 15:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gerben Wierda


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


Answering myself on Japanese, this actually works out of the box:

\setuplanguage[ja][patterns={ja}]\mainlanguage[ja]

 \definefallbackfamily
  [archimate]
  [ss]
  [Hiragino Sans]
  [preset=range:japanese,
   tf=style:W3,
   it=style:W3,
   bf=style:W5,
   bi=style:W5,
   force=yes]

\definefontfamily [archimate] [ss] [Optima]

\setupbodyfont[archimate]

\starttext
Some text. 他のテキスト\\
\stoptext

I have no idea why this works and if stuff is missing because more is needed than just the above. Of course the translation of italics into weights is nonsense, in Japanese that would probably mean using quite different characters (katakana?)

Am I missing something?

G

> 
> Thanks,
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
> R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


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

* Re: Getting started with Japanese
  2022-07-09 11:58 Getting started with Japanese Gerben Wierda via ntg-context
  2022-07-09 15:24 ` Gerben Wierda via ntg-context
@ 2022-07-10 12:13 ` Wolfgang Schuster via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2022-07-10 12:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Wolfgang Schuster


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

Gerben Wierda via ntg-context schrieb am 09.07.2022 um 13:58:
> I’d like to experiment a bit with typesetting Japanese in ConTeXt 
> (LMTX), to see if it is doable.
>
> I tried looking for Japanese on ConTeXtgarden, but did not find anything.
>
> Can someone point me to instructions to get started with Japanese in 
> LMTX (on macOS).

1. You need a font to typeset japanese.

2. Add \setscript[nihongo] to your document to enable line breaks.

%%%% begin example
\definefontfamily [noto-cjk-jp] [serif] [Noto Serif CJK JP]
   [it={style:regular,features:{*,slanted}},
    bi={style:bold,features:{*,slanted}}]

\definefontfamily [noto-cjk-jp] [sans]  [Noto Sans CJK JP]
   [it={style:regular,features:{*,slanted}},
    bi={style:bold,features:{*,slanted}}]

\definefontfamily [noto-cjk-jp] [mono]  [Noto Sans Mono CJK JP]
   [it={style:regular,features:{*,slanted}},
    bi={style:bold,features:{*,slanted}}]

\definetypeface [noto-cjk-jp] [mm] [math] [pagella] [default]

\setupbodyfont [noto-cjk-jp]

\setscript [nihongo]

\starttext

\rm\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語

\ss\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語

\tt\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語

\stoptext
%%%% end example

Wolfgang


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

end of thread, other threads:[~2022-07-10 12:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09 11:58 Getting started with Japanese Gerben Wierda via ntg-context
2022-07-09 15:24 ` Gerben Wierda via ntg-context
2022-07-10 12:13 ` Wolfgang Schuster 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).