From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/84811 Path: news.gmane.org!not-for-mail From: Prashanth Newsgroups: gmane.comp.tex.context Subject: Re: Simplefonts Date: Mon, 14 Oct 2013 18:38:42 +0200 Message-ID: <525C1E12.6050608@gmail.com> References: <3288E803-9426-41F1-AA62-144E5A21A085@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0704648070==" X-Trace: ger.gmane.org 1381768726 7677 80.91.229.3 (14 Oct 2013 16:38:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Oct 2013 16:38:46 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Oct 14 18:38:51 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VVlAQ-00087o-WC for gctc-ntg-context-518@m.gmane.org; Mon, 14 Oct 2013 18:38:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6A7E6101E9; Mon, 14 Oct 2013 18:36:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15zUvRoRvlg6; Mon, 14 Oct 2013 18:36:06 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id DBDFF101DE; Mon, 14 Oct 2013 18:36:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CC8BA101DE for ; Mon, 14 Oct 2013 18:36:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aeOZf7PvFghS for ; Mon, 14 Oct 2013 18:36:04 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 0DFC410193 for ; Mon, 14 Oct 2013 18:36:04 +0200 (CEST) Original-Received: from mail-ea0-x233.google.com (mail-ea0-x233.google.com [IPv6:2a00:1450:4013:c01::233]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r9EGh3rP018470 for ; Mon, 14 Oct 2013 18:43:04 +0200 Original-Received: by mail-ea0-f179.google.com with SMTP id b10so3487289eae.38 for ; Mon, 14 Oct 2013 09:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=K/rXcWV8jZcMdhrZrmCaMiZNCMqnNAhJTYacVzTgL8E=; b=SrWdZhJY3jsKTXWtHnfGTX1JJKUJLjDVmze4isL1KFtyK07XKXykkd2SytgOfvKLCR 72jCCzgg678xEqeQFp/Z3naRZmN2jZYOiUzzm5XIxDjJ+tKnAHcTsVpj4rkIpph5IyCg kkdxlRc73yVMQNaPmep93aBEguChCLb6iSaSRRIx/b4qKwQpjxEQyVxk4UG66gtBBWX/ zNZCoK6iB5CzBPOjXgMRdTAVsfBcDYHXI11UzYcS3EtL+RieXu24tHUZDYsv7Fyfdc/a 2CszGgJ5L8yrdwAaD7rSxIlgFNI+usfiyaaBvRAGdIfIHxZnH5CxLzm1EvNT6X/4EzSR 3cOA== X-Received: by 10.14.102.66 with SMTP id c42mr6112019eeg.47.1381768723609; Mon, 14 Oct 2013 09:38:43 -0700 (PDT) Original-Received: from [134.96.104.199] (dhcp104-199.coli.uni-saarland.de. [134.96.104.199]) by mx.google.com with ESMTPSA id j7sm155510668eeo.15.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Oct 2013 09:38:43 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Thunderbird/25.0a2 In-Reply-To: <3288E803-9426-41F1-AA62-144E5A21A085@gmail.com> X-Enigmail-Version: 1.5.2 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c01::233; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01KB4H4w2 - 119109316216 - 20131014 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:84811 Archived-At: This is a multi-part message in MIME format. --===============0704648070== Content-Type: multipart/alternative; boundary="------------030103050105040507030805" This is a multi-part message in MIME format. --------------030103050105040507030805 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Wolfgang, Thanks for the update. I have a question, and I came across a bug. Question: I need some keywords in a distinctively different font, which I accomplished by defining \kword as "\definesimplefont[kword][DejaVu Mono][size=3D13pt]". I looked through font-sel.mkvi, but I did not see an= y way of implementing equivalents. (I still haven't learnt macros properly, though.) Can you please give me a hint on how I can do this with the latest fonts interface? Bug: I prefer Euler font for math. This does not seem to work with the latest fonts interface. Best regards, Prash On 10/10/13 20:02, Wolfgang Schuster wrote: > Hi all, > > I=E2=80=99m happy to announce a new version of the simplefonts code. Th= ew new version of the code > is a complete rewrite and brings many changes. > > 1. The module is now part of the core and no external module is needed = anymore. > > 2. The commands to select a font have changed to commands which fit bet= ter to context normal syntax. > > 3. I removed the keys to enable font expansion and protrusion, when you= need them use \definefontfeature. > > > To use a font with the simplefonts code two ways are available. The fir= st method is to create > one or more typefaces and load it with \setupbodyfont. A complete examp= le for this is: > > \definefontfamily [mainface] [serif] [DejaVu Serif] > \definefontfamily [mainface] [sans] [DejaVu Sans] > \definefontfamily [mainface] [mono] [DejaVu Sans Mono] [feature=3Dnone= ] > \definefontfamily [mainface] [math] [TeX Gyre Pagella Math] > > \setupbodyfont[mainface] > > \starttext > \startlines > \rm DejaVu Serif > \ss DejaVu Sans > \tt DejaVu Sans Mono > \m{c^2 =3D a^2 + b^2} > \stoplines > \stoptext > > > The second method is similar to the old commands of the simplefonts mod= ule (e.g. \setmainfont) > where the font is enabled after it was set and no \setupbodyfont is nec= essary. Below is a example > for this method but I recommend to avoid this method because it=E2=80=99= s slow when you set font a font > for each style in your document. > > \setupfontfamily [serif] [DejaVu Serif] > \setupfontfamily [sans] [DejaVu Sans] > \setupfontfamily [mono] [DejaVu Sans Mono] [feature=3Dnone] > \setupfontfamily [math] [TeX Gyre Pagella Math] > > \starttext > \startlines > \rm DejaVu Serif > \ss DejaVu Sans > \tt DejaVu Sans Mono > \m{c^2 =3D a^2 + b^2} > \stoplines > \stoptext > > > Another feature of simplefonts is the ability to set a fallback font wh= en you need certain glyphs > from a different font (e.g. for cyrillic ) which aren=E2=80=99t availab= le in the mainfont of the document. > To set such a fallback font the code provides the \definefallbackfamily= command where you > can set in the fourth argument the range for the replacement characters= . > > \definefallbackfamily [mainface] [serif] [DejaVu Serif] [range=3Dcyrill= ic,force=3Dyes] > \definefontfamily [mainface] [serif] [TeX Gyre Pagella] > > \setupbodyfont[mainface] > > \starttext > > \input knuth > > =D0=A2=D1=80=D0=B0=D0=B4=D0=B8=D1=86=D0=B8=D0=BE=D0=BD=D0=BD=D0=B0=D1=8F= =D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D0=B0=D1=82=D0=B8=D0=BA=D0=B0 =D0=BB= =D0=B8=D1=88=D0=B0=D0=B9=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2 =D0=BE=D0=BA=D0=B0= =D0=B7=D1=8B=D0=B2=D0=B0=D0=B5=D1=82=D1=81=D1=8F =D0=B2=D0=BE =D0=BC=D0=BD= =D0=BE=D0=B3=D0=BE=D0=BC =D1=83=D1=81=D0=BB=D0=BE=D0=B2=D0=BD=D0=B0 =D0=B8 > > \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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _______________________________________________________________________= ____________ --------------030103050105040507030805 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Wolfgang,

Thanks for the update. I have a question, and I came across a bug.
Question: I need some keywords in a distinctively different font, which I accomplished by defining \kword as "\definesimplefont[kword][DejaVu Mono][size=3D13pt]". I looked throug= h font-sel.mkvi, but I did not see any way of implementing equivalents. (I still haven't learnt macros properly, though.) Can you please give me a hint on how I can do this with the latest fonts interface?

Bug: I prefer Euler font for math. This does not seem to work with the latest fonts interface.

Best regards,
Prash


On 10/10/13 20:02, Wolfgang Schuster wrote:
Hi all,

I=E2=80=99m happy to announce a new version of the simplefonts code. Thew=
 new version of the code
is a complete rewrite and brings many changes.

1. The module is now part of the core and no external module is needed an=
ymore.

2. The commands to select a font have changed to commands which fit bette=
r to context normal syntax.

3. I removed the keys to enable font expansion and protrusion, when you n=
eed them use \definefontfeature.


To use a font with the simplefonts code two ways are available. The first=
 method is to create
one or more typefaces and load it with \setupbodyfont. A complete example=
 for this is:

\definefontfamily [mainface] [serif] [DejaVu Serif]
\definefontfamily [mainface] [sans]  [DejaVu Sans]
\definefontfamily [mainface] [mono]  [DejaVu Sans Mono] [feature=3Dnone]
\definefontfamily [mainface] [math]  [TeX Gyre Pagella Math]

\setupbodyfont[mainface]

\starttext
\startlines
\rm DejaVu Serif
\ss DejaVu Sans
\tt DejaVu Sans Mono
\m{c^2 =3D a^2 + b^2}
\stoplines
\stoptext


The second method is similar to the old commands of the simplefonts modul=
e (e.g. \setmainfont)
where the font is enabled after it was set and no \setupbodyfont is neces=
sary. Below is a example
for this method but I recommend to avoid this method because it=E2=80=99s=
 slow when you set font a font
for each style in your document.

\setupfontfamily [serif] [DejaVu Serif]
\setupfontfamily [sans]  [DejaVu Sans]
\setupfontfamily [mono]  [DejaVu Sans Mono] [feature=3Dnone]
\setupfontfamily [math]  [TeX Gyre Pagella Math]

\starttext
\startlines
\rm DejaVu Serif
\ss DejaVu Sans
\tt DejaVu Sans Mono
\m{c^2 =3D a^2 + b^2}
\stoplines
\stoptext


Another feature of simplefonts is the ability to set a fallback font when=
 you need certain glyphs
from a different font (e.g. for cyrillic ) which aren=E2=80=99t available=
 in the mainfont of the document.
To set such a fallback font the code provides the \definefallbackfamily c=
ommand where you
can set in the fourth argument the range for the replacement characters.

\definefallbackfamily [mainface] [serif] [DejaVu Serif] [range=3Dcyrillic=
,force=3Dyes]
\definefontfamily     [mainface] [serif] [TeX Gyre Pagella]

\setupbodyfont[mainface]

\starttext

\input knuth

=D0=A2=D1=80=D0=B0=D0=B4=D0=B8=D1=86=D0=B8=D0=BE=D0=BD=D0=BD=D0=B0=D1=8F =
=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D0=B0=D1=82=D0=B8=D0=BA=D0=B0 =D0=BB=
=D0=B8=D1=88=D0=B0=D0=B9=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2 =D0=BE=D0=BA=D0=B0=
=D0=B7=D1=8B=D0=B2=D0=B0=D0=B5=D1=82=D1=81=D1=8F =D0=B2=D0=BE =D0=BC=D0=BD=
=D0=BE=D0=B3=D0=BE=D0=BC =D1=83=D1=81=D0=BB=D0=BE=D0=B2=D0=BD=D0=B0 =D0=B8

\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/m=
ailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextre=
v/
wiki     : http://contextgarden.net
_________________________________________________________________________=
__________

--------------030103050105040507030805-- --===============0704648070== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0704648070==--