Here is a possible approach without the need of creating your own font:
- Draw this integral symbol with Inkscape or Adobe Illustrator, extract its path in SVG format
- In LaTeX, use the
TikZ package to draw the same path
In the following example, The \MyIntTop command corresponds to the top half of the integral drawn with Inkscape. I applied rotation and translation to get the bottom half of the integral sign based on symmetry. Of course, you can draw the entire integral sign as SVG.
Then, the important command is \my_customize_math_operator:cnnnnnn, which declares a custom math operator with parameters to fine-tune horizontal and vertical positioning of subscript and superscript. You can play with the magnification scale and superscript/subscript placements to find your desirable settings.
A major problem of this approach is that it does not support style selection via \mathchoice. If you are using LuaTeX, then this problem can be bypassed by using \mathstyle. If you have to use other TeX compilers, then I think there is no other approach than manually specifying different inline/display style operators.

The following example only works with LuaLaTeX
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{tikz}
\usepackage{adjustbox}
\usepackage{expl3}
\setmainfont{TeX Gyre Schola}
\setmathfont{TeX Gyre Schola Math}
\usetikzlibrary{svg.path}
% top half of the symbol drawn with Inkscape
\newcommand{\MyIntTop}{%
\begin{tikzpicture}[yscale=-1]
\filldraw[fill=black] svg "m 25.357197,131.54532 c 0,0 0.100226,-7.95149 0.868626,-9.87696 0.7684,-1.92547 2.405424,-4.27882 4.510172,-4.1362 2.104749,0.14263 2.271791,1.8185 2.004523,2.49598 -0.267269,0.67749 -2.238384,-0.004 -1.937705,-0.71313 0.200452,-1.00994 -0.935444,-1.06522 -1.570208,-0.53037 -0.634765,0.53486 -1.102486,0.85128 -1.503391,2.52715 -0.400904,1.67587 -0.501131,10.29135 -0.501131,10.29135 z";
\end{tikzpicture}%
}
% build the entire symbol based on symmetry
\newcommand{\MyIntCombined}{%
\adjustbox{rotate=180, lap=0.8mm, raise=0.1mm}{\MyIntTop}\MyIntTop%
}
\newcommand{\MyIntAdj}[1]{
\adjustbox{#1}{\MyIntCombined}
}
\ExplSyntaxOn
% customize superscript and subscript positioning
% #1: math symbol new command name
% #2: math symbol base command
% #3: superscript vshift
% #4: superscript hshift
% #5: subscript vshift
% #6: subscript hshift
% #7: subscript/superscript style
\cs_set:Npn \my_customize_math_operator:cnnnnnn #1#2#3#4#5#6#7 {
\tl_new:c {l_#1_sub_tl}
\tl_new:c {l_#1_super_tl}
\tl_new:c {l_#1_math_style_tl}
\bool_new:c {l_#1_finish_bool}
% declare the command
\cs_set_protected:cpn {#1} {
\tl_clear:c {l_#1_sub_tl}
\tl_clear:c {l_#1_super_tl}
% check subscript
\peek_catcode:NTF \c_math_subscript_token {
\use:c {#1_sub:Nn}
} {
\peek_catcode:NTF \c_math_superscript_token {
\use:c {#1_super:Nn}
} {
\use:c {#1_make_op:}
}
}
}
\cs_set_protected:cpn {#1_sub:Nn} ##1##2 {
\tl_set:cn {l_#1_sub_tl} {##2}
%\tl_show:c {l_#1_sub_tl}
% check for superscript afterwards
\peek_catcode:NTF \c_math_superscript_token {
\use:c {#1_sub_super:Nn}
} {
\use:c {#1_make_op:}
}
}
% superscript after subscript
\cs_set:cpn {#1_sub_super:Nn} ##1##2 {
\tl_set:cn {l_#1_super_tl} {##2}
%\tl_show:c {l_#1_super_tl}
\use:c {#1_make_op:}
}
\cs_set_protected:cpn {#1_super:Nn} ##1##2 {
\tl_set:cn {l_#1_super_tl} {##2}
%\tl_show:c {l_#1_super_tl}
% check for subscript afterwards
\peek_catcode:NTF \c_math_subscript_token {
\use:c {#1_super_sub:Nn}
} {
\use:c {#1_make_op:}
}
}
% subscript after superscript
\cs_set_protected:cpn {#1_super_sub:Nn} ##1##2 {
\tl_set:cn {l_#1_sub_tl} {##2}
%\tl_show:c {l_#1_sub_tl}
\use:c {#1_make_op:}
}
% retreive current math style
% only works in LuaTeX
% \cs_set:Npn \my_save_math_style: {
% \iow_term:x {math~style~is~\mathstyle}
% \int_case:nn {\mathstyle} {
% {0} {\tl_set:cn {l_#1_math_style_tl} {\displaystyle}}
% {1} {\tl_set:cn {l_#1_math_style_tl} {\crampeddisplaystyle}}
% {2} {\tl_set:cn {l_#1_math_style_tl} {\textstyle}}
% {3} {\tl_set:cn {l_#1_math_style_tl} {\crampedtextstyle}}
% {4} {\tl_set:cn {l_#1_math_style_tl} {\scriptstyle}}
% {5} {\tl_set:cn {l_#1_math_style_tl} {\crampedscriptstyle}}
% {6} {\tl_set:cn {l_#1_math_style_tl} {\scriptscriptstyle}}
% {7} {\tl_set:cn {l_#1_math_style_tl} {\crampedscriptscriptstyle}}
% }
% \tl_show:c {l_#1_math_style_tl}
% }
% make the operator
\cs_set_protected:cpn {#1_make_op:} {
#2
\tl_if_empty:cF {l_#1_sub_tl} {
\c_math_subscript_token {
\mkern#6\relax
\adjustbox{raise=#5}{$#7 \tl_use:c {l_#1_sub_tl}$}
}
}
\tl_if_empty:cF {l_#1_super_tl} {
\c_math_superscript_token {
\mkern#4\relax
\adjustbox{raise=#3}{$#7 \tl_use:c {l_#1_super_tl}$}
}
}
}
}
% declare script style
\my_customize_math_operator:cnnnnnn {myintscript} {\MyIntAdj{scale={0.4}{0.4},raise=1mm}} {-1pt} {0mu} {0.5pt} {-2mu} {\scriptstyle}
% declare display style
\my_customize_math_operator:cnnnnnn {myintdisplay} {\MyIntAdj{scale={0.7}{0.7},raise=1mm}} {-3.5pt} {1.5mu} {1pt} {-10mu} {\scriptstyle}
\int_new:N \l_myint_style_int
% finally, declare our operator
\newcommand{\myint}{
\int_case:nnF {\mathstyle} {
{0} {\myintdisplay}
} {\myintscript}
}
\ExplSyntaxOff
\begin{document}
$\int_a^b \myint_{abc}^{bef} \myint^{abc}_{def} \myint \myint_a \myint^b$
[\int_a^b \myint_{abc}^{bef} \myint^{abc}_{def} \myint \myint_a \myint^b]
This equation gives
[
\myint^x_0 \frac{ds}{\sqrt{a-x}}
]
\end{document}
wasysympackage... – MadyYuvi Apr 02 '21 at 15:19