ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Gerben Wierda <gerben.wierda@rna.nl>
Subject: Re: [NTG-context] Linebreaking in Japanese in ConTeXt
Date: Sun, 30 Apr 2023 10:48:12 +0200	[thread overview]
Message-ID: <7B63FFB4-A181-43BF-A562-2C9CEAB64C21@rna.nl> (raw)
In-Reply-To: <71493015-436b-bf88-9c66-883aa59dda07@gmail.com>


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


> On 30 Apr 2023, at 10:04, Wolfgang Schuster via ntg-context <ntg-context@ntg.nl> wrote:
> 
> %%%% begin example
> \definefontfamily [noto-jp] [rm] [Noto Serif CJK JP]
> \definefontfamily [noto-jp] [ss] [Noto Sans CJK JP]
> \definetypeface   [noto-jp] [mm] [math] [pagella] [default]
> 
> \setupbodyfont [noto-jp]
> 
> \mainlanguage [ja]
> 
> \setscript [nihongo]

Thank you.

How do I change that in my setup?

My setup is creating the same stuff in different languages from XML input (LMTX using lua and METAPOST), which means I need to adapt the following setup (cyrillic and greek shown as the other languages with different character sets I use)

\startmode[JA]
\setuplanguage[ja][patterns={ja}]\mainlanguage[ja]
\stopmode

\definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:cyrillic,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes,
   rscale=1.0]
 \definefallbackfamily
  [archimate]
  [ss]
  [Helvetica]
  [preset=range:greek,
   tf=style:light,
   it=style:lightoblique,
   bf=style:regular,
   bi=style:oblique,
   force=yes]
\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

lua code creates METAPOST code which creates images with embedded ConTeXt 'vboxes' which again contain language-setting ConTeXt code for each piece of text.

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>, Mastodon <https://newsie.social/@gctwnl>)
R&A IT Strategy <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: 11015 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
___________________________________________________________________________________

  reply	other threads:[~2023-04-30  8:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30  7:12 Gerben Wierda via ntg-context
2023-04-30  7:21 ` Gerben Wierda via ntg-context
2023-04-30  8:04 ` Wolfgang Schuster via ntg-context
2023-04-30  8:48   ` Gerben Wierda via ntg-context [this message]
2023-04-30 10:42     ` Wolfgang Schuster via ntg-context
2023-05-01 14:12       ` Henning Hraban Ramm via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7B63FFB4-A181-43BF-A562-2C9CEAB64C21@rna.nl \
    --to=ntg-context@ntg.nl \
    --cc=gerben.wierda@rna.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).