From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79651 Path: news.gmane.org!not-for-mail From: Steve White Newsgroups: gmane.comp.tex.context Subject: Re: 'kern': TrueType table and GPOS lookup feature Date: Fri, 30 Nov 2012 10:58:25 +0100 Message-ID: References: <50B85B0E.1060703@web.de> <50B878C7.8080607@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=e89a8fb1ebc0d76fa904cfb37056 X-Trace: ger.gmane.org 1354269518 8498 80.91.229.3 (30 Nov 2012 09:58:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2012 09:58:38 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Nov 30 10:58:50 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TeNMs-0003wV-C8 for gctc-ntg-context-518@m.gmane.org; Fri, 30 Nov 2012 10:58:46 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8AA4C10301; Fri, 30 Nov 2012 10:58:34 +0100 (CET) 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 ikFY5oPUkT7y; Fri, 30 Nov 2012 10:58:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 4350B10224; Fri, 30 Nov 2012 10:58:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9321410224 for ; Fri, 30 Nov 2012 10:58:30 +0100 (CET) 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 rzbvPhMUnpvj for ; Fri, 30 Nov 2012 10:58:29 +0100 (CET) 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 EA3A8101E8 for ; Fri, 30 Nov 2012 10:58:28 +0100 (CET) Original-Received: from mail-oa0-f41.google.com (mail-oa0-f41.google.com [209.85.219.41]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qAU9pDdH008528 for ; Fri, 30 Nov 2012 10:51:14 +0100 Original-Received: by mail-oa0-f41.google.com with SMTP id k14so328952oag.14 for ; Fri, 30 Nov 2012 01:58:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WpLgpY1wevWPHHtOhHN4252dy015/PBbWebfWxVGqUY=; b=EFkQtzFhKvFgz0dZ5t4KnXSgOq5rggKGvISByGyKz4mLRPjP7mjTUzAUyeSKTT/ALP 11amoiLITRKWBeVwsFRj/47bPJtdHEAyj6Wj3iR357/GzXAPWhmxlcICYSvFN92eJfHj W1RnUX93RV73IR/gVEp8xiAXoStf6LzCTOHcH9AUygoW4YD+hX1vP4rggIQ4F9dXl5pv M8cmSkf/d06qwCBYW7YgejOmn6144xtzjR9p45YQctJXPfjAAj/qy5f712QHvu6L1QlM P2EBAl1aBdJYdiEkiUZNYTxRuxmRa719IPuMAI3kv73wkZqHGxXoWS6gLbFsspgWfJ5b GieA== Original-Received: by 10.60.31.195 with SMTP id c3mr536566oei.57.1354269506105; Fri, 30 Nov 2012 01:58:26 -0800 (PST) Original-Received: by 10.60.78.162 with HTTP; Fri, 30 Nov 2012 01:58:25 -0800 (PST) In-Reply-To: <50B878C7.8080607@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.219.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WItJPdVM - 597f4da5f042 - 20121130 (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:79651 --e89a8fb1ebc0d76fa904cfb37056 Content-Type: multipart/alternative; boundary=e89a8fb1ebc0d76fa404cfb37054 --e89a8fb1ebc0d76fa404cfb37054 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Hans, Pablo, et al. I'm the admin of GNU FreeFont. I'll respond to some of these points. 1) I have yet to reproduce Pablo's output PDF on either of two systems. As I am unfamiliar with ConTeXt, I can only guess how it was built. I tried the file quoted here as input to the 'context' command, but it chokes on the \showfontkerns line. It would help very much to have a working example with the proper command line to build it. 2) I understood that ConTeXt only uses the old-style TrueType 'kern' table, rather than the OpenType 'kern' GPOS lookup. If that is the case, I would suggest that you consider to change the logic to first use the OpenType lookup, and if it doesn't exist, fall back to the TrueType table. Several applications are already complaining that both exist; the plan is to drop support for the TrueType table in FreeFont. 3) In most applications, the script of a run of text is determined from the Unicode. This is the assumption made in FreeFont. The GNU FreeFont policy starts from its essence as a Unicode font, in which no particular script is default. (Some generic features that are not specific to any script, are in {dflt,dflt}.) There was a suggestion that Latin kerns should be activated by {script,lang}=3D{dflt,dflt}. Let me ask, should Devanagari kerns also be activated by {dflt, dflt}? If not, why? It appears that there maybe some conflict her with TeX implementaions. I don't completely understand this. Maybe we can find a solution. 4) I have written something like Pablo's test using XeTeX and fontspec. Kerning works very well with GNU FreeFont. Find attached. 5) There was also a report that OpenType kerning doesn't work in some E-Book readers (I know this isn't the forum for that, but ...) . My iriver Story kerns very nicely text in FreeSerif. Can I get an example of an E-reader for which kerning fails? (I really don't doubt that they exist!) Cheers! On Fri, Nov 30, 2012 at 10:13 AM, Hans Hagen wrote: > On 11/30/2012 8:06 AM, Pablo Rodr=EDguez wrote: > >> Hi there, >> >> sorry for bothering again with this issue, but I need to be sure in >> order to properly report to the font developer of FreeSerif. >> >> I have the following file: >> >> \usemodule[simplefonts][size=3D**25pt] >> \definefontfeature[latins][**default][script=3Dlatn] >> \setmainfont[FreeSerif] >> \starttext >> \showfontkerns >> dadedidodufafefifofufrflftlale**lilolutatetitotu\par >> \addfs{latins} >> dadedidodufafefifofufrflftlale**lilolutatetitotu\par >> \stoptext >> >> The first line has no GPOS kern enabled and the second line has it. >> >> In order to report it to the font developer (I have the problem not with >> ConTeXt, but with my ereader [I used ConTeXt to check the font >> features), I have the following questions: >> >> -In the example above, is the old TrueType kern enabled on the first lin= e? >> >> -If not, how can I enable it, without enabling the liga or kern OpenType >> features? >> >> I need this to see the actual kerning form the old TrueType kern table >> (I suspect it hasn't the same values as the OpenType kern feature). >> > > We don't really make a distinction. Kerns are either a property of a > character (truetype method) or are organized as lookups. Both are driven = by > 'kern' and it's not possible to choose a specific method as it's font > driven. In the first case, enabling the kern feature will also enable the > kerns and there is no dependency on language and script. In the second ca= se > a language script combination drives the injection of kerns. So, for each > combination there can be different kerns (won't happen often). > > Now, if a font designer decides to group kerns according to languages > (makes less sense than for instance grouping ligatures which do have a > dependency on languages) he/she has to make sure that it's done in such a > way that it doesn't lock out. > > For instance, you can have kerns (optionally in your font organized in > classes) that kerns latin characters and group them in latn/dflt and do > something similar for latn/ but then you expect the user to > choose the right combination. So, choosing latn/dflt can lock out greek o= r > whatever. This means that when one defines kerns for say devanagari but > also wants to have mixed in latin/* scripts supported, one could best als= o > enable latn/* kerns there (just add lookups to the feature specification)= . > > As the serif font you use has support for many scripts, extra care has to > be taken for mixed usage. Also, normally a dflt/dflt combination is defin= ed > (read: no script or language chosen) which should work out okay for most > cases. Anyhow, in the serif font (1) a dflt/dflt combination has to be > supported (added) and (2) you/someone needs to check if when you choose > greek, you still got kerning for latin. > > Hans > > ------------------------------**------------------------------**----- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | 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://tex.aanhet.net > archive : http://foundry.supelec.fr/**projects/contextrev/ > wiki : http://contextgarden.net > ______________________________**______________________________** > _______________________ > --e89a8fb1ebc0d76fa404cfb37054 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Hans, Pablo, et al.

I'm the admin of GNU FreeFont.=A0 I'l= l respond to some of these points.

1) I have yet to reproduce Pablo&= #39;s output PDF on either of two systems.=A0 As I am unfamiliar with ConTe= Xt, I can only guess how it was built.=A0 I tried the file quoted here as i= nput to the 'context' command, but it chokes on the \showfontkerns = line.=A0 It would help very much to have a working example with the proper = command line to build it.

2) I understood that ConTeXt only uses the old-style TrueType 'kern= ' table, rather than the OpenType 'kern' GPOS lookup.=A0 If tha= t is the case, I would suggest that you consider to change the=A0 logic to = first use the OpenType lookup, and if it doesn't exist, fall back to th= e TrueType table. Several applications are already complaining that both ex= ist; the plan is to drop support for the TrueType table in FreeFont.

3) In most applications, the script of a run of text is determined from= the Unicode.=A0 This is the assumption made in FreeFont.=A0 The GNU FreeFo= nt policy starts from its essence as a Unicode font, in which no particular= script is default. (Some generic features that are not specific to any scr= ipt, are in {dflt,dflt}.)

There was a suggestion that Latin kerns should be activated by {script,= lang}=3D{dflt,dflt}.=A0 Let me ask, should Devanagari kerns also be activat= ed by {dflt, dflt}?=A0 If not, why?

It appears that there maybe some= conflict her with TeX implementaions.=A0 I don't completely understand= this.=A0 Maybe we can find a solution.

4) I have written something like Pablo's test using XeTeX and fonts= pec.=A0 Kerning works very well with GNU FreeFont.=A0 Find attached.=A0
5) There was also a report that OpenType kerning doesn't work in s= ome E-Book readers (I know this isn't the forum for that, but ...) .=A0= My iriver Story kerns very nicely text in FreeSerif.=A0 Can I get an examp= le of an E-reader for which kerning fails?=A0 (I really don't doubt tha= t they exist!)

Cheers!



On Fri, Nov 30, 2012 at 10:13 AM, Hans Hagen <pragma@wxs.nl> wrote:
On 11/30/2012 8:06 AM, Pablo Rodr=EDguez wro= te:
Hi there,

sorry for bothering again with this issue, but I need to be sure in
order to properly report to the font developer of FreeSerif.

I have the following file:

\usemodule[simplefonts][size=3D25pt]
\definefontfeature[latins][default][script=3Dlatn]
\setmainfont[FreeSerif]
\starttext
\showfontkerns
dadedidodufafefifofufrflftlalelilolutatetitotu\par
\addfs{latins}
dadedidodufafefifofufrflftlalelilolutatetitotu\par
\stoptext

The first line has no GPOS kern enabled and the second line has it.

In order to report it to the font developer (I have the problem not with ConTeXt, but with my ereader [I used ConTeXt to check the font
features), I have the following questions:

-In the example above, is the old TrueType kern enabled on the first line?<= br>
-If not, how can I enable it, without enabling the liga or kern OpenType features?

I need this to see the actual kerning form the old TrueType kern table
(I suspect it hasn't the same values as the OpenType kern feature).

We don't really make a distinction. Kerns are either a property of a ch= aracter (truetype method) or are organized as lookups. Both are driven by &= #39;kern' and it's not possible to choose a specific method as it&#= 39;s font driven. In the first case, enabling the kern feature will also en= able the kerns and there is no dependency on language and script. In the se= cond case a language script combination drives the injection of kerns. So, = for each combination there can be different kerns (won't happen often).=

Now, if a font designer decides to group kerns according to languages (make= s less sense than for instance grouping ligatures which do have a dependenc= y on languages) he/she has to make sure that it's done in such a way th= at it doesn't lock out.

For instance, you can have kerns (optionally in your font organized in clas= ses) that kerns latin characters and group them in latn/dflt and do somethi= ng similar for latn/<anylanguage> =A0but then you expect the user to = choose the right combination. So, choosing latn/dflt can lock out greek or = whatever. This means that when one defines kerns for say devanagari but als= o wants to have mixed in latin/* scripts supported, one could best also ena= ble latn/* kerns there (just add lookups to the feature specification).

As the serif font you use has support for many scripts, extra care has to b= e taken for mixed usage. Also, normally a dflt/dflt combination is defined = (read: no script or language chosen) which should work out okay for most ca= ses. Anyhow, in the serif font (1) a dflt/dflt combination has to be suppor= ted (added) and (2) you/someone needs to check if when you choose greek, yo= u still got kerning for latin.

Hans

-------------------------------------------------------------= ----
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 Hans Hagen | PRAGMA ADE
=A0 =A0 =A0 =A0 =A0 =A0 =A0 Ridderstraat 27 | 8061 GH Hasselt | The Netherl= ands
=A0 =A0 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0| ww= w.pragma-pod.nl
-------------------------------------------------------------= ----
_____________________________________________________________= ______________________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0:
http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/ wiki =A0 =A0 : http:= //contextgarden.net
_____________________________________________________________= ______________________

--e89a8fb1ebc0d76fa404cfb37054-- --e89a8fb1ebc0d76fa904cfb37056 Content-Type: application/x-tex; name="kern-xetex.tex" Content-Disposition: attachment; filename="kern-xetex.tex" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ha54ysjl0 JSBVc2UgeGVs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bGFsZWxpbG9sdXRhdGV0aXRvdHV9 fQp9CgpcdGV4dGJme3dpdGggTGlnYXR1cmVzPU5vQ29tbW9ufQoKe1xhZGRmb250ZmVhdHVyZXtM aWdhdHVyZXM9Tm9Db21tb259XGh1Z2UKZGFkZWRpZG9kdWZhZmVmaWZvZnVmcmZsZnRsYWxlbGls b2x1dGF0ZXRpdG90dSBcXApcdGV4dGl0e2RhZGVkaWRvZHVmYWZlZmlmb2Z1ZnJmbGZ0bGFsZWxp bG9sdXRhdGV0aXRvdHV9IFxcClx0ZXh0YmZ7ZGFkZWRpZG9kdWZhZmVmaWZvZnVmcmZsZnRsYWxl bGlsb2x1dGF0ZXRpdG90dX0gXFwKXHRleHRpdHtcdGV4dGJme2RhZGVkaWRvZHVmYWZlZmlmb2Z1 ZnJmbGZ0bGFsZWxpbG9sdXRhdGV0aXRvdHV9fQp9ClxlbmR7ZG9jdW1lbnR9Cg== --e89a8fb1ebc0d76fa904cfb37056 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 ___________________________________________________________________________________ --e89a8fb1ebc0d76fa904cfb37056--