From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/64451 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: bold small caps Date: Sun, 12 Dec 2010 17:07:03 +0100 Message-ID: References: <20101211224016.GA19735@micropit.couberia.bzh> <20101211231209.GA20105@micropit.couberia.bzh> <7D80EFE8-87AB-4BA5-B295-45F5B8B0D7CF@gmail.com> <20101212162244.55a2f946@glyph> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1292170122 2440 80.91.229.12 (12 Dec 2010 16:08:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Dec 2010 16:08:42 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Dec 12 17:08:38 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PRoTU-0004d4-79 for gctc-ntg-context-518@m.gmane.org; Sun, 12 Dec 2010 17:08:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8A10DCA8C2; Sun, 12 Dec 2010 17:08:35 +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 Qx4EN86J6kEt; Sun, 12 Dec 2010 17:08:35 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6EAF3CA8C5; Sun, 12 Dec 2010 17:08:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 83C12CA8C5 for ; Sun, 12 Dec 2010 17:08: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 gJL1icELc+xn for ; Sun, 12 Dec 2010 17:08:18 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id A5133CA8C2 for ; Sun, 12 Dec 2010 17:08:18 +0100 (CET) Original-Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBCG8HB4030596 for ; Sun, 12 Dec 2010 17:08:18 +0100 Original-Received: by fxm9 with SMTP id 9so5216101fxm.3 for ; Sun, 12 Dec 2010 08:08:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=4IeAgx9UQK/pjDBJ89BuGPpHHJKc+HSs40DXXv25hLc=; b=bmbW7Zj8v0z0UWUbUlRTEodVE8yv+QjWGHMfYWHRsQ7Sx/pDOh9g3qSbcOZaom/QSl hEsg2q9mmRVPfRLYoR78Y+Sd0R0xOGXx4BHZE+i8IuFGYGeeSjpPtEs0i+exLxMyPWpI MyE6r+vg3g2IBbu2a0ZRVPhXpiQLZuzXl98eY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=uFMMg7AEfOgNufnenfJw4w642jQhDEEWzG9wZWX5MN6eoRvZRuaIh+L47s3jlJbaBe AwLYKBnxy8S17INf4Lo40xKe1Wwunu+QnZo+hHz8TEXAAOZeD0DP76igWzxJWAT/KCfC tAqg9bGyalSopOgiEO6Xp+/GPPhQtCpVmuaKA= Original-Received: by 10.223.83.201 with SMTP id g9mr3294846fal.140.1292170097627; Sun, 12 Dec 2010 08:08:17 -0800 (PST) Original-Received: from [192.168.2.23] (p5B292E57.dip.t-dialin.net [91.41.46.87]) by mx.google.com with ESMTPS id e6sm1422406fav.32.2010.12.12.08.08.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 12 Dec 2010 08:08:16 -0800 (PST) In-Reply-To: <20101212162244.55a2f946@glyph> X-Mailer: Apple Mail (2.1082) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.161.44; 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: 0cDGg8heU - f710015ff689 - 20101212 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:64451 Archived-At: Am 12.12.2010 um 16:22 schrieb Marco: > On 2010-12-12 Wolfgang Schuster wrote: > >>> Depending on your answers, I would perhaps request to trigger >>> \setff{smallcaps} by \sc in the core. >> >> Can be a problem because we have font (e.g. Latin Modern) where >> smallcaps are still in a separate file. > So the user has to know in which fashion the small caps were created, as font > feature or in a seperate file. That's not very convenient. When the user > switches to another font it may break the document, since he has to change the > \setff{smallcaps} to \sc. > > Maybe it is possible that the \sc macro can check if the font contains the > small caps as a feature. Is there a switch like > \doiffontfeatureexists{smcp}{...}? I have the following logic in mind: > > 1) Check if small caps are a font feature, if not > 2) check if small caps are in a seperate font, if not > 3) fake them. \startluacode function commands.doifelsecurrentfonthasfeature(name) local f = fonts.identifiers[font.current()] f = f and f.shared f = f and f.otfdata f = f and f.luatex f = f and f.features commands.doifelse(f and (f.gpos[name] or f.gsub[name])) end \stopluacode \def\doifelsecurrentfonthasfeature#1% {\ctxlua{commands.doifelsecurrentfonthasfeature("#1")}} \let\normalsc\sc \definefontfeature[smcp][smcp=yes] \definefontfeature[latn][script=latn] \unexpanded\def\sc{\doifelsecurrentfonthasfeature{smcp}{\addfs{smcp}}\normalsc} \starttext \tf text \sc text \switchtobodyfont[cambria]\addfs{latn} % cambria needs the latin script for smallcaps \tf text \addfs{smcp} text \switchtobodyfont[modern] \tf text \sc text \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________