From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/87262 Path: news.gmane.org!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: Re: Calling fonts (was: Hebrew vowel placement in ConTeXt) Date: Mon, 05 May 2014 14:37:30 -0400 Message-ID: <5367DA6A.7060501@rik.users.panix.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1254542537==" X-Trace: ger.gmane.org 1399403101 29500 80.91.229.3 (6 May 2014 19:05:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 May 2014 19:05:01 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue May 06 21:04:56 2014 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 1Whicq-0008Mz-Jb for gctc-ntg-context-518@m.gmane.org; Tue, 06 May 2014 18:53:52 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A4A8110268 for ; Mon, 5 May 2014 20:38:02 +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 dxgVAyqGTmEX for ; Mon, 5 May 2014 20:38:02 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 50EB510229 for ; Mon, 5 May 2014 20:37:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B18F4101E2 for ; Mon, 5 May 2014 20:37:52 +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 42nfeSc13Y9z for ; Mon, 5 May 2014 20:37:45 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 32517101E1 for ; Mon, 5 May 2014 20:37:35 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s45IbWT9029436 for ; Mon, 5 May 2014 20:37:33 +0200 Original-Received: from [192.168.201.179] (cpe-67-240-55-150.nycap.res.rr.com [67.240.55.150]) by mailbackend.panix.com (Postfix) with ESMTP id B089D32896 for ; Mon, 5 May 2014 14:37:31 -0400 (EDT) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=166.84.1.89; country=US; region=New York; city=Richmond Hill; latitude=40.7005; longitude=-73.8345; http://maps.google.com/maps?q=40.7005,-73.8345&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WLWiBxxc - 45ff7730ec3e - 20140505 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 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:87262 Archived-At: This is a multi-part message in MIME format. --===============1254542537== Content-Type: multipart/alternative; boundary="------------080706080307000306080909" This is a multi-part message in MIME format. --------------080706080307000306080909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2014-05-05 11:29, Michael Ash wrote: > > ... see message 56606 > > in the > list archive. This is not the post-simplefonts solution, but the > pre-simplefonts solution. It does allow much better control over > all of > the fonts that make up the typeface (using ConTeXt terminology). > > If you set only some Hebrew/Aramaic/Arabic, and especially if you > do not > need font variants (bold, italic, ...) you might prefer to define a > single font. > > > Thank you very much again. This was helpful, and here is my minimal > working example: > > > \definefontfeature[hebrew][default][script=hebr,ccmp=yes] > \definefont [myhebrew] [SILEOTSR.ttf*hebrew] > \setupdirections[bidi=on,method=two] > > \starttext > Here is the first line of the Bible. > > {\myhebrew ???????????? ??????? ????????? ???? ???????????? ?????? > ????????: } > \stoptext > > > > I still have some questions. It took me a long time to understand that > > \definefont [myhebrew] [SILEOTSR.ttf*hebrew] > > would use the fontfeature "hebrew" that I had defined together with > the font file SILEOTSR.ttf and assign this pairing to the nickname > "myhebrew". Rik's example also has "sa 1" which I do not understand. > > \definefontfeature [aramaic] [default][ccmp=yes,script=hebr] > \definefont [aramaic] [KeterYG-Medium.ttf*aramaic sa 1] > > Is the syntax for definefont using "*" documented somewhere? Is it > similar to definefontsynonym at > http://wiki.contextgarden.net/Fonts_in_LuaTeX (and below)? > > > I also do not understand the full syntax from the referenced message. > Here is my best effort to annotate it, but I would appreciate > corrections or additions > > %% The following defines the fontfeature "hebrew" > %% which can then be applied to a font. > %% definefontfeature is documented at > %%http://wiki.contextgarden.net/Command/definefontfeature > %% and the available features are specific to the font > %% e.g.http://www.microsoft.com/typography/otspec/featurelist.htm > \definefontfeature[hebrew][default][script=hebr,ccmp=yes,mark=yes] > > %% I am confused below. When was font:fallback:serif defined? > > > %% Why file: but features= ? > %% How will the fontsynonym "Serif" function? > \starttypescript [serif] [ezrasil] > \setups[font:fallback:serif] > \definefontsynonym [Serif] [file:sileot] [features=hebrew] > \stoptypescript > > %% Still confused > \starttypescript [ezrasil] > \definetypeface [ezrasil] [rm] [serif] [ezrasil] [default] > \quittypescriptscanning > \stoptypescript > > %% Sets the main body to the font > %% that has been named and given features > \setupbodyfont[ezrasil] > %% Would an alternative at this point be to use > %% \definefont [myezrasil] [ezrasil] > > > %% to define a single font and then use {\myezrasil????????????}for short passages > > > \setupalign[r2l] > > \starttext > ???????????? ??????? ????????? ???? ???????????? ?????? ????????: > \stoptext Michael, Wolfgang already answered most of your questions, at least by the expedient means of teaching a man to fish. However, not all of the questions are answered in the font manuals, and in particular your question about the font fallbacks. (The word setups does not appear in mfonts, and fallback appears once. In the MKIV font manual setups appears once and fallback thrice. None provide your answer.) Font definition in ConTeXt allows extreme degrees of indirection. There is a lot of flexibility that follows from this. By defining synonyms such as serif and serifbold and using these in the document, the document can be written independently of the actual fonts used. The names are to some degree arbitrary, but used conventionally. There is nothing stopping you from placing a sans font at the end of a chain of serif references. Setups are at their simplest a way to bundle other commands for reuse. They also provide a namespace mechanism and a mechanism for group setting and resetting of values. The ConTeXt source file type-fbk.mkiv (and undoubtedly something similar for MKII) defines a set of font name synonyms in a font:fallback: namespace that is useful for gracefully substituting one font for another when required, as when the document calls for a bold italic but the font in use does not have that style. You can leave this out, or define your own fallback hierarchy if you wish. So, the first part of the typescript above defines ezrasil as a synonym for the serif face and associates it with the file sileot and certain otf features labeled hebrew. The file naming and search mechanism are well described in the manuals. The setups brings in the standard set of substitutions that will be applied when the document calls for serif styles that the specific font does not offer. The second part of the typescript defines another synonym (confusingly also ezrasil) for the typeface and includes in it only a roman face definition. In a latin script there would likely be another definetypeface for the sans face, another for the mono face, and a fourth for the math face. Setupbodyfont uses the name of a typeface so defined. (You can see that this is a separate synonym by substituting \starttypescript [bart] \definetypeface [bart] [rm] [serif] [ezrasil] [default] \quittypescriptscanning \stoptypescript \setupbodyfont[bart] for the similar lines further above.) With a latin face there would have been additional occurrences of the first part of the typescript as well for each of the different face variants. As to why I have "sa 1" (scale at 1) in the KeterYG definition: This is not needed, but it serves as a reminder that I have evaluated the font and that this scale is okay for me. I find that when I mix fonts, it helps to adjust the sizes. Ezra SIL needs to be scaled to 0.85 or so, but of course that depends on the other fonts in use and one's own taste. (In LaTeX, the fontspec package provides a mechanism to automatically scale fonts to match the x-height or full height of one font to another. The process is manual here.) I'll step aside now and let those who know better correct me. -- Rik --------------080706080307000306080909 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 2014-05-05 11:29, Michael Ash wrote:
... see message 56606
<http://www.mail-archive.com/ntg-context%40ntg.nl/msg56606.html> in the
list archive. This is not the post-simplefonts solution, but the
pre-simplefonts solution. It does allow much better control over all of
the fonts that make up the typeface (using ConTeXt terminology).
 
If you set only some Hebrew/Aramaic/Arabic, and especially if you do not
need font variants (bold, italic, ...) you might prefer to define a
single font. 

Thank you very much again.  This was helpful, and here is my minimal working example:


\definefontfeature[hebrew][default][script=hebr,ccmp=yes]
\definefont [myhebrew] [SILEOTSR.ttf*hebrew] 
\setupdirections[bidi=on,method=two]

\starttext
Here is the first line of the Bible.

{\myhebrew  בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃  }
\stoptext



I still have some questions.  It took me a long time to understand that

\definefont [myhebrew] [SILEOTSR.ttf*hebrew] 

would use the fontfeature "hebrew" that I had defined together with the font file SILEOTSR.ttf and assign this pairing to the nickname "myhebrew".  Rik's example also has "sa 1" which I do not understand. 

\definefontfeature [aramaic] [default][ccmp=yes,script=hebr]
\definefont [aramaic] [KeterYG-Medium.ttf*aramaic sa 1]

Is the syntax for definefont using "*" documented somewhere?  Is it similar to definefontsynonym at http://wiki.contextgarden.net/Fonts_in_LuaTeX  (and below)?


I also do not understand the full syntax from the referenced message.  Here is my best effort to annotate it, but I would appreciate corrections or additions

%% The following defines the fontfeature "hebrew" 
%% which can then be applied to a font.
%% definefontfeature is documented at
%% http://wiki.contextgarden.net/Command/definefontfeature
%% and the available features are specific to the font
%% e.g. http://www.microsoft.com/typography/otspec/featurelist.htm
\definefontfeature[hebrew][default][script=hebr,ccmp=yes,mark=yes]

%% I am confused below.  When was font:fallback:serif defined?


%% Why file: but features= ?
%% How will the  fontsynonym "Serif" function?
\starttypescript [serif] [ezrasil]
  \setups[font:fallback:serif]
  \definefontsynonym [Serif] [file:sileot] [features=hebrew]
\stoptypescript

%% Still confused
\starttypescript [ezrasil]
  \definetypeface  [ezrasil] [rm] [serif] [ezrasil] [default]
  \quittypescriptscanning
\stoptypescript

%% Sets the main body to the font 
%% that has been named and given features
\setupbodyfont[ezrasil]
%% Would an alternative at this point be to use
%% \definefont [myezrasil] [ezrasil] 
%% to define a single font and  then use {\myezrasil בְּרֵאשִׁ֖ית}  for short passages


\setupalign[r2l]

\starttext
בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃  
\stoptext

            

Michael,

Wolfgang already answered most of your questions, at least by the expedient means of teaching a man to fish. However, not all of the questions are answered in the font manuals, and in particular your question about the font fallbacks. (The word setups does not appear in mfonts, and fallback appears once. In the MKIV font manual setups appears once and fallback thrice. None provide your answer.)

Font definition in ConTeXt allows extreme degrees of indirection. There is a lot of flexibility that follows from this. By defining synonyms such as serif and serifbold and using these in the document, the document can be written independently of the actual fonts used. The names are to some degree arbitrary, but used conventionally. There is nothing stopping you from placing a sans font at the end of a chain of serif references.

Setups are at their simplest a way to bundle other commands for reuse. They also provide a namespace mechanism and a mechanism for group setting and resetting of values.

The ConTeXt source file type-fbk.mkiv (and undoubtedly something similar for MKII) defines a set of font name synonyms in a font:fallback: namespace that is useful for gracefully substituting one font for another when required, as when the document calls for a bold italic but the font in use does not have that style. You can leave this out, or define your own fallback hierarchy if you wish.

So, the first part of the typescript above defines ezrasil as a synonym for the serif face and associates it with the file sileot and certain otf features labeled hebrew. The file naming and search mechanism are well described in the manuals. The setups brings in the standard set of substitutions that will be applied when the document calls for serif styles that the specific font does not offer.

The second part of the typescript defines another synonym (confusingly also ezrasil) for the typeface and includes in it only a roman face definition. In a latin script there would likely be another definetypeface for the sans face, another for the mono face, and a fourth for the math face.  Setupbodyfont uses the name of a typeface so defined. (You can see that this is a separate synonym by substituting
\starttypescript [bart]
  \definetypeface  [bart] [rm] [serif] [ezrasil] [default]
  \quittypescriptscanning
\stoptypescript
\setupbodyfont[bart]
for the similar lines further above.) With a latin face there would have been additional occurrences of the first part of the typescript as well for each of the different face variants.

As to why I have "sa 1" (scale at 1) in the KeterYG definition: This is not needed, but it serves as a reminder that I have evaluated the font and that this scale is okay for me. I find that when I mix fonts, it helps to adjust the sizes. Ezra SIL needs to be scaled to 0.85 or so, but of course that depends on the other fonts in use and one's own taste. (In LaTeX, the fontspec package provides a mechanism to automatically scale fonts to match the x-height or full height of one font to another. The process is manual here.)

I'll step aside now and let those who know better correct me.

--
Rik
--------------080706080307000306080909-- --===============1254542537== 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 ___________________________________________________________________________________ --===============1254542537==--