From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82216 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: Re: square in Cambria font Date: Wed, 1 May 2013 08:05:12 +0000 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1367395530 19162 80.91.229.3 (1 May 2013 08:05:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 May 2013 08:05:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed May 01 10:05:30 2013 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 1UXS2c-0005lz-2P for gctc-ntg-context-518@m.gmane.org; Wed, 01 May 2013 10:05:30 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4D466101EA; Wed, 1 May 2013 10:05:29 +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 F8YbYfW8KWSZ; Wed, 1 May 2013 10:05:27 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1872D101E5; Wed, 1 May 2013 10:05:27 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 97AE1101E5 for ; Wed, 1 May 2013 10:05:25 +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 7pwnBo-R8Bb9 for ; Wed, 1 May 2013 10:05:24 +0200 (CEST) Original-Received: from filter1-utr.mf.surf.net (filter1-utr.mf.surf.net [195.169.124.152]) by balder.ntg.nl (Postfix) with ESMTP id 63CAF101E4 for ; Wed, 1 May 2013 10:05:14 +0200 (CEST) Original-Received: from HUB02.uva.nl (hub02.uva.nl [146.50.108.231]) by filter1-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r4185DYA018184 for ; Wed, 1 May 2013 10:05:13 +0200 Original-Received: from MBX02.uva.nl ([169.254.2.121]) by HUB02.uva.nl ([2002:9232:6ce7::9232:6ce7]) with mapi id 14.02.0342.003; Wed, 1 May 2013 10:05:12 +0200 Thread-Topic: [NTG-context] square in Cambria font Thread-Index: AQHORZVmg2uof7r7bUyToErc/K6zzZjvViNqgACCXgA= In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] Content-ID: <21C30FCC0986234E82CEF9A64D258BAD@uva.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.231; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 07Juw5dXF - fb806316a9f6 - 20130501 (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:82216 Archived-At: Thanks, this indeed produces a square more akin to boxtimes in Cambria. But= the situation seems even worse than I thought. Under the 40pt fontsize it = is apparent that lucidaot's square has a thinner outline then boxtimes. Of = the three fonts I tried (cambria, lmodern, lucidaot) it seems lmodern is th= e only one doing it right. Hans van der Meer On 1 May 2013, at 12:17 AM, Sietse Brouwer wrote: > Hello Hans, > = > The bad news: I think it's the font. The good news: here comes > MetaPost to the rescue! > = > I don't have Cambria, so I plucked a cambria.ttf file off the Internet > somewhere, which contains both Cambria and Cambria Math. I don't know > whether you have the same file/version, so YMMV, but it does exhibit > the problem you describe. > = > According to the lovely and free FontForge, > * the WHITE SQUARE glyph (U+25A1) is 1060 units high > * the SQUARED PLUS glyph (U+229E) is 1630 units high (of which 230 > below the baseline). > = > This is in Cambria Math =97 Cambria does does not have either of these > glyphs. I suspect the square size is a design decision: that the > designers decided they wanted the white square to match the letters > rather than the 'squared *' operators. > = > Anyway, here's a very close MetaPost approximation of the 'squared > plus' square, made by looking in with FontForge and copying the glyph > dimensions. (And then tweaking them because some things still didn't > look right; didn't manage to fix everything, alas.) It scales with the > font size. > = > Cheers, > Sietse > = > \setuppapersize[A7][A7] > \setuppagenumber[state=3Dstop] > \setupbodyfont[cambria,40pt] > = > \showframe > \showgrid > = > \startuseMPgraphic{square} > numeric u, strokewd, strokeht, sqwd, sqht; > u :=3D BodyFontSize / 2083; > strokewd :=3D 128u; > strokeht :=3D 123u; > sqwd :=3D 1506u; > sqht :=3D 1533u; > offset :=3D 200u; > pickup pensquare xscaled strokewd yscaled strokeht; > draw unitsquare xscaled sqwd yscaled sqht; > = > setbounds currentpicture to > boundingbox currentpicture > leftenlarged offset rightenlarged offset; > \stopuseMPgraphic > = > \def\mysquare{% > \lower \dimexpr \bodyfontsize / 2083 * 234 > \relax\hbox{\useMPgraphic{square}}% > } > = > %%%% try it out %%%% > = > \starttext > = > $\square+\mysquare\boxplus$ \crlf > $\mysquare\boxplus$ > = > \page[yes] > = > $+ \ruledhbox{\boxplus}$ \crlf > $+ \ruledhbox{\mysquare}$ \crlf > $\ruledhbox{\boxplus}$ \crlf > $\ruledhbox{\mysquare}$ > = > \stoptext > _________________________________________________________________________= __________ > 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-co= ntext > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > _________________________________________________________________________= __________ ___________________________________________________________________________= ________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________