From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/90809 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Selecting fonts using the built-in simplefonts module Date: Sun, 29 Mar 2015 22:57:27 +0200 Message-ID: <78286512-B0CA-43E7-96E5-549CC581188F@gmail.com> References: <20150329124001.GY30678@darjiling> <4F197B16-5B9A-41CB-8E76-AD12C68D5F66@gmail.com> <5518456A.7020008@googlemail.com> <12DC7A91-4A01-4A28-B578-4327CBC64083@gmail.com> <55186090.1000704@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/mixed; boundary="===============0235603860==" X-Trace: ger.gmane.org 1427662705 17395 80.91.229.3 (29 Mar 2015 20:58:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Mar 2015 20:58:25 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 29 22:58:14 2015 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 1YcKHa-0007He-ID for gctc-ntg-context-518@m.gmane.org; Sun, 29 Mar 2015 22:58:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B17BD10200 for ; Sun, 29 Mar 2015 22:58: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 MQBBuSVXF1N6 for ; Sun, 29 Mar 2015 22:58:08 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id DA56C10202 for ; Sun, 29 Mar 2015 22:57:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 84B46101FE for ; Sun, 29 Mar 2015 22:57:34 +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 WhzWATlTbxYZ for ; Sun, 29 Mar 2015 22:57:33 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 6C0A7101FD for ; Sun, 29 Mar 2015 22:57:33 +0200 (CEST) Original-Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t2TKvW6Z009775 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 29 Mar 2015 22:57:32 +0200 Original-Received: by wgbgs4 with SMTP id gs4so59426265wgb.0 for ; Sun, 29 Mar 2015 13:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=QOyZKRGg9Fjrzd+YsCiroCjfqmheNLqnppvYSH43G7o=; b=bTn/5yzDitImO47eKcrbh8i4PndUytNQL3250dqVcCQ9qY8p5z2VZSzi/dFE+rxrp7 C6yIeUi4Iz3Upvon+nbVWghVawB8pszFDel/UQMwt0Y6+xsytdjOgnkoaP1bbToReVzc FiKNfrWXesUCKJ2ZmwZ/MKAUaSuqDxVdwxksEAOb0tM5jAZlBuidjDqdUpH2a/y2aaZk sSlutdK+qTSuWADDB/tuBoJP5DM3uaccCyiccIkWGfDNTZwmspaSTpDPmuSxd8rWwqYG sn26gwWK1ehL95znR8lOfALtFXWOHf1CKtTHQFFiHeHvDJlzRkq2Yf1nPjWop+GBYOoE wHjw== X-Received: by 10.194.192.167 with SMTP id hh7mr57197866wjc.151.1427662651899; Sun, 29 Mar 2015 13:57:31 -0700 (PDT) Original-Received: from keima.localdomain (x2f349c0.dyn.telefonica.de. [2.243.73.192]) by mx.google.com with ESMTPSA id fo8sm12693003wib.14.2015.03.29.13.57.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Mar 2015 13:57:31 -0700 (PDT) In-Reply-To: <55186090.1000704@googlemail.com> X-Mailer: Apple Mail (2.2070.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c00::236; country=IE; latitude=53.3478; longitude=-6.2597; http://maps.google.com/maps?q=53.3478,-6.2597&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TO9wVww3 - c6e021112839 - 20150329 Received-SPF: pass (filter2-til.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c00::236 as permitted sender) receiver=filter2-til.mf.surf.net; client-ip=2a00:1450:400c:c00::236; envelope-from=; helo=mail-wg0-x236.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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" X-Spam-Report: 5.0 points; * 3.2 RCVD_ILLEGAL_IP Received: contains illegal IP address * 0.0 HTML_MESSAGE BODY: HTML included in message * 1.8 MIME_QP_LONG_LINE RAW: Quoted-printable line longer than 76 chars Xref: news.gmane.org gmane.comp.tex.context:90809 Archived-At: --===============0235603860== Content-Type: multipart/alternative; boundary="Apple-Mail=_44216318-899E-4F53-8CE8-25EB8017A3D9" --Apple-Mail=_44216318-899E-4F53-8CE8-25EB8017A3D9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 29.03.2015 um 22:29 schrieb J=C3=B6rg Weger = : >=20 >=20 >=20 > On 29.03.2015 21:31, Wolfgang Schuster wrote: >>=20 >>> Am 29.03.2015 um 20:33 schrieb J=C3=B6rg Weger = >>> >>: >>>=20 >>>> You need the familyname of the font, you use the font manager of = your OS >>>> to get the name. >>>>=20 >>>> \definefontfamily [junction] [rm] [Junction] >>>> \definefontfamily [junction] [mm] [Latin Modern Math] >>>>=20 >>>> \definefontfamily [junction-light] [rm] [Junction] >>>> [tf=3Dstyle:light,bf=3Dstyle:regular] >>>=20 >>> I just had it made working this way: >>>=20 >>> \definefontfamily[mainface] >>> [ss] >>> [EgalobhierFarinUrlaubodersonstwasoderwersteht] >>> [tf=3DJunction Light, bf=3DJunction Regular] >>=20 >> \definefontfamily [mainface] [ss] [Junction] [tf=3D* Light,bf=3D* = Regular] >>=20 >>> It seems that as soon as you define your own weights (which you can >>> mix from different font families) in the fourth pair of brackets, >>> there can be anything in the third pair of brackets (family name). >>>=20 >>> \definefontfamily[mainface] >>> [sans] >>> [Anything] >>> [regularfont=3DJunction Light, boldfont=3DJunction Regular] >>>=20 >>> works as well and is more self-explaining. >>=20 >> This will only work when you set a upright font or you will get = problems. >>=20 >=20 > What problems do you mean? When you write nonsense as font name without setting a upright font = nothing will show up in your document because the fonts aren=E2=80=99t = loaded. > The following seems to work, only that there is a fallback to the = fonts defined as upright fonts (which are in fact italic fonts) for the = \em parts which seems to be the default behaviour if no italic fonts are = defined in the fourth bracket pair: The \em command uses the slanted and not the italic alternative by = default. When there is no italic or slanted style in the font the regular style = is used and when there is no bolditalic or boldslanted style the bold = style is used. > %%% MWE %%%%%%%%%%%%%%%%%%%% >=20 > = \definefontfamily[mainface][ss][EgalobhierFarinUrlaubodersonstwassteht][tf= =3DRoboto Light Italic, bf=3DRoboto Black Italic] >=20 > \setupbodyfont[mainface,9pt] >=20 >=20 > \starttext >=20 > \ss \input lorem >=20 > \ss \bf \input lorem >=20 > \ss \tf \em \input lorem >=20 > \ss \bf \em \input lorem >=20 > \stoptext >=20 >=20 > %%%%%%%%%% End of MWE %%%%%%%%% >=20 >=20 > Of course these font definitions do not make much sense but they work = as I had expected from previous observations. And of course you should = define all styles (\rm, \ss, \mm). You don=E2=80=99t need a serif and a sans font in your document, one of = them is enough but math should be always present because some symbols = like bullets (but you can force context to take them from the text font) = are taken from math. >>> An advantage of your way >>>=20 >>> > \definefontfamily [junction-light] [rm] [Junction] >>> > [tf=3Dstyle:light,bf=3Dstyle:regular] >>>=20 >>> is that you have to type the family name only once if you re-define >>> weights from the same family. >>=20 >> When you use the keywords for the style you don=E2=80=99t have to = look for the >> right names and simpelfonts has fallbacks when the requested style = isn=E2=80=99t >> available. >=20 > That is a nice option. >=20 >>=20 >>> Are there any reasons why one should not use any of all those = synonyms? >>=20 >> What do you mean? >=20 > I mean that for example inside the second bracket pair =E2=80=9Crm=E2=80= =9D equals =E2=80=9Cserif=E2=80=9D, =E2=80=9Dss=E2=80=9C equals = =E2=80=9Csans=E2=80=9D etc., in the fourth bracket pair = =E2=80=9Cregularfont=E2=80=9D equals =E2=80=9Ctf=E2=80=9D etc. >=20 > Are there recommendations to not use some of those apart from personal = taste? Or is =E2=80=9Crm=E2=80=9D simply a shorter plain TeX heritage = while =E2=80=9Cserif=E2=80=9D is more self-explaining? It doesn=E2=80=99t matter whether you use rm or serif in the second = argument because the argument is checked and converted to a internal = name. Wolfgang= --Apple-Mail=_44216318-899E-4F53-8CE8-25EB8017A3D9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 29.03.2015 um 22:29 schrieb J=C3=B6rg Weger <joerg73.muc@googlemail.com>:



On 29.03.2015 21:31, Wolfgang Schuster = wrote:

Am = 29.03.2015 um 20:33 schrieb J=C3=B6rg Weger <joerg73.muc@googlemail.com
<mailto:joerg73.muc@googlemail.com>>:

You need = the familyname of the font, you use the font manager of your OS
to get the name.

\definefontfamily= [junction] [rm] [Junction]
\definefontfamily [junction] = [mm] [Latin Modern Math]

\definefontfamily = [junction-light] [rm] [Junction]
[tf=3Dstyle:light,bf=3Dstyle:regular]

I just had it made working this = way:

\definefontfamily[mainface]
[ss]
[EgalobhierFarinUrlaubodersonstwasoderwersteht]
[tf=3DJunction Light, bf=3DJunction Regular]

\definefontfamily [mainface] [ss] = [Junction] [tf=3D* Light,bf=3D* Regular]

It seems that as soon as = you define your own weights (which you can
mix from = different font families) in the fourth pair of brackets,
there can be anything in the third pair of brackets (family = name).

\definefontfamily[mainface]
[sans]
[Anything]
[regularfont=3DJunction Light, boldfont=3DJunction = Regular]

works as well and is more = self-explaining.

This will = only work when you set a upright font or you will get problems.


What problems do you mean?

When you = write nonsense as font name without setting a upright font nothing will = show up in your document because the fonts aren=E2=80=99t = loaded.

The following seems to = work, only that there is a fallback to the fonts defined as upright = fonts (which are in fact italic fonts) for the \em parts which seems to = be the default behaviour if no italic fonts are defined in the fourth = bracket pair:

The \em = command uses the slanted and not the italic alternative by = default.

When there is no italic or = slanted style in the font the regular style is used and when there is no = bolditalic or boldslanted style the bold style is used.

%%% MWE %%%%%%%%%%%%%%%%%%%%

\definefontfamily[mainface][ss][EgalobhierFarinUrlaubodersonstw= assteht][tf=3DRoboto Light Italic, bf=3DRoboto Black Italic]

\setupbodyfont[mainface,9pt]


\starttext

\ss \input lorem

\ss \bf \input lorem

\ss \tf \em \input lorem

\ss \bf \em \input lorem

\stoptext


%%%%%%%%%% End of MWE %%%%%%%%%


Of course these font definitions do not make = much sense but they work as I had expected from previous observations. = And of course you should define all styles (\rm, \ss, \mm).

You don=E2=80= =99t need a serif and a sans font in your document, one of them is = enough but math should be always present because some symbols like = bullets (but you can force context to take them from the text font) are = taken from math.

An advantage of your way

> = \definefontfamily [junction-light] [rm] [Junction]
> = [tf=3Dstyle:light,bf=3Dstyle:regular]

is = that you have to type the family name only once if you re-define
weights from the same family.

When you use the keywords for the style you don=E2=80=99t = have to look for the
right names and simpelfonts has = fallbacks when the requested style isn=E2=80=99t
available.

That is a nice option.


Are there any reasons = why one should not use any of all those synonyms?

What do you mean?

I mean that for example = inside the second bracket pair =E2=80=9Crm=E2=80=9D equals =E2=80=9Cserif=E2= =80=9D, =E2=80=9Dss=E2=80=9C equals =E2=80=9Csans=E2=80=9D etc., in the = fourth bracket pair =E2=80=9Cregularfont=E2=80=9D equals =E2=80=9Ctf=E2=80= =9D etc.

Are there recommendations = to not use some of those apart from personal taste? Or is =E2=80=9Crm=E2=80= =9D simply a shorter plain TeX heritage while =E2=80=9Cserif=E2=80=9D is = more self-explaining?

It doesn=E2=80=99t matter whether you use rm or serif in the = second argument because the argument is checked and converted to a = internal name.

Wolfgang
= --Apple-Mail=_44216318-899E-4F53-8CE8-25EB8017A3D9-- --===============0235603860== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0235603860==--