From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50827 Path: news.gmane.org!not-for-mail From: Dohyun Kim Newsgroups: gmane.comp.tex.context Subject: Re: MkIV italic correction? Date: Wed, 27 May 2009 13:34:57 +0900 Message-ID: References: <20090520062507.GA4330@Fity> <4A152521.5070406@wxs.nl> <20090521132031.GA27281@khaled-laptop> <4A166F8F.4020003@elvenkind.com> <4A1682EC.1000201@wxs.nl> <4A168B4D.6010702@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1243398957 8060 80.91.229.12 (27 May 2009 04:35:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2009 04:35:57 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 27 06:35:55 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1M9Arr-00018r-2Y for gctc-ntg-context-518@m.gmane.org; Wed, 27 May 2009 06:35:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 48AF11FD60; Wed, 27 May 2009 06:35:54 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09904-01; Wed, 27 May 2009 06:35:10 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BAAD31FDD9; Wed, 27 May 2009 06:35:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4D7581FDD9 for ; Wed, 27 May 2009 06:35:09 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03587-01 for ; Wed, 27 May 2009 06:34:59 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by ronja.ntg.nl (Postfix) with ESMTP id 06BC61FD60 for ; Wed, 27 May 2009 06:34:59 +0200 (CEST) Original-Received: from mail-qy0-f103.google.com (mail-qy0-f103.google.com [209.85.221.103]) by filter3-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4R4YoRK010982 for ; Wed, 27 May 2009 06:34:51 +0200 Original-Received: by qyk1 with SMTP id 1so5829293qyk.16 for ; Tue, 26 May 2009 21:34:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=/eVGzmzsviwkvYG/L+boUlZTRKHKFYc+bVmfIqdrc2s=; b=tmm/BnPbh4WyRT2iYZXdEYNu24T5lW7L471ne1YyHgKbtD/U2Dzhcklb1JeYEFa2q8 ndvlFA5p8Fs8iVrt7hdEbCqqWgO2hgI2y+aaVHKNO+Xsy0OgpWZFhjMAb+CyHMn/eN9/ UnlJa/+oYb1bZ5rNAvpCnmb6XRgJX4BxRt0z8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qzNlYfat1GWTZbGMYSiDZ5R4W9x7/77fEMdRI2dnVmEGokm/ycD3KmC/A2Nvjnaopc IkyIU8PQs43MEEgxGKQoNAUeWEs759hPoZbXEICjH6llk91ZBLXT2xQmWtcNKc8H92Wa U/S7b/hddEXK2n0fLRtbe5WcPxlmhT9CkDWDw= Original-Received: by 10.224.80.142 with SMTP id t14mr8716743qak.347.1243398897208; Tue, 26 May 2009 21:34:57 -0700 (PDT) In-Reply-To: <4A168B4D.6010702@elvenkind.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.221.103; 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: 232395228 - b0676cbd9749 - 20090527 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:50827 Archived-At: 2009/5/22 Taco Hoekwater : > > > Hans Hagen wrote: >> Taco Hoekwater wrote: >>> >>> Khaled Hosny wrote: >>>> Not very helpful in this situation, but FontForge has a non-standard >>>> italic correction (ITLC) table[1], may be TeX related OpenTyp font >>>> projects like Latin Modern and Gyre fonts can use it? >>> >>> That would perhaps not be a bad idea. If that table is there then >>> luatex will automatically use it (it is a subtable of 'TeX ', which >>> also contains height and depth information, and font dimensions). >> >> so, that data would end up in a regular feature/lookup? of is it an >> entry in the glyph? > > They are automatically merged into the glyph, as > > =A0 =A0 =A0 =A0glyph.italic_correction > =A0 =A0 =A0 =A0glyph.tex_height > =A0 =A0 =A0 =A0glyph.tex_depth > Hi, Considering current state that we don't know any fonts that has ITLC table, it would be better than nothing to implement italic correction as follows. In the following code, "fontdata" is a table returned by the function "fonts.define.read". local param =3D fontdata.parameters local italicangle =3D fontdata.shared.otfdata.metadata.italicangle if italicangle and italicangle < 0 then local uwidth =3D fontdata.shared.otfdata.metadata.uwidth or 40 local factor =3D fontdata.factor or 655.36 param.slant =3D - math.tan(italicangle*math.pi/180) * param.quad for i,v in pairs(fontdata.characters) do local gl =3D fontdata.descriptions[i] local it =3D (gl.boundingbox[3] - gl.width + uwidth*0.5) * = factor if it > 0 then v.italic =3D it end end end Best, Dohyun Kim ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________