From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/50239 Path: news.gmane.org!not-for-mail From: Yue Wang Newsgroups: gmane.comp.tex.context Subject: Re: Font switching question Date: Mon, 11 May 2009 22:38:12 +0800 Message-ID: <68bfdc900905110738i4aeca7bfw3f2b52ccb34a1a7@mail.gmail.com> References: <68bfdc900905110508l6aba12f1of1aa8edb420a1e84@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242052759 6705 80.91.229.12 (11 May 2009 14:39:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 May 2009 14:39:19 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 11 16:39:09 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 1M3Weq-00021K-U0 for gctc-ntg-context-518@m.gmane.org; Mon, 11 May 2009 16:39:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1E0CA1FE9A; Mon, 11 May 2009 16:39:07 +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 18899-06; Mon, 11 May 2009 16:38:27 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C4D061FE6D; Mon, 11 May 2009 16:38:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CDEE41FE6D for ; Mon, 11 May 2009 16:38:24 +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 19745-04 for ; Mon, 11 May 2009 16:38:14 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by ronja.ntg.nl (Postfix) with ESMTP id B51EB1FE6C for ; Mon, 11 May 2009 16:38:14 +0200 (CEST) Original-Received: from qw-out-1920.google.com (qw-out-1920.google.com [74.125.92.146]) by filter2-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n4BEcDf8014939 for ; Mon, 11 May 2009 16:38:14 +0200 Original-Received: by qw-out-1920.google.com with SMTP id 5so1719855qwc.38 for ; Mon, 11 May 2009 07:38:13 -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=9UMWswPIJw4j72LtgxXnPVCXoSFqI7PMzasgYdpCjb0=; b=tlGQ2Z9E6AKNfNENFYegBBUgp7A8VUEe0+CfENe4h0KwPIsm7afxHi+1+XtZYxKvAs PGZwIoluiOlTv2lrxXD1Ww1ZaMDWeIAMyy3qqLjX63VgNdwF9yKmn7fVjbxbG4rCc1Te 4ma3Qi+lM3ive9CXtAR8HylHjbOLIGZ6/Fan4= 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=xKPizqQhdvE1n5oRAK7+bDm5eMYgTd5imcdyt878cgyiypxDK338szS00PDAvSHken 9dhM+QSd116LmJCsmeZEuim+9dCFUY7hRElV9k78H5PfkDul0daKjvLYR0RG49fonS9W yKSdPm3Sg2gwPm2q60TeCCdoVQnVl4D71BkBg= Original-Received: by 10.229.96.10 with SMTP id f10mr767703qcn.72.1242052692964; Mon, 11 May 2009 07:38:12 -0700 (PDT) In-Reply-To: <68bfdc900905110508l6aba12f1of1aa8edb420a1e84@mail.gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.92.146; 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: 223186525 - 67ef645c89e1 - 20090511 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:50239 Archived-At: Hi Hans: let me give a better explanation. we define a typescript foobar. so we can call \foobar to load the foobar typeface. then we should define a macro like this: \def\switchtofoobar{\savecurrentstyle\foobar\getcurrentstyle} and call it like that: text 1 {\swichtofoobar text2} text 3 when \savecurrentstyle is called, it define a macro named \getcurrentstyle in order to save the style of text 1 (like \ss\it, 10pt) into that. that's all we want. So it's not complicated to do so as font fallback. (we already done that in latex, but don't know how to do that in ConTeXt due to lack of knowledge of font mechanism) Yue Wang On Mon, May 11, 2009 at 8:08 PM, Yue Wang wrote: > Hi, Hans: > > I am working on Chinese support on XeTeX/ConTeXt and I almost finished > that. I will later upload a module called t-zhspacing to the garden > (or CTAN?). But there is one last problem. Let me explain like this. > > Suppost I have two typescripts (typeA and typeB) and both with > complete typeface defined (rm/ss/tt, bf/it/bfit/smcp....) > > Now I want to do something like this: > > \usetypescript[typeA] > \usetypescript[typeB] > \setupbodyfont[typeA] > This should be typeA/rm/normal \it and this should be typeA/rm/it \ss > and this should be typeA/ss/it %here everything is ok in context > \typeB this should be typeB/ss/it %(but context gives me > typeB/rm/normal. How can I automatically get what I want?) > > Yue Wang > ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________