From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@freedom.nl>
Subject: Re: Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
Date: Sun, 21 Aug 2022 18:19:14 +0200 [thread overview]
Message-ID: <3e917e1d-f80f-a96c-e402-c62a2c26c8a6@freedom.nl> (raw)
In-Reply-To: <011c9bde-bc0c-b15f-53a5-a51d4b8f3728@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 682 bytes --]
On 8/21/2022 12:10 PM, Wolfgang Schuster via ntg-context wrote:
> 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24:
>> Currently, the ruby module does not seem to support cjk fonts? I have
>> a preliminary implementation of furigana(pinyin in Chinese) as:
attached a variant (no pdf attached) using wolfgangs font definition
plus some more
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
[-- Attachment #2: test-directions-008.tex --]
[-- Type: text/plain, Size: 3124 bytes --]
% in font-imp-scripts, line 145, comment a few lines
%
% orientate = function(character)
% local width = character.width or 0
% local height = character.height or 0
% local depth = character.depth or 0
% -- character.width = height + depth + rightshift + rightshift
% character.height = width - downshift
% character.depth = shift
% -- character.xoffset = height + rightshift
% -- character.yoffset = - downshift
% -- character.orientation = orientation
% end
\definefontfeature
[vertical]
[vertical={%
orientation=3,%
down=.1,%
right=.1,%
ranges={%
cjkcompatibility,%
cjkcompatibilityforms,%
cjkcompatibilityideographs,%
cjkcompatibilityideographssupplement,%
cjkradicalssupplement,%
% cjkstrokes,%
cjksymbolsandpunctuation,%
cjkunifiedideographs,%
cjkunifiedideographsextensiona,%
cjkunifiedideographsextensionb,%
cjkunifiedideographsextensionc,%
cjkunifiedideographsextensiond,%
cjkunifiedideographsextensione,%
cjkunifiedideographsextensionf,%
}%
}]
\definefont[NotoCJKvertical] [NotoSanstc-Regular*default,vertical @ 24pt]
\definefont[NotoCJKverticalBold][NotoSanstc-Bold*default,vertical @ 48pt]
\definefallbackfamily [documentfont] [rm] [Noto Serif CJK SC] [preset=range:chinese,features={default,vertical}]
\definefallbackfamily [documentfont] [ss] [Noto Sans CJK SC] [preset=range:chinese,features={default,vertical}]
\definefallbackfamily [documentfont] [tt] [Noto Sans Mono CJK SC] [preset=range:chinese,features={default,vertical}]
\definefontfamily [documentfont] [rm] [Noto Serif]
\definefontfamily [documentfont] [ss] [Noto Sans]
\definefontfamily [documentfont] [tt] [Noto Sans Mono]
\setupbodyfont [documentfont,24pt]
\setuppapersize
[A4,landscape,rotated,270]
[A4,portrait]
\setuplayout[middle]
\showframe
\setuphead
[chapter]
[numbercolor=darkred,
conversion=chinesenumerals]
\setuptolerance
[verytolerant,stretch]
\setupinterlinespace
[40pt]
\setuplayout
[color=darkblue]
\setuppagenumbering
[location=footer]
\defineconversionset
[pagenumber]
[]
[chinesenumerals]
\protected\def\stripe#1{\hbox orientation 0 yoffset 3pt{\strut #1}}
\setscript[hangul]
\starttext
% \startscript[hangul]
\chapter{通用规}
\placefigure
[left,none]
{汉字表}
{\framed
[width=4cm,
height=2\lineheight,
frame=off,
backgroundcolor=darkgreen,
foregroundcolor=white,
background=color]
{汉字表}}
\dorecurse{40}{%
通用规\ruby{范}{x}汉字表 \stripe{test #1}
}
% \stopscript
\stoptext
[-- Attachment #3: 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
___________________________________________________________________________________
next prev parent reply other threads:[~2022-08-21 16:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 11:02 amano.kenji via ntg-context
2022-08-15 11:43 ` Taco Hoekwater via ntg-context
2022-08-15 12:00 ` amano.kenji via ntg-context
2022-08-15 15:39 ` Wolfgang Schuster via ntg-context
2022-08-16 11:33 ` amano.kenji via ntg-context
2022-08-16 15:05 ` Wolfgang Schuster via ntg-context
2022-08-21 8:24 ` 黄复雄 via ntg-context
2022-08-21 10:00 ` Hans Hagen via ntg-context
2022-08-21 10:10 ` Wolfgang Schuster via ntg-context
2022-08-21 16:19 ` Hans Hagen via ntg-context [this message]
2022-08-22 5:21 ` 黄复雄 via ntg-context
2022-08-22 7:16 ` Hans Hagen via ntg-context
2022-09-03 10:44 ` 黄复雄 via ntg-context
2022-08-22 2:09 ` 黄复雄 via ntg-context
2022-08-22 4:52 ` 黄复雄 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=3e917e1d-f80f-a96c-e402-c62a2c26c8a6@freedom.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@freedom.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).