I need to substitute the regular and italic characters of a publisher’s non-math font (Unicode) for those in a math font.
The non-math addresses are: 0041-005A, 0061-007A %italic uppercase and lowercase 0391-03A9, 03B1-03C9 %slanted Greek uppercase and lowercase
The math addresses are: 1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase 1D6E2-1D6FA, 1D6FC-1D714 %slanted Greek uppercase and lowercase
Is there a way to use the \definefallbackfamily mechanism that does not assume that the characters have the same Unicode addresses? Or is some other approach required?
Alan
I am resending this in the hope that some font will find him/herself with time to consider an odd query.
I need to substitute the regular and italic characters of a publisher’s non-math font (Unicode) for those in a math font.
The non-math addresses are: 0041-005A, 0061-007A %italic uppercase and lowercase 0391-03A9, 03B1-03C9 %slanted Greek uppercase and lowercase
The math addresses are: 1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase 1D6E2-1D6FA, 1D6FC-1D714 %slanted Greek uppercase and lowercase
Is there a way to use the \definefallbackfamily mechanism that does not assume that the characters have the same Unicode addresses? Or is some other approach required?
Alan
On Mon, Oct 2, 2017 at 8:04 AM, Alan Bowen bowenalan03@gmail.com wrote:
I need to substitute the regular and italic characters of a publisher’s non-math font (Unicode) for those in a math font.
The non-math addresses are: 0041-005A, 0061-007A %italic uppercase and lowercase 0391-03A9, 03B1-03C9 %slanted Greek uppercase and lowercase
The math addresses are: 1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase 1D6E2-1D6FA, 1D6FC-1D714 %slanted Greek uppercase and lowercase
Is there a way to use the \definefallbackfamily mechanism that does not assume that the characters have the same Unicode addresses? Or is some other approach required?
Alan
Alan Bowen mailto:bowenalan03@gmail.com 2. Oktober 2017 um 14:04 I need to substitute the regular and italic characters of a publisher’s non-math font (Unicode) for those in a math font.
The non-math addresses are: 0041-005A, 0061-007A %italic uppercase and lowercase 0391-03A9, 03B1-03C9 %slanted Greek uppercase and lowercase
The math addresses are: 1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase 1D6E2-1D6FA, 1D6FC-1D714 %slanted Greek uppercase and lowercase
Is there a way to use the \definefallbackfamily mechanism that does not assume that the characters have the same Unicode addresses? Or is some other approach required?
The fallback mechanism provides a offset key which lets you replace a math character with a normal text character.
\definefontfamily [mainface] [ss] [TeX Gyre Heros]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercasenormal] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercaseitalic] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [tf=style:italic,range=0x68,offset=0x210E]% lowercase italic h \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercasebold] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercasenormal] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercaseitalic] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercasebold]
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
\starttext
\setupbodyfont[pagella]
Lowercase: $ {\tf abc} {\it abc} {\bf abc} $
Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $
\setupbodyfont[mainface]
Lowercase: $ {\tf abc} {\it abch} {\bf abc} $
Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $
\stoptext
Wolfgang
Many thanks for this, Wolfgang. That is very helpful. Right now, then, I have:
\definefontfamily[mainface][rm][Brill] [protrusion=quality, expansion=quality, mode=node, force=yes, ] \definefallbackfamily [mainface] [rm] [Brill] [tf=style:italic, range={0x03B8}, offset={0x03D1}]%Greek theta
\definefallbackfamily[mainface][mm][Brill] [range={0x30-0x39}] %oldstyle numerals, normal
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasenormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:lowercaseitalic] \definefallbackfamily [mainface] [mm] [Brill] [preset=math:uppercasenormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:uppercaseitalic]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:lowercasegreekitalic] \definefallbackfamily [mainface] [mm] [Brill][preset=math:uppercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:uppercasegreekitalic]
\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.94]
\setupmathematics[ucgreek=normal, lcgreek=italic]
\setupbodyfont[mainface,10pt]
\starttext
normal: 1234567890\quad math: \m{1234567890}
normal: ABCDEFabcdef\quad italic: \emph{ABCDEFabcdef}\quad math: \m{\red ABCDEFabcdef}
normal: ΑΒΓΔΕΘαβγδεθ\quad slanted: \emph{ΑΒΓΔΕΘαβγδεθ}\quad math: \m{\red ΑΒΓΔΕΘαβγδεθ}
Greek theta: \emph{θ}
\stoptext
As you can see, all I need is to get the Brill lowercase Greek in mathmode and the proper slanted Greek theta. I have tried this with Pagella and Cambria instead of the Brill font and the problem persists. So I must be doing something wrong. But what?
Alan
On Wed, Oct 18, 2017 at 2:27 PM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote:
Alan Bowen bowenalan03@gmail.com 2. Oktober 2017 um 14:04 I need to substitute the regular and italic characters of a publisher’s non-math font (Unicode) for those in a math font.
The non-math addresses are: 0041-005A, 0061-007A %italic uppercase and lowercase 0391-03A9, 03B1-03C9 %slanted Greek uppercase and lowercase
The math addresses are: 1D434-1D44D, 1D44E-1D467 %italic uppercase and lowercase 1D6E2-1D6FA, 1D6FC-1D714 %slanted Greek uppercase and lowercase
Is there a way to use the \definefallbackfamily mechanism that does not assume that the characters have the same Unicode addresses? Or is some other approach required?
The fallback mechanism provides a offset key which lets you replace a math character with a normal text character.
\definefontfamily [mainface] [ss] [TeX Gyre Heros]
\definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercasenormal] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercaseitalic] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [tf=style:italic,range=0x68,offset=0x210E]% lowercase italic h \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:lowercasebold] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercasenormal] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercaseitalic] \definefallbackfamily [mainface] [mm] [TeX Gyre Heros] [preset=math:uppercasebold]
\definefontfamily [mainface] [mm] [TeX Gyre Pagella Math]
\starttext
\setupbodyfont[pagella]
Lowercase: $ {\tf abc} {\it abc} {\bf abc} $
Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $
\setupbodyfont[mainface]
Lowercase: $ {\tf abc} {\it abch} {\bf abc} $
Uppercase: $ {\tf ABC} {\it ABC} {\bf ABC} $
\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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ____________________________________________________________ _______________________
Am 2017-10-19 um 15:05 schrieb Alan Bowen bowenalan03@gmail.com:
As you can see, all I need is to get the Brill lowercase Greek in mathmode and the proper slanted Greek theta. I have tried this with Pagella and Cambria instead of the Brill font and the problem persists. So I must be doing something wrong. But what?
Finally, Alan and me solved the problem like this:
\definefontfamily[mainface][rm][Brill] [protrusion=quality, expansion=quality, mode=node, force=yes, ] \definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.94]
\definefontfallback [brillmath] [RomanItalic] [mathematicalalphanumericsymbols] [force=yes] \definefontfallback [brillmath] [Roman] [{0x30-0x39}] [force=yes] \definefontfallback [brillmath] [RomanItalic] [{0x41-0x5A, 0x61-0x7A}] [force=yes] \definefontfallback [brillmath] [Roman] [uppercasegreeknormal] [force=yes] \definefontfallback [brillmath] [RomanItalic] [lowercasegreeknormal] [force=yes] \definefontfallback [brillmath] [Roman] [superscriptsandsubscripts] [force=yes]
\definefontsynonym [MathRoman] [mainface] [fallbacks=brillmath]
\setupmathematics[ucgreek=normal, lcgreek=italic]
\setupbodyfont[mainface,12pt]
\starttext \starttabulate[|l|l|l|] \NC normal: \NC 1234567890 \NC\NC\NR \NC math: \NC \m{1234567890} \NC\NC\NR \NC \NC \NC \NC\NR \NC normal: \NC\mr ABCDEFabcdef\NC\mr ΑΒΓΔΕΘαβγδεθ\NC\NR \NC math: \NC \m{\red ABCDEFabcdef}\NC\m{\red ΑΒΓΔΕΘαβγδεθ}\NC\NR \NC italic: \NC \emph{ABCDEFabcdef}\NC\emph{ΑΒΓΔΕΘαβγδεθ}\NC\NR \NC \NC \NC \NC\NR \NC Greek theta: \NC\NC \emph{θ}\NC\NR \stoptabulate
\m{\sqrt{34y\frac{12\alpha^2}{98.0 x_2}}Δθ}
\m{{{sin^2 α + cos^2 β}\over{2}} = \frac{1}{2}}
\showbodyfont
\stoptext
Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
Alan Bowen mailto:bowenalan03@gmail.com 19. Oktober 2017 um 15:05 Many thanks for this, Wolfgang. That is very helpful. Right now, then, I have:
\definefontfamily[mainface][rm][Brill] [protrusion=quality, expansion=quality, mode=node, force=yes, ] \definefallbackfamily [mainface] [rm] [Brill] [tf=style:italic, range={0x03B8}, offset={0x03D1}]%Greek theta
\definefallbackfamily[mainface][mm][Brill] [range={0x30-0x39}] %oldstyle numerals, normal
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasenormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:lowercaseitalic]
The font name for the third argument is *always* Brill and not BrillItalic or BrillBold.
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:uppercasenormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:uppercaseitalic]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:lowercasegreekitalic] \definefallbackfamily [mainface] [mm] [Brill][preset=math:uppercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:uppercasegreekitalic]
\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.94]
\setupmathematics[ucgreek=normal, lcgreek=italic]
\setupbodyfont[mainface,10pt]
\starttext
normal: 1234567890\quad math: \m{1234567890}
normal: ABCDEFabcdef\quad italic: \emph{ABCDEFabcdef}\quad math: \m{\red ABCDEFabcdef}
normal: ΑΒΓΔΕΘαβγδεθ\quad slanted: \emph{ΑΒΓΔΕΘαβγδεθ}\quad math: \m{\red ΑΒΓΔΕΘαβγδεθ}
Greek theta: \emph{θ}
\stoptext
As you can see, all I need is to get the Brill lowercase Greek in mathmode and the proper slanted Greek theta.
\starttext \m{\theta \vartheta} \stoptext
I have tried this with Pagella and Cambria instead of the Brill font and the problem persists. So I must be doing something wrong. But what?
Pagella and Cambria have a proper math font, why would you use fallbacks for them.
Wolfgang
OK—that makes sense, since Brill is the family name. But then changing “BrillItalic” to “Brill” will not get the italic math characters (Roman or Greek). So, is there a way to get these italics using \definefallbackfamily or must one use \definefontfallback (as Hraban and I eventually did)?
I was using Pagella and Cambria to convince myself that the problem was one in my encoding and not some problem with the Brill font.
Best, Alan
On Sat, Oct 28, 2017 at 4:46 AM, Wolfgang Schuster < schuster.wolfgang@gmail.com> wrote:
Alan Bowen bowenalan03@gmail.com 19. Oktober 2017 um 15:05 Many thanks for this, Wolfgang. That is very helpful. Right now, then, I have:
\definefontfamily[mainface][rm][Brill] [protrusion=quality, expansion=quality, mode=node, force=yes, ] \definefallbackfamily [mainface] [rm] [Brill] [tf=style:italic, range={0x03B8}, offset={0x03D1}]%Greek theta
\definefallbackfamily[mainface][mm][Brill] [range={0x30-0x39}] %oldstyle numerals, normal
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:lowercasenormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:lowercaseitalic]
The font name for the third argument is *always* Brill and not BrillItalic or BrillBold.
\definefallbackfamily [mainface] [mm] [Brill] [preset=math:uppercasenormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math:uppercaseitalic]
\definefallbackfamily [mainface] [mm] [Brill] [preset=math: lowercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math: lowercasegreekitalic] \definefallbackfamily [mainface] [mm] [Brill][preset=math: uppercasegreeknormal] \definefallbackfamily [mainface] [mm] [BrillItalic] [preset=math: uppercasegreekitalic]
\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.94]
\setupmathematics[ucgreek=normal, lcgreek=italic]
\setupbodyfont[mainface,10pt]
\starttext
normal: 1234567890\quad math: \m{1234567890}
normal: ABCDEFabcdef\quad italic: \emph{ABCDEFabcdef}\quad math: \m{\red ABCDEFabcdef}
normal: ΑΒΓΔΕΘαβγδεθ\quad slanted: \emph{ΑΒΓΔΕΘαβγδεθ}\quad math: \m{\red ΑΒΓΔΕΘαβγδεθ}
Greek theta: \emph{θ}
\stoptext
As you can see, all I need is to get the Brill lowercase Greek in mathmode and the proper slanted Greek theta.
\starttext \m{\theta \vartheta} \stoptext
I have tried this with Pagella and Cambria instead of the Brill font and the problem persists. So I must be doing something wrong. But what?
Pagella and Cambria have a proper math font, why would you use fallbacks for them.
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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ____________________________________________________________ _______________________