* Bug in CONTEXT/LuaTeX or just buggy font @ 2016-08-09 20:41 Mohammad Hossein Bateni 2016-08-10 15:03 ` Hans Hagen 0 siblings, 1 reply; 4+ messages in thread From: Mohammad Hossein Bateni @ 2016-08-09 20:41 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1378 bytes --] Hello, I have a bunch of simple fonts for Arabic/Persian. These fonts lack Latin characters, etc., so I use fallbacks to work with them. I just noticed that \high does not work with them, and have not been able to pinpoint the issue. See the MWE below. \starttypescript [serif][samim][name] \definefontsynonym[Serif][Samim] \stoptypescript \definetypeface [myfont][rm] [serif][samim][default] \setupbodyfont [myfont] \starttext %\definedfont[Samim*arabic] ۱۲۳\high{۴}۵۶. \stoptext I am using Persian digits because the font lacks Latin digits as I mentioned. If I use the \definedfont approach, I don't see the character ۴ (argument of \high) at all. With the typescript approach, the same character *is* typeset but is *not* raised; it appears on the baseline but with smaller size. Any ideas why this is happening? Could it be that some parameters, for instance, \exheight are not properly set/read for this font? Actually, I looked at the non-math fontdimens in syst-fnt.mkiv, and everything except \slantperpoint (expected) and \exheight (awkward) is non-zero. I don't know where \exheight comes from—perhaps from the height of glyph for 'x', which the font lacks—however, \emheight is 12pt, although the font also lacks a glyph for 'm'. I am also attaching the font in case that helps. Thanks, Hossein [-- Attachment #1.2: Type: text/html, Size: 1616 bytes --] [-- Attachment #2: Samim.ttf --] [-- Type: application/x-font-ttf, Size: 47544 bytes --] [-- Attachment #3: 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in CONTEXT/LuaTeX or just buggy font 2016-08-09 20:41 Bug in CONTEXT/LuaTeX or just buggy font Mohammad Hossein Bateni @ 2016-08-10 15:03 ` Hans Hagen 2016-08-10 15:19 ` Mohammad Hossein Bateni 0 siblings, 1 reply; 4+ messages in thread From: Hans Hagen @ 2016-08-10 15:03 UTC (permalink / raw) To: mailing list for ConTeXt users On 8/9/2016 10:41 PM, Mohammad Hossein Bateni wrote: > Hello, > > I have a bunch of simple fonts for Arabic/Persian. These fonts lack > Latin characters, etc., so I use fallbacks to work with them. > > I just noticed that \high does not work with them, and have not been > able to pinpoint the issue. See the MWE below. > > > \starttypescript [serif][samim][name] > \definefontsynonym[Serif][Samim] > \stoptypescript > > \definetypeface [myfont][rm] [serif][samim][default] > \setupbodyfont [myfont] > > \starttext > %\definedfont[Samim*arabic] > ۱۲۳\high{۴}۵۶. > \stoptext > > > I am using Persian digits because the font lacks Latin digits as I > mentioned. If I use the \definedfont approach, I don't see the > character ۴ (argument of \high) at all. With the typescript approach, > the same character /is/ typeset but is /not/ raised; it appears on the > baseline but with smaller size. > > Any ideas why this is happening? Could it be that some parameters, for > instance, \exheight are not properly set/read for this font? Actually, > I looked at the non-math fontdimens in syst-fnt.mkiv, and everything > except \slantperpoint (expected) and \exheight (awkward) is non-zero. I > don't know where \exheight comes from—perhaps from the height of glyph > for 'x', which the font lacks—however, \emheight is 12pt, although the > font also lacks a glyph for 'm'. > > I am also attaching the font in case that helps. Normally one sets up a proper bodyfont (and environment if needed) while you use just a simple font switch and that one is unrelated to any other font setting. I'll add two new commands: \sx and \sxx so that you can say: \setuplow [style=\sx] \setuphigh[style=\sx] for such cases. However, as these are derived relative scales they are normally not compatible with \tx and txx sizes. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in CONTEXT/LuaTeX or just buggy font 2016-08-10 15:03 ` Hans Hagen @ 2016-08-10 15:19 ` Mohammad Hossein Bateni 2016-08-10 15:31 ` Hans Hagen 0 siblings, 1 reply; 4+ messages in thread From: Mohammad Hossein Bateni @ 2016-08-10 15:19 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 3561 bytes --] On Wed, Aug 10, 2016 at 11:03 AM, Hans Hagen <pragma@wxs.nl> wrote: > On 8/9/2016 10:41 PM, Mohammad Hossein Bateni wrote: > >> Hello, >> >> I have a bunch of simple fonts for Arabic/Persian. These fonts lack >> Latin characters, etc., so I use fallbacks to work with them. >> >> I just noticed that \high does not work with them, and have not been >> able to pinpoint the issue. See the MWE below. >> >> >> \starttypescript [serif][samim][name] >> \definefontsynonym[Serif][Samim] >> \stoptypescript >> >> \definetypeface [myfont][rm] [serif][samim][default] >> \setupbodyfont [myfont] >> >> \starttext >> %\definedfont[Samim*arabic] >> ۱۲۳\high{۴}۵۶. >> \stoptext >> >> >> I am using Persian digits because the font lacks Latin digits as I >> mentioned. If I use the \definedfont approach, I don't see the >> character ۴ (argument of \high) at all. With the typescript approach, >> the same character /is/ typeset but is /not/ raised; it appears on the >> baseline but with smaller size. >> >> Any ideas why this is happening? Could it be that some parameters, for >> instance, \exheight are not properly set/read for this font? Actually, >> I looked at the non-math fontdimens in syst-fnt.mkiv, and everything >> except \slantperpoint (expected) and \exheight (awkward) is non-zero. I >> don't know where \exheight comes from—perhaps from the height of glyph >> for 'x', which the font lacks—however, \emheight is 12pt, although the >> font also lacks a glyph for 'm'. >> >> I am also attaching the font in case that helps. >> > > Normally one sets up a proper bodyfont (and environment if needed) while > you use just a simple font switch and that one is unrelated to any other > font setting. > Thanks! But what does a `proper' bodyfont contain beside defining rm, ss, tt and mm for 'myfont' above (with regular, bold, italic, and bolditalic)? The above was a MWE but in my real example I am setting up these things that I mentioned in a larger typescript. How can I modify the font or the typescript definitions (or the environment) to get \exheight right? > > I'll add two new commands: \sx and \sxx so that you can say: > > \setuplow [style=\sx] > \setuphigh[style=\sx] > If I do this, this will not get attached to the font; right? For instance, if I define two bodyfonts 'myfonta' and 'myfontb', and switch between them in the document, then I have to stick to these two setups if one font, say 'myfonta', is problematic. Is that correct? for such cases. However, as these are derived relative scales they are > normally not compatible with \tx and txx sizes. > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > ____________________________________________________________ > _______________________ > 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/list > info/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ____________________________________________________________ > _______________________ [-- Attachment #1.2: Type: text/html, Size: 5165 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in CONTEXT/LuaTeX or just buggy font 2016-08-10 15:19 ` Mohammad Hossein Bateni @ 2016-08-10 15:31 ` Hans Hagen 0 siblings, 0 replies; 4+ messages in thread From: Hans Hagen @ 2016-08-10 15:31 UTC (permalink / raw) To: ntg-context On 8/10/2016 5:19 PM, Mohammad Hossein Bateni wrote: > > > On Wed, Aug 10, 2016 at 11:03 AM, Hans Hagen <pragma@wxs.nl > <mailto:pragma@wxs.nl>> wrote: > > On 8/9/2016 10:41 PM, Mohammad Hossein Bateni wrote: > > Hello, > > I have a bunch of simple fonts for Arabic/Persian. These fonts lack > Latin characters, etc., so I use fallbacks to work with them. > > I just noticed that \high does not work with them, and have not been > able to pinpoint the issue. See the MWE below. > > > \starttypescript [serif][samim][name] > \definefontsynonym[Serif][Samim] > \stoptypescript > > \definetypeface [myfont][rm] [serif][samim][default] > \setupbodyfont [myfont] > > \starttext > %\definedfont[Samim*arabic] > ۱۲۳\high{۴}۵۶. > \stoptext > > > I am using Persian digits because the font lacks Latin digits as I > mentioned. If I use the \definedfont approach, I don't see the > character ۴ (argument of \high) at all. With the typescript > approach, > the same character /is/ typeset but is /not/ raised; it appears > on the > baseline but with smaller size. > > Any ideas why this is happening? Could it be that some > parameters, for > instance, \exheight are not properly set/read for this font? > Actually, > I looked at the non-math fontdimens in syst-fnt.mkiv, and everything > except \slantperpoint (expected) and \exheight (awkward) is > non-zero. I > don't know where \exheight comes from—perhaps from the height of > glyph > for 'x', which the font lacks—however, \emheight is 12pt, > although the > font also lacks a glyph for 'm'. > > I am also attaching the font in case that helps. > > > Normally one sets up a proper bodyfont (and environment if needed) > while you use just a simple font switch and that one is unrelated to > any other font setting. > > > Thanks! But what does a `proper' bodyfont contain beside defining rm, > ss, tt and mm for 'myfont' above (with regular, bold, italic, and > bolditalic)? The above was a MWE but in my real example I am setting up > these things that I mentioned in a larger typescript. How can I modify > the font or the typescript definitions (or the environment) to get > \exheight right? at least rm (or ss), mm and tt x heights and emwidths come from the font (parameters) and as last resort are derived from other properties > I'll add two new commands: \sx and \sxx so that you can say: > > \setuplow [style=\sx] > \setuphigh[style=\sx] > > > If I do this, this will not get attached to the font; right? For > instance, if I define two bodyfonts 'myfonta' and 'myfontb', and switch > between them in the document, then I have to stick to these two setups > if one font, say 'myfonta', is problematic. Is that correct? it's dynamicly calculated (for performance reasons once per font instance) you can play with these: \setuplow [down=.48\exheight] \setuphigh[up=.86\exheight] e.g. use other values, but if your ex and em are bad you can expect many other issues (so best use decent fonts) > for such cases. However, as these are derived relative scales they > are normally not compatible with \tx and txx sizes. > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl > <http://www.pragma-ade.nl> | www.pragma-pod.nl > <http://www.pragma-pod.nl> > ----------------------------------------------------------------- > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an > entry to the Wiki! > > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / > http://www.ntg.nl/mailman/listinfo/ntg-context > <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/ > <http://foundry.supelec.fr/projects/contextrev/> > wiki : http://contextgarden.net > ___________________________________________________________________________________ > > > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-10 15:31 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-08-09 20:41 Bug in CONTEXT/LuaTeX or just buggy font Mohammad Hossein Bateni 2016-08-10 15:03 ` Hans Hagen 2016-08-10 15:19 ` Mohammad Hossein Bateni 2016-08-10 15:31 ` Hans Hagen
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).