From: Zhichu Chen <zhichu.chen@gmail.com>
To: Wolfgang Schuster <schuster.wolfgang@gmail.com>,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Simplefonts
Date: Sun, 13 Oct 2013 17:56:03 +0800 [thread overview]
Message-ID: <525A6E33.9040706@gmail.com> (raw)
In-Reply-To: <7D24BFCF-3023-47A2-A243-582C49B7FA79@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 6055 bytes --]
On 10/13/2013 01:39 AM, Wolfgang Schuster wrote:
>
> Am 12.10.2013 um 15:04 schrieb Zhichu Chen <zhichu.chen@gmail.com
> <mailto:zhichu.chen@gmail.com>>:
>
>> Hi Wolfgang,
>>
>> Good to know that, but I might have some questions.
>>
>>
>> On Fri, Oct 11, 2013 at 2:02 AM, Wolfgang Schuster
>> <wolfgang.schuster@gmail.com <mailto:wolfgang.schuster@gmail.com>> wrote:
>>
>> Hi all,
>>
>> \definefallbackfamily [mainface] [serif] [DejaVu Serif]
>> [range=cyrillic,force=yes]
>>
>> What if I want to use the CJK font? The code in "font-sel.mkvi" hints
>> I could use range=chinese but it didn't work. I have to use interval
>> {0x00400-0x2FA1F} explicitly.
>
> When you take a look into char-def.lua you can see names certain
> character ranges and “range=cyrillic”
> used such a name.
>
> For a chinese font you need
> “range={cjkunifiedideographs,cjkunifiedideographsextensiona,…}".
> Because the list with names is very long you do this setup only once
> with the \definefontfamilypreset
> command, e.g.
>
> \definefontfamilypreset[chinese][range={cjkunifiedideographs,cjkunifiedideographsextensiona,…}]
>
> and load this setup when you set the font with
> \definefontfamilyfallback, e.g.
>
> \definefontfamilyfallback[<typeface>][<style>][<font>][preset=chinese]
>
> For the moment I added three presets “chinese”, “japanese” and
> “korean” but they need better
> names, e.g. “range:chinese” because there could be also
> “features:chinese” etc.
I get it now. I can put range and features of the fallback fonts in the
preset.
>
>> And how can I assign the boldfont, italicfont and bolditalicfont? I'm
>> currently using the Adobe Song Std as the regular font but it didn't
>> come with a bold version or else, hence I might need this feature.
>
> The module provides keys to apply a certain font and feature for each
> alternative (upright, italic etc.)
> of a font, a complete list with all keys is shown in the table below.
>
> -------------------------------------------------------
> | Alternative | Font | Feature |
> |-----------------------------------------------------|
> | tf | regularfont | regularfeatures |
> | it | italicfont | italicfeatures |
> | sl | slantedfont | slantedfeatures |
> | bf | boldfont | boldfeatures |
> | bi | bolditalicfont | bolditalicfeatures |
> | bs | boldslantedfont | boldslantedfeatures |
> | sc | smallcapsfont | smallcapsfeatures |
> -------------------------------------------------------
>
> The feature-keys expect the name from the \definefontfeature command,
> when you don’t
> specify a feature to a certain alternative the value from the
> “features” key is used.
>
> When you want to set a certain font for a alternative there are
> different ways, I’m going
> to show the different ways with a few examples where I change the font
> for italic.
Thanks for the descriptions. I have made a small test and turns out the
"regularfont" has to be assigned to something or the other "xxxfont"s
won't have any effects.
Here's my code:
=================================================
\definefallbackfamily [mainface] [serif] [adobesongstd]
[range={0x00400-0x2FA1F}%
,regularfont=name:adobesongstdlight%
,italicfont=name:adobefangsongstdregular%
,boldfont=name:adobeheitistdregular%
,bolditalicfont=name:adobekaitistdregular%
,force=yes%
,features=song%
]
=================================================
and if I remove the "regularfont=..." line, the boldface Chinese
characters will use the Adobe Song Std font as well. Same thing happened
when I used the "preset=xxx" option which I don't know if it is intended
to behave like that, by the way.
Oh, and off the topic, can I use "effect" to assign the fonts? Like if I
have defined
=================================================
\defineeffect[mybold][alternative=both,rulethickness=\dimexpr\bodyfontsize/10\relax]
=================================================
I would like to use this effect to apply to my bold fonts, maybe:
=================================================
\setupfontfamily [serif] [DejaVu Serif] [boldfont=effect:mybold]
=================================================
I know this has nothing to do with this module. I just thought this
might be interesting.
>
> 1. Use the filename of a font. With the “file:” prefix you can the
> tell the module
> to look for a file with the given name, when the file isn’t found the
> font from
> the tf-alternative is used. The file-method is also used when you omit
> the prefix.
>
> \setupfontfamily [serif] [DejaVu Serif] [italicfont=file:dejavuserifbold]
>
> \starttext
> Regular and \it Italic
> \stoptext
>
> 2. Use a certain style. When you use the “style: ”prefix the module
> looks for a certain
> style of the requested font.
>
> \setupfontfamily [serif] [DejaVu Serif] [italicfont=style:bolditalic]
>
> \starttext
> Regular and \it Italic
> \stoptext
>
> 3. Search for a font with a certain name. When you use the “name:”
> prefix the module
> looks for a font with the requested name. Names are internal values of
> a font which
> is sometimes the same as the filename.
>
> \setupfontfamily [serif] [DejaVu Serif] [italicfont=name:dejavuserifbold]
>
> \starttext
> Regular and \it Italic
> \stoptext
>
> 4. Use the spec information. When you use the “spec:” prefix you can
> request a font
> with a certain “weight” (bold or normal), “style” (italic or normal)
> and variant (smallcaps or normal).
>
> \setupfontfamily [serif] [DejaVu Serif] [italicfont=spec:bold-italic]
>
> \starttext
> Regular and \it Italic
> \stoptext
>
>
> There is a possibility that I change the way to set font and features
> for alternatives
> in the feature to a way which is more compact and easier to parse in Lua.
>
> Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 11205 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2013-10-13 9:56 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-10 18:02 Simplefonts Wolfgang Schuster
2013-10-12 13:04 ` Simplefonts Zhichu Chen
2013-10-12 17:39 ` Simplefonts Wolfgang Schuster
2013-10-13 9:56 ` Zhichu Chen [this message]
2013-10-13 11:12 ` Simplefonts Wolfgang Schuster
2013-10-18 16:18 ` Simplefonts Wolfgang Schuster
2013-10-14 15:17 ` Simplefonts Lars Huttar
2013-10-14 16:45 ` Simplefonts Hans Hagen
2013-10-14 16:38 ` Simplefonts Prashanth
2013-10-14 17:38 ` Simplefonts Wolfgang Schuster
2013-10-15 8:02 ` Simplefonts Otared Kavian
2013-10-15 8:26 ` Simplefonts Hans Hagen
2013-10-15 8:41 ` Simplefonts Mikael P. Sundqvist
2013-10-15 9:12 ` Simplefonts Hans Hagen
2013-10-15 19:12 ` Simplefonts Marcin Borkowski
2013-10-15 19:17 ` Simplefonts Wolfgang Schuster
2013-10-15 20:00 ` Simplefonts Marcin Borkowski
2013-10-15 20:58 ` Simplefonts Hans Hagen
2013-10-15 9:26 ` Simplefonts Hans Hagen
2013-10-15 9:57 ` Simplefonts Hans Hagen
2013-10-15 11:42 ` Simplefonts Keith J. Schultz
2013-10-15 17:08 ` Simplefonts Wolfgang Schuster
2013-10-16 7:47 ` Simplefonts Keith J. Schultz
2013-10-15 17:41 ` Simplefonts Otared Kavian
2013-10-15 12:18 ` Simplefonts Prashanth
-- strict thread matches above, loose matches on Subject: below --
2014-05-21 3:32 SimpleFonts hwitloc
2014-05-21 4:41 ` SimpleFonts Mikael P. Sundqvist
[not found] <mailman.1.1382176801.27687.ntg-context@ntg.nl>
2013-10-19 12:21 ` Simplefonts John Kitzmiller
2013-10-19 18:20 ` Simplefonts Wolfgang Schuster
2011-03-11 12:28 Simplefonts Charles Doherty
2011-03-11 18:30 ` Simplefonts Wolfgang Schuster
2011-03-14 11:55 ` Simplefonts Charles Doherty
2011-02-21 16:38 Simplefonts Charles Doherty
2010-11-13 18:25 simplefonts Herbert Voss
2010-11-13 18:32 ` simplefonts Aditya Mahajan
2010-11-13 18:37 ` simplefonts Herbert Voss
2010-11-13 18:47 ` simplefonts Khaled Hosny
2010-11-13 18:44 ` simplefonts Wolfgang Schuster
2010-11-13 19:16 ` simplefonts Herbert Voss
2010-03-15 2:48 simplefonts Michael Saunders
2010-03-14 13:12 simplefonts Michael Saunders
2010-03-14 13:54 ` simplefonts Henning Hraban Ramm
2010-03-14 13:59 ` simplefonts Hans Hagen
2010-03-13 16:09 simplefonts Michael Saunders
2010-03-13 16:36 ` simplefonts Wolfgang Schuster
2010-03-13 20:13 ` simplefonts Thomas A. Schmitz
2010-03-12 19:11 simplefonts Michael Saunders
2010-03-12 19:24 ` simplefonts Aditya Mahajan
2010-03-12 19:32 ` simplefonts Hans Hagen
2010-03-12 20:11 ` simplefonts Thomas A. Schmitz
2010-03-12 20:17 ` simplefonts Wolfgang Schuster
2010-03-12 20:31 ` simplefonts Andreas Harder
2010-03-12 20:38 ` simplefonts Wolfgang Schuster
2010-03-12 22:29 ` simplefonts Hans Hagen
2010-03-13 5:35 ` simplefonts Wolfgang Schuster
2010-03-13 6:19 ` simplefonts Khaled Hosny
2010-03-13 12:16 ` simplefonts Hans Hagen
2010-03-13 12:26 ` simplefonts Wolfgang Schuster
2010-03-13 12:35 ` simplefonts Hans Hagen
2010-03-13 13:27 ` simplefonts Andreas Harder
2010-03-13 16:17 ` simplefonts Wolfgang Schuster
2010-03-13 16:59 ` simplefonts Andreas Harder
2010-03-13 17:29 ` simplefonts Wolfgang Schuster
2010-03-12 10:05 simplefonts Michael Saunders
2010-03-12 12:45 ` simplefonts Wolfgang Schuster
2010-03-12 4:50 simplefonts Michael Saunders
2010-03-12 5:36 ` simplefonts Wolfgang Schuster
[not found] <mailman.580.1258822015.22155.ntg-context@ntg.nl>
2009-11-21 21:33 ` simplefonts Vyatcheslav Yatskovsky
2009-11-22 12:24 ` simplefonts Wolfgang Schuster
2009-11-22 13:10 ` simplefonts Alan BRASLAU
2009-11-22 13:13 ` simplefonts Wolfgang Schuster
2009-11-22 13:16 ` simplefonts Alan BRASLAU
2009-09-14 11:06 simplefonts Wolfgang Schuster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525A6E33.9040706@gmail.com \
--to=zhichu.chen@gmail.com \
--cc=ntg-context@ntg.nl \
--cc=schuster.wolfgang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).