On 8/4/2020 10:32 AM, Jairo A. del Rio wrote:

http://www.mongolfont.com/en/font/mnglwhiteotf.html

hm, only for testing, not for use

I can rotate boxes in ConTeXt using other methods than those used in LaTeX. However, my main concern is about "translating" the Lua(La)TeX piece to be used in ConTeXt. I've read about "finalizers" in the CLD manual and somewhere online, but I don't know how to access to node.subtype("pdf_literal"). I'll be happy to know about a better solution if ConTeXt offers it so it is accessible to other users. Thank you in advance.
The problem (or challenge) as usual is not in the coding but in what is a reasonable user interface. So, what are the use cases. Her eis one solution:

\protected\def\startvertical
  {\dosingleempty\dostartvertical}

\def\dostartvertical[#1]%
  {\begingroup
   \getdummyparameters[width=\textwidth,height=\textheight,#1]%
   \vbox
     orientation 1
\doifelsedimension{\dummyparameter{width}}{to \dummyparameter{width}}{}%
   \bgroup
\doifelsedimension{\dummyparameter{height}}{\hsize \dummyparameter{height}}{}}

\protected\def\stopvertical
  {\vfill
   \egroup
   \endgroup}

% test

\starttext

\definefont
  [MyFont]
  [file:mnglwhiteotf.ttf*default,mongolian @ 24pt]

\showframe

\startvertical
    \MyFont
    \setupalign[stretch,tolerant,stretch]
    \setupinterlinespace[40pt]%
ᠣᠢᠷ᠎ᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶ᠎ᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯ᠎ᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭ᠎ᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨ᠎ᠠ᠃
\stopvertical

\page

\startvertical[height=.75\textheight]
    \MyFont
    \setupalign[flushleft]
    \setupinterlinespace[40pt]%
ᠣᠢᠷ᠎ᠠ ᠵᠢᠨ ᠡᠳᠦᠷ᠂ ᠦᠪᠦᠷ ᠮᠣᠩᠭᠣᠯ ᠦᠨ ᠰᠢᠯᠢ ᠵᠢᠨ ᠭᠣᠣᠯ ᠠᠢᠮᠠᠭ ᠦᠨ ᠰᠢᠯᠣᠭᠣᠨ ᠬᠦᠬᠡ ᠬᠣᠰᠢᠭᠣᠨ ᠦ ᠰᠢᠭᠦᠬᠦ ᠬᠣᠷᠢᠶ᠎ᠠ ᠨᠢᠭᠡᠨ ᠬᠦᠴᠦᠷᠬᠡᠭᠯᠡᠨ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠠᠯᠠᠲᠣ ᠬᠡᠷᠡᠭ ᠲᠦ ᠰᠢᠭᠦᠯᠲᠡ ᠬᠢᠪᠡ᠃ ᠰᠢᠭᠦᠨ ᠲᠠᠰᠣᠯᠣᠯᠳᠠ ᠪᠠᠷ᠂ ᠵᠠᠭᠠᠯᠳᠣᠭᠳᠠᠭᠴᠢ ᠡᠷᠬᠢᠮᠲᠦ ᠵᠢ ᠬᠦᠴᠦᠷᠭᠡᠭᠯᠡᠨ᠂ ᠨᠦᠵᠢᠳᠯᠡᠭᠰᠡᠨ ᠶᠡᠯ᠎ᠡ ᠪᠡᠷ ᠭᠣᠷᠪᠠᠨ ᠵᠢᠯ ᠦᠨ ᠬᠣᠭᠣᠴᠠᠭ᠎ᠠ ᠲᠠᠢ ᠬᠣᠷᠢᠬᠣ ᠡᠷᠡᠭᠦᠦ ᠪᠡᠷ ᠰᠢᠳᠬᠡᠭᠰᠡᠨ ᠪᠠᠢᠨ᠎ᠠ᠃
\stopvertical

\stoptext

But it's kind of a quick hack interface. We can have alignment, interlinespace etc parameters to. Maybe definable verticals and so.

Hans

ps. for chinese one would probably kick in an extra feature

% \definefontfeature
%   [vertical]
%   [vertical={%
%     orientation=3,%
%     down=.1,%
%     right=.1,%
%     ranges={%
%       cjkcompatibility,%
%       cjkcompatibilityforms,%
%       cjkcompatibilityideographs,%
%       cjkcompatibilityideographssupplement,%
%       cjkradicalssupplement,%
%     % cjkstrokes,%
%       cjksymbolsandpunctuation,%
%       cjkunifiedideographs,%
%       cjkunifiedideographsextensiona,%
%       cjkunifiedideographsextensionb,%
%       cjkunifiedideographsextensionc,%
%       cjkunifiedideographsextensiond,%
%       cjkunifiedideographsextensione,%
%       cjkunifiedideographsextensionf,%
%     }%
%   }]

and maybe some extreme hz would work out well too.

-----------------------------------------------------------------
                                          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
___________________________________________________________________________________

Reply via email to