Is there a way (MkIV) to set math to use upright symbols globally, for Latin and Greek (I'm working on an OpenType math font that has no italics). Another slightly related issue, is it possible to get some visual indication of missing glyphs, something like using .notdef char instead of just leaving it blank. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On Mon, 7 Sep 2009, Khaled Hosny wrote:
Is there a way (MkIV) to set math to use upright symbols globally, for Latin and Greek (I'm working on an OpenType math font that has no italics).
There is no interface yet, but you can set math attributes by either explicitly setting them \appendtoks \setmathattribute{regular}{tf} \to \everymathematics or by redefining mathdefault \unexpanded\def\mathdefault {\setmathattribute{regular}{tf}}
Another slightly related issue, is it possible to get some visual indication of missing glyphs, something like using .notdef char instead of just leaving it blank.
I don't know. Aditya
On Mon, Sep 07, 2009 at 05:59:33PM -0400, Aditya Mahajan wrote:
On Mon, 7 Sep 2009, Khaled Hosny wrote:
Is there a way (MkIV) to set math to use upright symbols globally, for Latin and Greek (I'm working on an OpenType math font that has no italics).
There is no interface yet, but you can set math attributes by either explicitly setting them
\appendtoks \setmathattribute{regular}{tf} \to \everymathematics
or by redefining mathdefault
\unexpanded\def\mathdefault {\setmathattribute{regular}{tf}}
Thanks for the tip, but this seems not to work for Greek symbols: \unexpanded\def\mathdefault {\setmathattribute{regular}{tf}} \starttext \startformula ABC \phi\Phi\Omega \stopformula \stoptext Only Latin is upright, but not Greek. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
On Tue, 8 Sep 2009, Khaled Hosny wrote:
On Mon, Sep 07, 2009 at 05:59:33PM -0400, Aditya Mahajan wrote:
On Mon, 7 Sep 2009, Khaled Hosny wrote:
Is there a way (MkIV) to set math to use upright symbols globally, for Latin and Greek (I'm working on an OpenType math font that has no italics).
There is no interface yet, but you can set math attributes by either explicitly setting them
\appendtoks \setmathattribute{regular}{tf} \to \everymathematics
or by redefining mathdefault
\unexpanded\def\mathdefault {\setmathattribute{regular}{tf}}
Thanks for the tip, but this seems not to work for Greek symbols:
\unexpanded\def\mathdefault {\setmathattribute{regular}{tf}} \starttext \startformula ABC \phi\Phi\Omega \stopformula \stoptext
Only Latin is upright, but not Greek.
The attributes only works for characters, not macros. \usetypescript[cambria] \setupbodyfont[cambria] \appendtoks \setmathattribute{regular}{tf} \to \everymathematics \starttext $ABC αβγδεφ ΦΨ$ \stoptext The names \alpha \beta etc are currently hardcoded in char-def. The only way to change them is to move mathname="alpha" from 0x1D6FC to 0x03B1. Or use \greekalpha, \greekbeta etc (essentially taking the text glyphs). Hans, we need to think of mechanism to switch between upright and italic greek letters for the macros. Aditya
Aditya Mahajan wrote:
The names \alpha \beta etc are currently hardcoded in char-def. The only way to change them is to move mathname="alpha" from 0x1D6FC to 0x03B1. Or use \greekalpha, \greekbeta etc (essentially taking the text glyphs).
Hans, we need to think of mechanism to switch between upright and italic greek letters for the macros.
ok. actually, it's not that hard to do, and i'd also provide an 0x1D6FC -> 0x03B1 and vise versa transformation then (on unicode chars) ... so, you can start thinking about proper names for the commands (\ugreek, \igreek or so); are there more such up/it things? Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Tue, 8 Sep 2009, Hans Hagen wrote:
Aditya Mahajan wrote:
The names \alpha \beta etc are currently hardcoded in char-def. The only way to change them is to move mathname="alpha" from 0x1D6FC to 0x03B1. Or use \greekalpha, \greekbeta etc (essentially taking the text glyphs).
Hans, we need to think of mechanism to switch between upright and italic greek letters for the macros.
ok. actually, it's not that hard to do,
and i'd also provide an 0x1D6FC -> 0x03B1 and vise versa transformation then (on unicode chars)
As long as there is still some way of getting 0x1D6FC in the output.
... so, you can start thinking about proper names for the commands (\ugreek, \igreek or so);
I would prefer long names, say \uprightalpha, \italicalpha, etc or \mathuprightalpha, \mathitalicalpha Since, the user will usually just type \alpha, the long names should not be a problem.
are there more such up/it things?
The differential operator has various conventions (upright, italic), but unicode only provides the double struck version (0x2145, and 0x2146) Aditya
On Tue, Sep 08, 2009 at 10:29:04AM +0200, Hans Hagen wrote:
Aditya Mahajan wrote:
The names \alpha \beta etc are currently hardcoded in char-def. The only way to change them is to move mathname="alpha" from 0x1D6FC to 0x03B1. Or use \greekalpha, \greekbeta etc (essentially taking the text glyphs).
Hans, we need to think of mechanism to switch between upright and italic greek letters for the macros.
ok. actually, it's not that hard to do, and i'd also provide an 0x1D6FC -> 0x03B1 and vise versa transformation then (on unicode chars) ... so, you can start thinking about proper names for the commands (\ugreek, \igreek or so); are there more such up/it things?
I was thinking in a global way to switch upright math on/off, my use case is that on day when we have Euler OpenType, users can use the font and switch math to upright symbols globally without altering existing math formulas. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
Khaled Hosny wrote:
On Tue, Sep 08, 2009 at 10:29:04AM +0200, Hans Hagen wrote:
Aditya Mahajan wrote:
The names \alpha \beta etc are currently hardcoded in char-def. The only way to change them is to move mathname="alpha" from 0x1D6FC to 0x03B1. Or use \greekalpha, \greekbeta etc (essentially taking the text glyphs).
Hans, we need to think of mechanism to switch between upright and italic greek letters for the macros. ok. actually, it's not that hard to do, and i'd also provide an 0x1D6FC -> 0x03B1 and vise versa transformation then (on unicode chars) ... so, you can start thinking about proper names for the commands (\ugreek, \igreek or so); are there more such up/it things?
I was thinking in a global way to switch upright math on/off, my use case is that on day when we have Euler OpenType, users can use the font and switch math to upright symbols globally without altering existing math formulas.
an upcoming beta will provide such a feature \usetypescript[cambria]\setupbodyfont[cambria] \startTEXpage $\alpha \mathgreekupright \alpha \mathgreekitalic \alpha$ \stopTEXpage and also: \setupmathematics[greek=normal|italic|none] but first aditya and i need to agree on the names and complete the related greek vector ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Khaled Hosny