ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: New module - mkiv font loading
Date: Tue, 12 May 2009 09:47:53 +0200	[thread overview]
Message-ID: <31A98C5C-4E6E-453D-8513-D9E487BB5503@gmail.com> (raw)
In-Reply-To: <68bfdc900905110541n2b172f49m2f8e50a42e1839a2@mail.gmail.com>


Am 11.05.2009 um 14:41 schrieb Yue Wang:

> Hi Wolfgang:
>
> nice script.
>
> Can the module meet my needs discussed in
> http://www.ntg.nl/pipermail/ntg-context/2009/040831.html ?
> or is it possible to extend the support to xetex?


When you take care about font switching in your module it's easy,
large part of the code can be left out because XeTeX can find the
regular/italic/... styles itself.

\unprotect

\def\setmainfont[#1]{\definetypeface[simplefonts][rm][Xserif][#1] 
[default]}
\def\setsansfont[#1]{\definetypeface[simplefonts][ss][Xsans] [#1] 
[default]}
\def\setmonofont[#1]{\definetypeface[simplefonts][tt][Xmono] [#1] 
[default]}

\appendtoks\setupbodyfont[simplefonts]\to\everystarttext

\protect

\setmainfont[Times New Roman]
\setsansfont[Arial]
\setmonofont[Courier New]

\starttext

\rm\tf roman \it italic \bf bold \bi bolditalic

\ss\tf roman \it italic \bf bold \bi bolditalic

\tt\tf roman \it italic \bf bold \bi bolditalic

\stoptext

Wolfgang

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2009-05-12  7:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-11 12:23 Wolfgang Schuster
2009-05-11 12:41 ` Yue Wang
2009-05-11 13:00   ` Wolfgang Schuster
2009-05-11 13:44     ` Yue Wang
2009-05-11 13:48     ` Hans Hagen
2009-05-11 13:58       ` Yue Wang
2009-05-11 14:33         ` Hans Hagen
2009-05-11 14:38           ` Yue Wang
2009-05-11 17:32       ` Wolfgang Schuster
2009-05-12  7:47   ` Wolfgang Schuster [this message]
2009-05-11 13:18 ` Mohamed Bana
2009-05-11 13:31   ` Wolfgang Schuster
2009-05-11 13:32   ` Yanrui Li
2009-05-15 19:36 ` Mohamed Bana
2009-05-16  6:49   ` Wolfgang Schuster
2009-05-16 16:23 ` Mohamed Bana
2009-05-16 16:30   ` Hans Hagen
2009-05-16 16:36   ` Wolfgang Schuster

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=31A98C5C-4E6E-453D-8513-D9E487BB5503@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.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).