ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Stixtwo spacing between upright integrals and lower limits
@ 2017-10-03 19:40 Mikael P. Sundqvist
  2017-10-04 17:13 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael P. Sundqvist @ 2017-10-03 19:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1585 bytes --]

Dear Hans (and others),

In the tex stackexchange chat today we were discussing the stix two fonts,
and in particular the spacing between the integral sign and the lower
bound. It is known that this was way to big before (see
https://tex.stackexchange.com/q/327710/52406), but it seems that it is
still too big, at least if one uses the upright version. Judge yourself
from the example file at the end of this email (result attached).

I made a bug report (see https://sourceforge.net/p/stixfonts/tracking/95/)
but Ulrike Fischer said that it could take time to get it fixed, and that
you Hans made a fix for another bug (
https://sourceforge.net/p/stixfonts/tracking/86/) in the fontloader.

Can you do that for this one as well?

During the discussion Harald Hanche-Olsen came up with the following "quick
fix" for LuaLaTeX:

\usepackage{luatexbase,luacode}
\begin{luacode}
local patch_stixmath = function (fontdata)
 if fontdata.psname == "STIXTwoMath"
 then

fontdata.characters[983352]["italic"]=3*fontdata.characters[983352]["italic"]
 end
end
luatexbase.add_to_callback
 (
  "luaotfload.patch_font",
  patch_stixmath,
  "change_stixmath"
 )
\end{luacode}

I don't know if this is the way to go, but I thought I should include it.

Best regards, Mikael

%%% TEST FILE %%%
\setupbodyfont[stixtwo]

\setupmathematics[
integral=nolimits,
]

\startTEXpage[offset=3bp]

With slanted integral:

\startformula
\int_0^\pi \sin x\,dx=2.
\stopformula

\setupmathematics[stylealternative={upright}]

With upright integral:

\startformula
\int_0^\pi \sin x\,dx=2.
\stopformula

\stopTEXpage

[-- Attachment #1.2: Type: text/html, Size: 2369 bytes --]

[-- Attachment #2: ctx-listexample39.pdf --]
[-- Type: application/pdf, Size: 12668 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Stixtwo spacing between upright integrals and lower limits
  2017-10-03 19:40 Stixtwo spacing between upright integrals and lower limits Mikael P. Sundqvist
@ 2017-10-04 17:13 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2017-10-04 17:13 UTC (permalink / raw)
  To: Mikael P. Sundqvist, mailing list for ConTeXt users

On 10/3/2017 9:40 PM, Mikael P. Sundqvist wrote:
> Dear Hans (and others),
> 
> In the tex stackexchange chat today we were discussing the stix two 
> fonts, and in particular the spacing between the integral sign and the 
> lower bound. It is known that this was way to big before (see 
> https://tex.stackexchange.com/q/327710/52406), but it seems that it is 
> still too big, at least if one uses the upright version. Judge yourself 
> from the example file at the end of this email (result attached).

well, normally i don't care too much about it as it's a font design 
property and a designers choice

> I made a bug report (see 
> https://sourceforge.net/p/stixfonts/tracking/95/) but Ulrike Fischer 
> said that it could take time to get it fixed, and that you Hans made a 
> fix for another bug (https://sourceforge.net/p/stixfonts/tracking/86/) 
> in the fontloader.
> 
> Can you do that for this one as well?
> 
> During the discussion Harald Hanche-Olsen came up with the following 
> "quick fix" for LuaLaTeX:
> 
> \usepackage{luatexbase,luacode}
> \begin{luacode}
> local patch_stixmath = function (fontdata)
>   if fontdata.psname == "STIXTwoMath"
>   then
>    
> fontdata.characters[983352]["italic"]=3*fontdata.characters[983352]["italic"]
>   end
> end
> luatexbase.add_to_callback
>   (
>    "luaotfload.patch_font",
>    patch_stixmath,
>    "change_stixmath"
>   )
> \end{luacode}
> 
> I don't know if this is the way to go, but I thought I should include it.

no it's not the way to go (in context) but i cannot speak for latex

> Best regards, Mikael
> 
> %%% TEST FILE %%%
> \setupbodyfont[stixtwo]
> 
> \setupmathematics[
> integral=nolimits,
> ]
> 
> \startTEXpage[offset=3bp]
> 
> With slanted integral:
> 
> \startformula
> \int_0^\pi \sin x\,dx=2.
> \stopformula
> 
> \setupmathematics[stylealternative={upright}]
> 
> With upright integral:
> 
> \startformula
> \int_0^\pi \sin x\,dx=2.
> \stopformula
> 
> \stopTEXpage

i'll add (hopefully robust) patch code to the goodie file

also, i noticed that there's more wrong with stix2 (i bet that that 
would not have happened if the font was made by the gyre folks as they 
have a bit more consistent workflow), so i added

% \enabletrackers[otf.preparing]
% \definefontfeature[mathextra][mathextra][fixitalics=true]

to the next beta, not enabled by default because one never knows what 
side effects occur

Hans




> 
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-04 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03 19:40 Stixtwo spacing between upright integrals and lower limits Mikael P. Sundqvist
2017-10-04 17:13 ` 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).