From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: XeTeX and OpenType LM
Date: Fri, 02 Feb 2007 09:26:06 +0100 [thread overview]
Message-ID: <45C2F59E.1010804@wxs.nl> (raw)
In-Reply-To: <6faad9f00701310858q5c2792aft3774199f01a33af1@mail.gmail.com>
Mojca Miklavec wrote:
> ... much much text .. begging for []'s ...
>
How about this ... no quotes in specs, only file: or name: in front of
the name, and for xetex we default to filenames using file:
It means that existing defs need to be adapted, but this syntax is
better than funny " [ ] etc and more extensible (i can intercept the
prefixes in luatex and treat them accordingly)
\unprotect
\def\donoparsefontspec % #1 == \cs
{\edef\fontfile{\truefontname\somefontname}%
\ifx\fontfile\s!unknown \let\fontfile\defaultfontfile \fi
\checkfontfilename
\edef\lastfontname{\fontfile\somefontspec}%
\ifx\fontclass\empty
\expandafter\definefontlocal
\else
\expandafter\definefontglobal
\fi} % #1 == \cs
\ifnum\contextmarkmode=4
\let\checkfontfilename\relax
\else
\def\checkfontfilename
{\expandafter\docheckfontfilename\fontfile:\empty:\empty\relax}
\def\docheckfontfilename#1:#2:#3#4\relax
{\edef\temp{#1}%
\ifx\temp\v!file
\edef\fontfile{\fontfilefile{#2}}%
\else\ifx\temp\v!name
\edef\fontfile{\fontfilename{#2}}%
\else
\edef\fontfile{\fontfilesome{#2}}%
\fi\fi}
\def\fontfilename#1{"#1"}
\def\fontfilefile#1{"#1"}
\def\fontfilesome#1{"#1"}
\beginXETEX
\def\fontfilename#1{"#1"}
\def\fontfilefile#1{"[#1]"}
\def\fontfilesome#1{"[#1]"}
\endXETEX
\fi
\protect
\starttext
\definefont
[blabla]
[name:Latin Modern Something]
\definefont
[blabla]
[file:texnansi-lmr10]
\blabla test
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
next prev parent reply other threads:[~2007-02-02 8:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 4:44 Mojca Miklavec
2007-01-31 11:09 ` Hans Hagen
2007-01-31 16:58 ` Mojca Miklavec
2007-01-31 17:16 ` Jonathan Kew
2007-01-31 19:12 ` Hans Hagen
2007-02-02 8:26 ` Hans Hagen [this message]
2007-02-02 13:23 ` Mojca Miklavec
2007-02-02 13:50 ` Hans Hagen
2007-02-02 15:40 ` Mojca Miklavec
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=45C2F59E.1010804@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/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).